Implement the Content Packs
Implementing the content packs enables you to do both of the following tasks:
Implementing the content packs enables you to do
bothof the following tasks:
- As a producer or designer of content packs, package a library of objects including your updates and customizations in a single location.
- As a consumer or adopter of content packs, import the customized objects programmatically in a single operation, as many times as necessary.
You do not have to repeat individual operations for each object type. Content packs provide an efficient method of packaging and applying such updates and customizations, especially when you move from one implementation to another. For example:
- Test-to-production migrations and other same-release migrations
- Replacement of a decommissioned computer
- Restoration of CA Service Catalog customizations after upgrades
To manage the content packs, perform the following tasks:
Step 1 - Complete the Prerequisites
- If you are using CA Process Automation as your process automation tool, verify that you have:
- Installed and configured CA Process Automation.
- Integrated CA Service Catalog with CA Process Automation.
- If you use content packs to import CA Process Automation objects and ifbothCA Process Automation and CA Service Catalog are using secure socket layer (SSL), verify that you have completed all applicable tasks for configuring CA Service Catalog to use SSL. As part of that process, you configure CA Process Automation to communicate with CA Service Catalog using SSL.
Step 2 - Create and Export the Content Pack
You create content packs to record (export) customizations so that you can reuse them in another implementation. Using content packs provides greater efficiency and accuracy than repeating multiple customization processes manually.
Follow these steps:
- Decide and record the objects that you want to include in the content pack.You can include any or all of the following categories:
- API plug-ins
- CA Process Automation processes
- Events, including rules, and actions
- Form Designer forms
- Report data objects
- Services, including service hours and request SLAs
notspecific to any business units. That is, they always apply toallbusiness units. The exception isattachedactions. The attached actions applyonlyto the individual service options that you specify explicitly. Attached actions are service option elements of the service option for which they were created.
- All objects in your implementation; that is, all objects in all business units (domains).
- All objects from one or more specific business units only.
- Only the objects that you specify by object names, for example, in a comma-separated list.
- Only the objects that you specify by object-specific criteria.For example, for services, you can specify the last modified date.
- SelectStart,Programs,CA,CA Service Catalog,Service Catalog Command Prompton the source computer.
- Run the following command at this command prompt:ant create-contentpackThe Catalog system creates the folder structure for the content pack.The Catalog system also prompts you to specify the following information:
folderto include the name, version, and locale (language) of the content pack.The ant command creates the content pack folder namedUSM_HOME\FileStore\contentpacks\folder-name. This folder includes the contentpack.properties file. This file stores the identification data for the content pack. This folder also contains several subfolders, including Forms, Policies, Reports, and Services.
- Simple identification data for the content pack, such as a name, author, and description.
- The message with which to prompt the user during an import.
- Answer the prompt about whether to export the objects into this content pack now or later, as follows:
- If you specify Yes, skip to the next step.
- If you specify No, run the following command on the source computer:ant export-to-contentpack
- Answer the prompts about which objects must be exported, and their attributes.The ant command performs the following functions:
- An XML file for each object is created, using the attributes that you specified.
- In most cases, copies the XML file to the appropriate subfolder.
- A services.xml file is created using the attributes that you specified.
- Copies the services.xml file to the Services subfolder of the content pack folder
- When prompted, copy the objects that you want to include (if any) to the following subfolders of the content pack folder:
- ProcessesStores CA Process Automation processes.
- Images\OfferingsStores images for the services that you have included the Services subfolder.
- Images\RatePlansStores images for the service option groups that you have included in the Services subfolder.
- PrescriptsStores custom scripts to runbeforeyou import the content pack. Examples include scripts, required to unzip files that are needed for the import or scripts to display the critical information.
- PostscriptsStores custom scripts to runafteryou import the content pack. Examples include scripts that load data into the Catalog system or that prompt the user for configuration specifications.
- Plug-insStores custom API plug-ins.
You have created and exported the content pack on the source computer. You are now ready to import it on the target computer.
Step 3 - Import Content Packs
You import content packs so that you can reuse customizations that you (or another administrator) previously exported from another implementation.
As a best practice, use scheduled down time. Verify that no users are active on CA Service Catalog before you import, enable, or disable content packs.
You can import the content packs using one of the following methods:
Import Content Packs Using the Ant Scripts
This section describes importing the content packs using the ant scripts.
Follow these steps:
- Copy the content pack folder (USM_HOME\FileStore\contentpacks\folder-namefolder) from the source computer to a location on the target computer. Record the location for reference.
- SelectStart,Programs,CA,CA Service Catalog, Service Catalog Command Prompt on the target computer.
- Run the following command at this command prompt:ant import-contentpack
- Enter the complete path name of the folder that stores the content pack to import.
- Perform the following steps:
- Confirm that you want to continue the import.
- Enter the business unit ID for the content pack. You can specify any business unit, including the root business unit.
- Answer the object-specific prompts. When applicable, consider carefully whether to import objects as disabled.For example, you import a new rule action that affects the emails that the Catalogs system sends. Before you enable the new rule action, you likely want to update the configuration of your mail server.If you import objects as disabled, manually enable them before you can use them.
- Restart the Windows service named CA Service Catalog if the content pack includes events, rules, or actions. Restart this service on all Catalog Component computers in your environment.If you do not restart the CA Service Catalog service as directed, unpredictable results can occur.
You have imported the content pack using the ant scripts. All imported objects are either read-only or permit only limited editing.
Import Content Packs from the GUI
This section describes how you can import the content packs from the GUI.
Follow these steps:
- ClickCatalog,Configurationin CA Service Catalog UI.
- ClickContent Packsin the left menu.
- Specify the folder where the content pack is stored. Select the content pack zip file and click Open.
- Clear theContinue import with default valuescheck box if you want to import the Content Pack without the default values.
- ClickStart Import.If the Content Pack includes any CA Process Automation Objects in it, the following three options appear:
- Set imported version of CA Process Automation objects as the current version:
- If the option is selected, the imported version of CA Process Automation objects and the current version is same.
- If the option is not selected, the imported version of CA Process Automation objects and current version is different.
- Make imported custom operators or sensors available:
- If the option is selected the operators or sensors that are imported are in Available status in CA Process Automation.
- If the option is not selected, the operators or sensors are imported as it is present in the content pack.
- Enter the name of CA Process Automation configuration and import the process definitions to specific CA Process Automation instance.
- If the content pack includes events, rules, or actions, the Import rules, actions in a disabled state option appears. If the option is selected, the events, rules, or actions in the content pack are imported in disabled state irrespective of the content pack status.
- Restart the Windows service that is named CA Service Catalog onallCatalog Component computers in your environment.If you do not restart the CA Service Catalog Windows service as directed, unpredictable results can occur.For example, you import a new rule action that affects the emails that the Catalog system sends. Before you enable the new rule action, update the configuration of your mail server.Enable the objects manually if you import the objects as disabled.
- If the content pack includes policies, the Import policies in a disabled state option appear. If the option is selected, the policies in the content pack are imported in disabled state irrespective of the content pack status.
- Click Continue Import.The content pack import is successful.The import of the content packs is blocked with the availability of any .bat or .cmd files in the content packs. Ant scripts are used import the content packs containing .bat or .cmd files.
You have imported the content pack in CA Service Catalog UI. All imported objects are either read-only or permit only limited editing.
When the import of the content pack is complete, the images of the services are copied to the
USM_HOME\Filestore\Imagesfolder. The Plug-ins are copied to the
Step 4 - Verify the Content Packs
After you import the content packs in CA Service Catalog, you can verify if the content packs were imported successfully in CA Service Catalog.
Follow these steps:
- ClickCatalog,Configuration,Content Configuration.
- Select the content pack that you imported.
- Verify the following criteria:
- The Content Pack Details section lists the details that you specified when you created the content pack, for example, the name, version, and status.
- The Content section lists the object that you specified, according to the criteria that you specified.
- Verify that the user interface menus include the imported objects, for example:
- SelectCA Service Catalog,Service Offerings,Offerings,Services. Verify that the list of services includes any services that you imported.
- SelectAdministration,Events. Verify that the list of events includes any services that you imported.
Step 5 - Enable or Disable the Content Packs
You can enable and disable either an entire content pack or individual objects (if applicable) in the content pack. You enable objects in a content pack so that the Catalog system can use the objects. Enabling the imported objects and setting permissions on them work together to let users view and use the imported objects. After you enable objects in a content pack you can disable them, for example, if a problem occurs.
As a best practice, use scheduled down time, verify that no users are active on CA Service Catalog to import, enable, or disable content packs.
Follow these steps:
- Log in to the business unit that contains the content pack that you want to enable or disable.
- ClickCatalog,Configuration,Content Packs.
- Click the content pack that you want and enable.
- Enable or disable objects in the list, as follows:
- Activateall objectsin the content pack by clicking the Enable button for the entire content pack. This button appears on the Content Pack Details bar.Use this option with caution. The content pack contains rules, action, or policies that perform redundant or conflicting tasks, causing unpredictable results. Therefore, if you are not certain regarding the purpose or goal of the content pack, then enable each object individually.
- Conversely, deactivateall objectsin the content pack by clicking the Disable button for the entire content pack.
- Enable or disable individual objects within a category by clicking the Enable or Disable button for the object.You can enable or disable objects in any or all of the following categories:
- ServicesEnabling a service activates its Date Available setting: The service uses its Date Available setting to determine whether and when it is available to users.
- Service Option GroupsEnabling a service option group activates its Date Available setting: The service option group uses its Date Available setting to determine whether and when it is available to users.Enabling a service or service option group sets its status to System Object--Available (6). Similarly, disabling a service or service option group sets its status to System Object--Unavailable (7).
- PoliciesYou enable a policy to set its status to Active, and disable a policy to set its status to Inactive.You can make only limited updates to imported polices that you have enabled. To make more updates to such policies, copy and modify them.
- RulesYou enable or disable rules individually, without affecting the status of any other rules in the same event.Enabling or disabling a rule does not automatically enable or disable the actions in the rule. The actions remain in the original status.
- ActionsYou enable or disable actions individually, without affecting the status of any other actions in the same rule. Similarly, enabling or disabling an action does not affect the status of the rule that contains the action.
- (Optional) Verify that the object is enabled (active) or disabled (inactive) by viewing its status. For example, select Services,folder-name, and open a service that you enabled. Verify that its status is System Object--Available. Also verify that its Date Available meets your requirements.
You have enabled or disabled objects in the content pack. All objects that you enabled are available in the Catalog system.
If you copy and customize an object from a content pack, the customized object is
notaffected by enabling or disabling the content pack.
Step 6 - Modify the Imported Objects
The actions that you can perform on the objects that are imported from a content pack vary by object. When applicable, you perform certain actions on certain imported objects so that users can view and use the objects. The following table shows which actions apply to which objects.
Enable or Disable
Service Option Groups
Report Data Objects
The actions are as follows:
- Enable or disableYou enable objects so that users and the Catalog system can use them. For example, suppose that your content pack includes policies. You enable these policies so that the Catalog system can use them and manages requests. Similarly, your content pack includes services and you enable these services for the users to view and request the services. For any reason, such as a problem occurring, you can disable any objects that you have enabled.
- Set permissionsTo set permissions for each Catalog role on an imported object, use the portion of the UI that stores and maintains the object. For example, to set permissions for services, select Catalog, Service Offerings, Services, Permission, and edit the service details.Edit limited attributesTypically, imported objects are read-only. You can perform only limited editing on certain imported objects, as follows:
- For services and service options, you can change the date available and date unavailable.
- For policies, you can add or remove approvers, change the priority, and set the status as active or inactive.
Step 7 - Customize the Imported Objects
To customize an imported object, copy and modify it. For example, to add a field to an imported form, copy the form, rename it, and add the field.
You can customize a service, service option group, or a form. The common customizations are as follows:
- Adding, deleting, and modifying the service option groups or the image in the service.
- Setting the dates that the service is available or unavailable.
If you copy and customize an object that you imported in a content pack, copy and customize all
parentobjects that include the original object. This requirement exists because forms, services, and service option groups allow only limited editing.
Follow this process to copy a form, customize the copy, and include the form in a service option group and service that are based on the original service option group and service in the content pack:
- Copy Form A and modify the copy, creating Form B.Service Option Group A (SOG A) contains Form A. You cannot modify SOG A to replace Form A with Form B, because SOG A allows only limited editing. So, you perform the next steps.
- Copy SOG A to create SOG B.
- Update SOG B by deleting Form A and adding Form B.Service A contains SOG A. You cannot modify Service A to replace SOG A with SOG B, because Service A allows only limited editing. Therefore, you perform the next steps.
- Copy Service A to create Service B.
- Update Service B by deleting SOG A and adding SOG B.
- Copy Folder A to create Folder B.
- Update Folder B by deleting Service A and adding Service B.
The following table lists the parent objects that you must copy and customize if you copy and customize a child object.
Service Option Group
Service Option Group