Implement the Content Packs

Implementing the content packs enables you to do both of the following tasks:
casm172
Implementing the content packs enables you to do
both
of 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 if
    both
    CA 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:
  1. 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
    • Policies
    • Report data objects
    • Services, including service hours and request SLAs
    For each category that you select, decide and record which objects to include, as follows:
    • 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.
    Events, rules, actions, and report data objects (including API plug-ins) are
    not
    specific to any business units. That is, they always apply to
    all
    business units. The exception is
    attached
    actions. The attached actions apply
    only
    to the individual service options that you specify explicitly. Attached actions are service option elements of the service option for which they were created. 
  2. Select
    Start
    ,
    Programs
    ,
    CA
    ,
    CA Service Catalog
    ,
    Service Catalog Command Prompt
    on the source computer.
  3. Run the following command at this command prompt:
    ant create-contentpack
    The Catalog system creates the folder structure for the content pack.
    The Catalog system also prompts you to specify the following information:
    • 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.
    We recommend that you name the
    folder
    to include the name, version, and locale (language) of the content pack.
    The ant command creates the content pack folder named
    USM_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.
  4. 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
  5. 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.
    For example, if you exported services, the ant command performs the following functions:
    • 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
    The ant command copies some (but not all) categories of objects to their subfolders. Therefore, you copy the remaining categories of objects to their folders manually, as explained in the next step.
  6. When prompted, copy the objects that you want to include (if any) to the following subfolders of the content pack folder:
    • Processes
      Stores CA Process Automation processes.
    • Images\Offerings
      Stores images for the services that you have included the Services subfolder.
    • Images\RatePlans
      Stores images for the service option groups that you have included in the Services subfolder.
    • Prescripts
      Stores custom scripts to run
      before
      you import the content pack. Examples include scripts, required to unzip files that are needed for the import or scripts to display the critical information.
    • Postscripts
      Stores custom scripts to run
      after
      you import the content pack. Examples include scripts that load data into the Catalog system or that prompt the user for configuration specifications.
    • Plug-ins
      Stores 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:
  1. Copy the content pack folder (
    USM_HOME\FileStore\contentpacks\folder-name
    folder) from the source computer to a location on the target computer. Record the location for reference.
  2. Select
    Start
    ,
    Programs
    ,
    CA
    ,
    CA Service Catalog
    , Service Catalog Command Prompt on the target computer.
  3. Run the following command at this command prompt:
    ant import-contentpack
  4. Enter the complete path name of the folder that stores the content pack to import.
  5. Perform the following steps:
    1. Confirm that you want to continue the import.
    2. Enter the business unit ID for the content pack. You can specify any business unit, including the root business unit.
    3. 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.
  6. 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:
  1. Click
    Catalog
    ,
    Configuration
    in CA Service Catalog UI.
  2. Click
    Content Packs
    in the left menu.
  3. Click
    Import
    tab.
  4. Specify the folder where the content pack is stored. Select the content pack zip file and click Open.
  5. Clear the
    Continue import with default values
    check box if you want to import the Content Pack without the default values.
  6. Click
    Start 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.
  7. 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.
  8. Restart the Windows service that is named CA Service Catalog on
    all
    Catalog 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.
  9. 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.
  10. 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\Images
folder. The Plug-ins are copied to the
USM_HOME\Filestore\Plugins
folder.
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:
  1. Click
    Catalog
    ,
    Configuration
    ,
    Content Configuration
    .
  2. Select the content pack that you imported.
  3. 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.
  4. Verify that the user interface menus include the imported objects, for example:
    • Select
      CA Service Catalog
      ,
      Service Offerings
      ,
      Offerings
      ,
      Services
      . Verify that the list of services includes any services that you imported.
    • Select
      Administration
      ,
      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:
  1. Log in to the business unit that contains the content pack that you want to enable or disable.
  2. Click
    Catalog
    ,
    Configuration
    ,
    Content Packs
    .
  3. Click the content pack that you want and enable.
  4. Enable or disable objects in the list, as follows:
    • Activate
      all objects
      in 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, deactivate
      all objects
      in 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:
      • Services
        Enabling 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 Groups
        Enabling 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).
      • Policies
        You 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.
      • Rules
        You 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.
      • Actions
        You 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.
    Enabling and disabling does not apply to the following objects: Events, forms, reports, images, and CA Process Automation processes. You specified during the import process whether to make CA Process Automation processes active or inactive.
  5. Click
    Done
    .
  6. (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
not
affected 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.
Object
Enable or Disable
Set Permissions
Limited Editing
Services
Y
Y
Y
Service Option Groups
Y
Y
Y
Policies
Y
Y
Y
Events
N
Y
N
Rules
Y
Y
N
Actions
Y
Y
N
Forms
N
Y
N
Report Data Objects
N
Y
N
Images
N
N
N
The actions are as follows:
  • Enable or disable
    You 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 permissions
    To 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 attributes
    Typically, 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.
    Otherwise, to customize an imported object, copy, and modify it. For example, to customize an imported report data object, copy and modify it. 
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.
For more information about performing these tasks, see the Manage Services, Manage Service Option Groups, Manage Service Options and Service Option Elements, or Manage Forms sections.
If you copy and customize an object that you imported in a content pack, copy and customize all
parent
objects 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:
  1. 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.
  2. Copy SOG A to create SOG B.
  3. 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.
  4. Copy Service A to create Service B.
  5. Update Service B by deleting SOG A and adding SOG B.
  6. Copy Folder A to create Folder B.
  7. 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.
Child
Parent
Form
Service Option Group
Service Option Group
Service
Service
Folder
Folder
Parent Folder