Chapter 5. Catalogs and Services

Through the use of catalogs, Red Hat CloudForms provides support for multi-tier service provisioning to deploy layered workloads across hybrid environments. You can create customized dialogs that will give consumers of the services the ability to input just a few parameters and provision the entire service. The following table lists the terminology associated with catalogs that you will use within the CloudForms user interface for service provisioning.

Table 5.1. Terminology

TypeInformation

Catalog Bundle

A group of templates.

Catalog Item

A single template.

Template

A template is a copy of a preconfigured virtual machine, designed to capture the installed software and software configurations, as well as the hardware configuration of the original virtual machine.

Dialog Tabs

Part of a service dialog.

Element

An item on a tab in a dialog. It can be a button, check box, drop down list, radio button, tag control, text area box, or a text box.

Provisioning Dialogs

Dialogs created for host provisioning, virtual machine migration, or virtual machine provisioning. The dialog name must be added to the appropriate provision instance to be processed.

Service Catalog

A catalog item or catalog bundle that is available for provisioning.

Service Dialogs

Made up of fully customizable tabs, items, and values for use with service provisioning.

5.1. Generic Objects

Generic Objects are object-like entities, defined at runtime, that have unique names and user-defined attributes and relationships. Residing in the Automate Engine datastore, generic objects are designed to manage objects other than those related to private infrastructure, and public or private cloud providers.

Using automate requests, services and catalog items, generic objects can be directly accessed or passed, during any step, as a parameter to a service state machine. As a result, generic objects can be used to quickly add the capability to provision and collect data on resources not supported by Red Hat CloudForms.

Note

Outside of the Red Hat CloudForms user interface, Red Hat Marketing may refer to Dynamic Resource Objects when referencing the features and applications of generic objects.

5.1.1. Viewing Generic Objects Classes

View a list of generic objects and click through to see detailed summary information for each object.

  1. Navigate to AutomateGeneric Objects.
  2. Click on a generic object class in the table to view its summary information.

5.1.2. Creating Generic Objects Classes

Model a new resource by creating a generic object class and adding it to your Red Hat CloudForms inventory. Each generic object class can have attributes, associations, and methods. Once created, generic object classes are visible to users of the Self Service user interface at the resource level.

Create a generic object class using the following steps:

  1. Navigate to AutomationAutomateGeneric Objects.
  2. Click Configuration (Configuration), then click Add a New Generic Object Class (Add a New Generic Object Class).
  3. Provide a Name and Description for the new object class.
  4. In the Attributes field, enter a Name and choose a Type from the drop-down list. Click the Add button to add attributes.
  5. Enter a Name and select a Class for the object class’s Associations. Click the Add button to create additional associations.
  6. Provide a Name for the Methods. Click the Add button to add methods.
  7. Click Add.

5.1.3. Editing Generic Object Classes

Edit existing generic object classes using the following steps:

  1. Navigate to AutomationAutomateGeneric Objects.
  2. Click on a generic object class in the list view.
  3. Click Configuration (Configuration), then click Edit this Generic Object Class (Edit this Generic Object Class).
  4. Make required changes to the generic object class fields.
  5. Click Save.

5.1.4. Removing Generic Objects Classes

Remove generic object classes from your inventory using the following steps:

  1. Navigate to AutomationAutomateGeneric Objects.
  2. Check the generic objects classes from the table to remove.
  3. Click Configuration (Configuration), then click Remove selected Generic Object Classes from Inventory (Remove selected Generic Object Classes from Inventory).
  4. Click OK to confirm.

5.2. Service Dialogs

When provisioning a service, input will be needed from the requester. Service dialogs are used to take input from the user. This input is connected to a method in the Automate model that defines how the users input is translated into the provision request. Before creating a service dialog, be sure to plan what items you need the user to input.

5.2.1. Adding a Service Dialog

Important
  • When creating a service dialog for use with Ansible playbook catalog items, variable elements must use the prefix param_ when assigning the value. For example, a new variable labeled key1 should have its value set as param_key1.
  • Using Ansible playbooks to populate dynamic dialog fields is not recommended due to delay times caused by the overhead of interaction between systems.
  • If you add the playbook automate method to a service dialog, only users with admin privileges can run the dialog.
  1. Navigate to AutomationAutomateCustomization.
  2. Click the Service Dialogs accordion.
  3. Click 1847 (Configuration), and then 1862 (Add a new Dialog).
  4. In Dialog Information, enter a Label and Description. Check the boxes for the buttons you want available at the bottom of the dialog form. The description will appear as hover text.

    As you enter the Label of the dialog, it should appear in the Dialog pane on the left.

    1. Click 1862 (Add), then 1862 (Add a New Tab to this Dialog).
    2. Enter a Label and Description for this tab.

      As you enter the Label of the tab, it should appear in the Dialog pane on the left under the dialog you are creating.

    3. Click 1862 (Add), then 1862 (Add a New Box to this Tab).
    4. Enter a Label and Description for this box.

      As you enter the Label of the box, it should appear in the Dialog pane on the left under the tab you are creating.

  5. Add an element to this box. Elements are controls that accept input.

    1. Click 1862 (Add), then 1862 (Add a New Element to this Box).
    2. Enter a Label, Name, and Description for this element.

      Important

      Name must use only alphanumeric characters and underscores without spaces. It is also used to retrieve the value of this element in the method used with the dialog and must start with dialog_service_type

    3. Select a Type for an element type. All Type options have a Required and Default Value field. Check Required or set Required to true if the element is required to proceed. You can also specify a default value. The rest of the options presented are based on which type of element you select.

      Element TypesAdditional Info

      Check Box

      Check Default Value if you want this check box checked by default.

      Date Control

      Use Date Control to create a field where users can select a date. If you want users to be able to select a date and time, use the Date/Time Control option.

      Date/Time Control

      Use Date/Time Control to create a field where users can select a date and time. Only one Date Control or Date/Time Control element can be present in a dialog.

      Drop Down Dynamic List

      Use Drop Down Dynamic List if you want the list options to be created using automate methods. Use Entry Point (NS/Cls/Inst) to select an automate instance. Check Show Refresh Button to allow users to refresh the list options manually.

      Radio Button

      This element type serves the same purpose as Drop Down List but displays options using radio buttons.

      Tag Control

      Select a Category of tags you want assigned to the virtual machines associated with this service dialog. Check Single Select if only one tag can be selected.

      Text Area Box

      Provides text area for users to enter some text. You can also leave a message to users by typing in the Default Value field or leave it as blank.

      Text Box

      This element type serves the same purpose as Text Area Box with the option to check Protected so the text is shown as asterisks (*), instead of plain text.

  6. Continue adding the dialog items you need. You can switch between dialogs, tabs, boxes, and elements by selecting their respective labels from the Dialog pane on the left.
  7. Click Add. Your dialog should appear in the Service Dialogs accordion.

5.2.2. Adding a Service Dialog Using Dialog Editor

Red Hat CloudForms includes a drag-and-drop service dialog editor to create service dialogs. The editor, with its drag-and-drop feature, provides a visual representation of the components that comprise a service dialog. You can easily design your service dialog utilizing dialog tabs, sections (previously referred to as boxes), and elements.

When users access a service, the majority of options available to them are preset and cannot be altered. The requirements for the service determine the options and fields that need to be present in the dialog for user input. A service dialog exposes some of those options to the user so that even if they are ordering a basic Red Hat Enterprise Linux 7 machine, for example, they can at least choose the amount of memory, virtual CPUs, or other options available to the instance they order. In cases where certain fields must be unique, such as the name of virtual machines in Red Hat Virtualization, users must enter their own unique name for the virtual machine they choose or the operation will fail, so this field must be exposed.

See Creating a Service in CloudForms for Virtual Machine Provisioning for an example about creating a service that utilizes a service dialog for provisioning a Red Hat Virtualization virtual machine.

A service dialog contains three components:

  • One or more Tabs.
  • Inside the tabs, one or more Sections. Note that in the previous method of creating service dialogs using the CloudForms user interface, Sections were referred to as Boxes.
  • Inside the sections, one or more Elements. Elements are controls that accept input. Elements contain methods, like check boxes, drop-down lists or text fields, to fill in the options on the provisioning dialog.
Important

The names of the elements must correspond to the options used in the provisioning dialog.

  1. Navigate to AutomationAutomateCustomization.
  2. Click the Service Dialogs accordion.
  3. Click 1847 (Configuration), and then 1862 (Add a new Dialog).

    edit section1

  4. Enter basic details under General:

    1. Enter the Dialog’s name and Dialog’s description.
  5. Add a new tab to the dialog:

    1. Click 1862 Create Tab. Then, click the pencil icon on the new tab to edit tab information.
    2. Enter a Label.
    3. Optional: Enter a description for the tab in Description.
    4. Click Save.
  6. Add a new section to the tab:

    1. Click 1862 Add Section. Then, click the pencil icon on the upper-right to edit section details.
    2. Enter a Label.
    3. Optional: Enter a description for the section in Description.
    4. Click Save.
  7. Add elements to the section:

    1. From the list of elements on the left, click an element you want to add, then drag-and-drop it inside the section. Then, click the pencil icon next to the element to edit its field details.

      Element TypesAdditional Info

      Text Area

      Provides text area for users to enter text. You can enter the default text in Default Value, or leave it as blank.

      Text Box

      Text box is similar to a text area with the added option to enable Protected so the text is shown as asterisks(*), instead of plain text.

      Check Box

      Enable Default Value if you want the box checked by default.

      Drop Down

      Use drop down to create list entries either manually or using automate methods. Enable Dynamic to create lists using automate methods; use Entry Point to select an automate instance. Enable Show Refresh Button to allow users to refresh list options manually.

      Radio Button

      Similar to a drop down but displays options using radio buttons.

      Datepicker

      Use this to enable users to pick a date by clicking the calendar icon.

      Timepicker

      use this to enable users to pick a date and time.

      Tag Control

      Select a Category of tags you want assigned to virtual machines associated with the service dialog. Enable Single Select if only one tag can be selected.

    2. Enter a Label, Name, and Description for the element.

      Important

      Element names must correspond to the options used in the provisioning dialog. Name must use only alphanumeric characters and underscores without spaces. It is also used to retrieve the value of this element in the method used with the dialog and must start with dialog_service_type.

    3. Optional: Add additional information in Help to assist the user to complete the fields in the service dialog. This field is useful for explaining unfamiliar terminology or providing configuration tips.
    4. Set other options as required.
    5. Click Save.
  8. Optional: Repeat the above step to add more elements to the existing section, or create and add elements to a new section as required.
  9. Optional: Repeat the step to add a new tab to the dialog, and subsequent steps to add sections and elements to it as required.
  10. Click Save to create the dialog.

The service dialog is now created, and added to the Service Dialogs accordion.

5.2.3. Creating a Service Dialog from a Container Template

Complete the following procedure to create a Service Dialog from a Container Template.

  1. Navigate to ComputeContainersContainer Templates and select the template for provisioning.
  2. Click 1847 (Configuration), then 1862 (Create Service Dialog from Container Template).
  3. Enter a name for the dialog in Service Dialog Name.
  4. Click Save.

You can use this service dialog when creating a catalog item for container template provisioning; see Section 5.4.8, “Creating an OpenShift Template Catalog Item”.

5.2.4. Importing Service Dialogs

You can share service dialogs between appliances using the export and import features.

  1. Navigate to AutomateCustomization.
  2. In the Import/Export accordion, click Service Dialog Import/Export.
  3. In the Import area, click Browse to select an import file.
  4. Click Upload.

5.2.5. Exporting Service Dialogs

You can share service dialogs between appliances using the export and import features.

  1. Navigate to Automate → Customization.
  2. In the Import/Export accordion, click Service Dialog Import/Export.
  3. In the Export area, select the service dialogs that you want to export.
  4. Click Export.

5.3. Methods

5.3.1. Creating a Method to Associate with the Dialog

You will need to create a method that connects the values in the dialog with the provisioning request. The method should be created in the DOMAIN/Service/Provisioning/StateMachines/ServiceProvision_Template class of the Automate model.

Note

DOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.

A method is provided below that was created for the following scenario:

  • You want to provision a three-tiered service that contains catalog items of web, app and DB. Each of these virtual machines (or cloud instances) has been tagged under the Service category with the appropriate value. Then, added as a catalog item and combined into a catalog bundle.
  • The Service Dialog captures the selection of small, medium or large application in a dropdown called service_type. When referring to a value captured in an element in a dialog, the name of the element should be prefixed with dialog_. For example, service_type becomes dialog_service_type when used in the method.
  • The method will set the memory sizes for each of the catalog items based on the service_type selection.
#            Automate Method
#
$evm.log("info", "Automate Method ConfigureChildDialog Started")
#
#            Method Code Goes here
#
$evm.log("info", "===========================================")
$evm.log("info", "Listing ROOT Attributes:")
$evm.root.attributes.sort.each { |k, v| $evm.log("info", "\t#{k}: #{v}")}
$evm.log("info", "===========================================")

stp_task = $evm.root["service_template_provision_task"]
$evm.log("info", "===========================================")
$evm.log("info", "Listing task Attributes:")
stp_task.attributes.sort.each { |k, v| $evm.log("info", "\t#{k}: #{v}")}
$evm.log("info", "===========================================")

#############################################################
#### This is how the method would look for dialog variables
#############################################################
dialog_service_type = $evm.root['dialog_service_type']
$evm.log("info","User selected Dialog option = [#{dialog_service_type}]")

stp_miq_request_task = stp_task.miq_request_task
#$evm.log("info","(parent) miq_request_task:  = [#{stp_miq_request_task}]")

#############################################################
#### This is how you get the catalog items for the catalog bundle
#############################################################

stp_miq_request_tasks = stp_task.miq_request_tasks
#$evm.log("info","(children) miq_request_tasks count:  = [#{stp_miq_request_tasks.count}]")

#############################################################
#### By going through the children, you can set the dialog variable for each of the children (we based our values on the childrens service tags)
#############################################################

stp_miq_request_tasks.each do |t|

  $evm.log("info"," Setting dialog for: #{t.description}")
  service = t.source
  service_resource = t.service_resource
  #$evm.log("info"," Child service resource name: #{service_resource.resource_name}")
  #$evm.log("info"," Child service resource description: #{service_resource.resource_description}")

  service_tag_array = service.tags(:app_tier)
  service_tag = service_tag_array.first.to_s

  memory_size = nil

#############################################################
#### The dialog_service_type is the attribute set on the service dialog
#### We use the service_tag to decide what child gets what dialog
#############################################################

  case dialog_service_type
  when "Small"
    case service_tag
    when "app"
      memory_size = 1024
    when "web"
      memory_size = 1024
    when "db"
      memory_size = 4096
    else
      $evm.log("info","Unknown Dialog type")
    end
  when "Large"
    case service_tag
    when "app"
      memory_size = 4096
    when "web"
      memory_size = 4096
    when "db"
      memory_size = 8192
    else
      $evm.log("info","Unknown Dialog type")
    end
  else
    $evm.log("info","Unknown Dialog type - setting Dialog options here")
  end

#############################################################
#### set_dialog_option sets the dialog for the child
#############################################################

  t.set_dialog_option('memory',memory_size) unless memory_size.nil?
  $evm.log("info","Set dialog for selection: [#{dialog_service_type}]  Service_Tier: [#{service_tag}] Memory size: [#{memory_size}]")

end
#
#
#
$evm.log("info", "Automate Method ConfigureChildDialog Ended")
exit MIQ_OK

5.3.2. Creating a Method in the Service Class

Service methods have been split based on purpose.

  1. Navigate to AutomateExplorer.
  2. Service Class is located at DOMAINServiceProvisioningStateMachinesMethods and DomainServiceRetirementStateMachinesMethods.

    Note

    DOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.

  3. Click the Methods tab.
  4. Click 1847 (Configuration), then 1862 (Add a New Method).
  5. Enter a Name and Display Name.
  6. In the Data field, enter the method contents.
  7. Click Validate and wait for your data entry to be successfully validated.
  8. Click Add. 6297

5.3.3. Creating an Instance in the Service Class

  1. Navigate to AutomateExplorer.
  2. Service Class is located at DOMAINServiceProvisioningStateMachinesMethods and DomainServiceRetirementStateMachinesMethods.

    Note

    DOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.

  3. Click the Instances tab.
  4. Click 1847 (Configuration), then 1862 (Add a new Instance).
  5. Enter a Name and Display Name.
  6. In the Fields area, enter the method’s name in Value.
  7. Click Add.

The instance is created so that it can be called from the ServiceProvision class.

6298

Note

After the method has been created, it must be mapped to an instance in the DOMAIN/Service/Service/Provisioning/StateMachines class. The name of the instance must be specified as the Entry Point. This method must be called before the provision job begins.

5.3.4. Associating a Method with an Automate Instance

Service methods have been split based on purpose.

  1. Navigate to AutomateExplorer.
  2. From the accordion menu, click the required service method.
  3. Service Class is located at DOMAINServiceProvisioningStateMachinesMethods and DomainServiceRetirementStateMachinesMethods.

    Note

    DOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.

  4. Either create a new instance or select the clone_to_service instance.
  5. Click 1847 (Configuration), then 1851 (Edit Selected Instance).
  6. In the configurechilddialog value, put the path to the method.
  7. Click Save or Add if you are adding this to a new instance.

5.4. Catalogs

Catalogs are used to create groups of virtual machines or instances for provisioning. For example, a complete package of a database server, desktop with specialized software already on it, and a firewall. You will need to complete the following steps to create and provision a service catalog.

  1. Create Catalog Items for each virtual machine or instance that will be part of the service.
  2. Create a Service dialog. For example, create a dropdown with three options small, medium, and large.
  3. Create a method for the Service Dialog. This method defines what each of the options means to each of the individual virtual machines or cloud instances for the service. This method is called from a service provisioning instance in the Automate model.
  4. Create an instance in the DOMAIN/Service/Provisioning/StateMachines/ServiceProvision_Template class that calls the method.

    Note

    DOMAIN must be a user-defined Domain and not the locked ManageIQ Domain. If necessary, you can copy the class from the ManageIQ domain into a custom domain.

  5. Associate method with Automate instance.
  6. Create a Catalog Bundle, adding each of the catalog items to it. Select the Service Dialog you created. Use the instance created in the DOMAIN/Service/Provisioning/StateMachines/ServiceProvision_Template class as the Entry Point. Check Display in Catalog box.
  7. Provision a service.

5.4.1. Creating a Catalog Bundle

  1. Navigate to ServicesCatalogs.
  2. Click the Catalog Items accordion.
  3. Click 1847 (Configuration), and then 1862 (Add a New Catalog Bundle).
  4. In Basic Info, enter a name and description: 2362
  5. Click Display in Catalog.
  6. Select the appropriate dialog name.
  7. Select the path to the appropriate ServiceProvision instance.
  8. Click on the Resources tab, then select the catalog items you want added to the bundle from the Add a Resource dropdown.
  9. Click Add.

A catalog bundle is created and visible in the Service Catalog accordion.

Note

You should also create and specify an Entry Point in the DOMAIN/Service/Provisioning/StateMachines/Methods/CatalogBundle class for each catalog item that is part of a bundle. If you do not, then the pre and post provision processing will occur for each item in the bundle in addition to processing for the Catalog Bundle. To set the entry point, go into each Catalog Item and check Display in Catalog. Then, you will see the Entry Point field.

5.4.2. Creating a Catalog Item

Create a catalog item for each virtual machine or cloud instance that will be part of the service.

  1. Navigate to ServicesCatalogs.
  2. Click the Catalog Items accordion.
  3. Click 1847 (Configuration), and then 1862 (Add a New Catalog Item).
  4. Select the Catalog Item Type you are adding. This list only shows items related to providers available or options activated in the appliance (for example, Ansible Playbook is available as a Catalog Item Type option if the Embedded Ansible server role is enabled on the appliance).
  5. In the Basic Info subtab:

    1. Type a Name/Description.
    2. Check Display in Catalog to edit Catalog, Dialog, and Entry Point(NS/Cls/Inst) options.

      1. Provisioning Entry Point (Domain/NS/Cls/Inst) requires you to select an Automate instance to run upon provisioning.
      2. Retirement Entry Point (Domain/NS/Cls/Inst) requires you to select an Automate instance to run upon retirement. Catalogitem statemachine

        Note

        The entry point must be a State Machine since the Provisioning Entry Point list is filtered to only show State Machine class instances. No other entry points will be available from the Provisioning Entry Point field.

        Note

        You can only choose from the catalogs and dialogs you have already created. If you haven’t done so, leave the values blank and edit later.

  6. In the Details subtab, write a Long Description for the catalog item.
  7. In the Request Info subtab, select provisioning options that apply to the provider chosen. For more information, refer to Section 2.8, “Provisioning Virtual Machines” and Section 2.9, “Provisioning Instances”.
  8. Click Add.

5.4.3. Creating a Generic Catalog Item

Create generic catalog items for services non-specific to virtualization or cloud environments. This catalog item type can serve a wide array of needs, from creating a vLAN across a network to accessing virtual machine IP addresses and adding them to a load balancer pool.

  1. Navigate to ServicesCatalogs.
  2. Click the Catalog Items accordion.
  3. Click 1847 (Configuration), and then 1862 (Add a New Catalog Item).
  4. Select Generic from the Catalog Item Type list.
  5. In the Basic Info subtab:

    1. Type a Name/Description.
    2. Check Display in Catalog to display the item in the catalog. A Dialog will be required if you select Display in Catalog.
    3. Choose a Catalog to which to add the new item.
    4. Select a Dialog from the available options.
    5. Choose a Subtype from the list menu.
    6. Add Entry Point(NS/Cls/Inst) options.

      1. Provisioning Entry Point (Domain/NS/Cls/Inst) requires you to select an Automate instance to run upon provisioning.
      2. Retirement Entry Point (Domain/NS/Cls/Inst) requires you to select an Automate instance to run upon retirement.

        Note

        The entry point must be a State Machine since the Provisioning Entry Point list is filtered to only show State Machine class instances. No other entry points will be available from the Provisioning Entry Point field.

  6. In the Details subtab, write a Long Description for the catalog item.
  7. Click Add.

5.4.4. Creating an Ansible Playbook Service Catalog Item

Create a catalog item that uses an Ansible Playbook to back it.

Note
  • Before creating an Ansible service, at least one repository, one playbook, and one credential must exist in the Red Hat CloudForms inventory. Check your inventory and add the appropriate resources before creating an Ansible service. For more information, see Automation Management Providers in Managing Providers.
  • Debugging verbosity is available for Ansible playbook catalog items. Selecting a higher verbosity value provides more detailed output as the playbook executes. 0 (Normal) is the default value. 1 (Verbose) will yield return data while a value of 3 (Debug) provides connection attempt and task invocation details. Higher levels, such as 4 (Connection) can be useful for debugging SSH connections. Use 5 (WinRM Debug) when debugging WinRM connections.
  • Using Ansible playbooks to populate dynamic dialog fields is not recommended due to delay times caused by the overhead of interaction between systems.
  • Only users with administrator privileges can run a service dialog based on a playbook.
  1. Navigate to ServicesCatalogs.
  2. In the Catalog Items accordion, click on the All Catalog Items.
  3. Click 1847 (Configuration), then 1862 (Add a New Catalog Item).
  4. Select Ansible Playbook from the Catalog Item Type drop-down list.
  5. Type a Name and Description for the new service catalog item.
  6. Click Display in Catalog.
  7. Select the appropriate Catalog from the drop-down list.
  8. In the Provisioning tab, set parameters for your catalog item to use by configuring a Playbook to back your service item:

    1. Choose a Repository from the drop-down list.
    2. Select the Ansible Playbook to use.
    3. Assign the appropriate Machine Credentials from the drop-down list.
    4. Add Cloud or Network Credentials from the drop-down lists.
    5. Choose the Host against which to run the service item.
    6. Set the Max TTL in minutes. The Time To Live (TTL) field allows you to set the maximum execution time for the playbook to run.
    7. Use the Escalate Privilege toggle switch to enable user privilege escalation if called for in credentials during the playbook run.
    8. Choose a Verbosity value to set the debug level for playbook execution.
    9. Add key value pairs for Variables and their corresponding Default Values.
    10. In the Dialog options, choose an existing dialog from the Use Existing drop-down list or select Create New to add a new dialog.
  9. In the Retirement tab, set parameters for your catalog item to use by selecting values for the following:

    1. Choose a Repository from the drop-down list.
    2. Select the Ansible Playbook to use.
    3. Assign the appropriate Machine Credentials from the drop-down list.
    4. Add Cloud or Network Credentials from the drop-down lists.
    5. Choose the Host against which to run the service item.
    6. Set the Max TTL in minutes. The Time To Live (TTL) field allows you to set the maximum execution time for the playbook to run.
    7. Use the Escalate Privilege toggle switch to enable user privilege escalation if called for in credentials during the playbook run.
    8. Choose a Verbosity value to set the debug level for playbook execution.
    9. Add key value pairs for Variables and their corresponding Default Values.
    10. In the Dialog options, choose an existing dialog from the Use Existing drop-down list or select Create New to add a new dialog.
  10. Click Add.

5.4.5. Creating an Ansible Tower Service Catalog Item

Create a service catalog item from an Ansible Tower template you can use to execute an Ansible Tower playbook in Red Hat CloudForms.

Important

You must first create the job template in Ansible Tower. The job templates are automatically discovered by CloudForms when refreshing your Ansible Tower provider’s inventory.

First, create a catalog:

  1. Navigate to ServicesCatalogs.
  2. Click Configuration (Configuration), then Add a New Catalog (Add a New Catalog)
  3. Enter a Name and Description for the catalog.
  4. Click Add.

Then, create an Ansible Tower service catalog item:

  1. Navigate to AutomationAnsible TowerJobs.
  2. Click Ansible Tower Job Templates and select an Ansible Tower job template.
  3. Click Configuration (Configuration), then Create Service Dialog from this Job Template (Create Service Dialog from this Job Template).
  4. Enter a Service Dialog Name (for example, ansible_tower_job)and click Save.
  5. Navigate to ServicesCatalogs. Click Catalog Items.
  6. Click Configuration (Configuration), then Add a New Catalog Item (Add a New Catalog Item) to create a new catalog item with the following details, at minimum:

    • For Catalog Item type, select Ansible Tower.
    • Enter a Name for the service catalog item.
    • Select Display in Catalog.
    • In Catalog, select the catalog you created previously.
    • In Dialog, select the service dialog you created previously (in this example, ansible_tower_job). No Dialog can be selected if the playbook does not require extra variables from the user. To ask the user to enter extra information when running the task, Service Dialog must be selected.
    • In Provider, select your Ansible Tower provider. This brings up the Ansible Tower Job Template option and configures the Provisioning Entry Point State Machine automatically.
    • Add configuration information for Reconfigure Entry Point and Retirement Entry Point as applicable.
    • Select your desired Ansible Tower Job Template from the list. Generally, this is the Ansible Tower job template previously used to create the service dialog.
  7. Click Add. The catalog item you created will appear in the All Service Catalog Items list.

5.4.6. Creating an Amazon Service Catalog Item

Use the following procedure to create an Amazon catalog item. Once created, the catalog item and service dialog combine with all of the options in the provisioning dialog. Users can then order Red Hat Enterprise Linux instances from the Service Catalog in the CloudForms Service user interface.

  1. Navigate to ServicesCatalogs, then click on the Catalog Items accordion.
  2. Click 1847 (Configuration), then 1862 (Add a New Catalog Item).
  3. Select Amazon from the Catalog Item Type list.
  4. Enter the basic details in the Basic Info tab:

    1. Enter a Name and Description for the new service catalog item.
    2. Select Display in Catalog.
    3. Select the appropriate catalog from the Catalog list.
    4. Select the appropriate service dialog from the Dialog list.
  5. Click the Request Info tab to enter request details:

    1. On the Catalog tab, select your Amazon AWS image name from the Name list, and the number of instances from the Count list. The VM Name will be overwritten during the provisioning process, but you can enter it as changeme for now.
    2. On the Properties tab, select T2 Micro from the Instance Type list, and Basic or Advanced for CloudWatch. If you plan to access the instance, select a Guest Access Key Pair, too.
    3. On the Customize tab, set the Root Password under Credentials, then select the Basic root pass template as a script for cloud-init under Customize Template.
  6. Click Add.

5.4.7. Creating an Azure Service Catalog Item

Use the following procedure to create an Azure catalog item.

  1. Navigate to ServicesCatalogs, then click on the Catalog Items accordion.
  2. Click 1847 (Configuration), then 1862 (Add a New Catalog Item).
  3. Select Azure from the Catalog Item Type list.
  4. Enter the basic details in the Basic Info tab:

    1. Enter a Name and Description for the new service catalog item.
    2. Select Display in Catalog.
    3. Select the appropriate catalog from the Catalog list.
    4. Select the appropriate service dialog from the Dialog list.
  5. Click the Request Info tab to enter request details:

    1. On the Catalog tab, select your Azure image name from the Name list, and the number of instances from the Count list. The VM Name will be overwritten during the provisioning process, but you can enter it as changeme for now.
    2. Select appropriate Environment settings that are known to work for your Azure environment.
    3. On the Customize tab, set the Username and Password under Credentials, then select the appropriate script under Customize Template.
  6. Click Add.

5.4.8. Creating an OpenShift Template Catalog Item

Note

Before adding a new catalog item for container template provisioning, create a service dialog from a container template. See Section 5.2.3, “Creating a Service Dialog from a Container Template” for details.

Complete the following procedure to create an OpenShift Template catalog item.

  1. Navigate to ServicesCatalogs, then click on the Catalog Items accordion.
  2. Click 1847 (Configuration), then 1862 (Add a New Catalog Item).
  3. Select OpenShift Template from the Catalog Item Type list.
  4. Enter a Name and Description for the new service catalog item. Select Display in Catalog.
  5. Select the appropriate catalog from the Catalog list.
  6. From the Dialog list, select the service dialog you have created from a container template.
  7. Select your provider from the Provider list.
  8. Set the Provisioning Entry Point.
  9. Click Add.

5.4.9. Creating an Orchestration Catalog Item

Use the following procedure to create an Orchestration catalog item.

  1. Navigate to ServicesCatalogs and select Catalog Items in the accordion menu.
  2. Click Configuration Configuration, then click Green_Plus_Sign Add a New Catalog Item. The Adding a new Service Catalog Item window is displayed.
  3. Select Orchestration from the Catalog Item Type list.
  4. Enter the basic details in the Basic Info:

    1. Enter a Name and Description for the new service catalog item.
    2. Select Display in Catalog box.
    3. Select the appropriate catalog from the Catalog list.
    4. Select the appropriate dialog from the Dialog list.
    5. Select the Orchestration Template from the list.
  5. Click Add.

5.4.10. Provisioning a Service

  1. Navigate to ServicesCatalogs.
  2. Click the Service Catalogs accordion, and select the service to provision.
  3. Click Order.

The parameters are passed to the children based on the method tied to the choices made in the dialog.

5.5. Orchestration Stacks

Cloud orchestration is a service that allows you to create, update, and manage cloud resources and their software components as a single unit and then deploy them in an automated, repeatable way through a template. Templates use a human-readable syntax and can be defined in text files, thereby allowing users to check them into version control. Templates allow you to easily deploy and reconfigure infrastructure for applications within your cloud. A user can author the stack templates, or can upload them from other sources.

Red Hat CloudForms supports adding Amazon CloudFormation, OpenStack Heat, Microsoft Azure, VNF, and VMware vApp template type, and provides the ability to:

  • Inventory stacks and elements of each type into the CloudForms VMDB.
  • Model the relationships of instances to their stacks, inclusive of the user interface. For example, selecting an instance within a region that is within a stack, the user interface shows this on the standard instance view.
  • Model the stack and its elements in the user interface.
Note

When importing a template into CloudForms, the selected elements are converted according to their type. For example, lists convert to list boxes, and single items convert to text boxes.

See Service Provisioning in CloudForms Using an Orchestration Template for an example about creating a service in CloudForms for provisioning virtual machine instances using an AWS CloudFormation orchestration template.

5.5.1. Creating an Orchestration Template

Complete the following procedure to add an orchestration template.

  1. Navigate to ServicesCatalogs and select Orchestration Templates in the accordion menu.
  2. Click Configuration Configuration, then click Green_Plus_Sign Create a new Orchestration Template.
  3. Enter a Name and Description for your template.
  4. Select the template type from the Template Type list. The default is Amazon CloudFormation.
  5. Select Draft to create a draft template.
  6. Add your template in the area below for the selected Template Type.
  7. Click Add.

5.5.2. Editing Orchestration Templates

Complete the following procedure to edit orchestration templates.

  1. Navigate to ServicesCatalogs and select Orchestration Templates in the accordion menu.
  2. Select the orchestration template you want to edit from the All Orchestration Templates list.
  3. Click Configuration Configuration, then click Edit_Sign Edit this Orchestration Template.
  4. Edit the template as needed.

    Note

    You can only edit the name and description of a read-only template as there can be stacks associated with the template.

  5. Click Save.

5.5.3. Copying Orchestration Templates

Complete the following procedure to copy an orchestration template to create a new template.

  1. Navigate to ServicesCatalogs and select Orchestration Templates in the accordion menu.
  2. Click Configuration Configuration, then click Copy Copy this Orchestration Template.
  3. Change the Description and the actual content of the template as required. CloudForms automatically prefixes Copy of to the old template Name.

    Note

    To create a copy of an orchestration template into a new template, the old and new template content must differ.

  4. Click Add.

5.5.4. Deleting Orchestration Templates

Complete the following procedure to delete orchestration templates.

  1. Navigate to ServicesCatalogs and select Orchestration Templates in the accordion menu.
  2. Select the orchestration template you want to delete from the All Orchestration Templates list.
  3. Click Configuration Configuration, then click Delete Remove this Orchestration Template from Inventory.
  4. Click OK.
Note

Read-only templates cannot be deleted.