Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Parameterizing BLPackages by adding local properties


Parameterization allows you to deploy the same BLPackage with different configurations. For example, if you have an Apache HTTP package, you may have requirements to install the web server on different ports. Instead of creating multiple BLPackages for each potential HTTP port, you can create a single Apache HTTP package with a local property that modifies the listening port for the web server. BLPackage parameterization give you the flexibility to deploy applications with specific configurations without creating additional management sprawl.

This topic includes the following sections:

For BMC Server Automation documentation related to this topic, see:

Before you begin

Use BMC Server Automation to create a BLPackage that installs an application on a target virtual machines. A BLPackage can include installers, files, configuration objects, and so on.

Before you can parameterize the BLPackage, you must determine the required steps to configure your application. For this example, we are going to create a local property called HTTP_PORT. This property is going to be used to configure the HTTP "Listen" port that the web server uses to communicate. In our example, we are going to configure this value by modifying the httpd.conf file.

To parameterize BLPackages by adding local properties

  1. Log in to BMC Server Automation.
  2. Click Depot.
  3. Open the BLPackage that requires a local property for editing.
    BLPackage.png
  4. Click the Local Properties tab to add a local property to the BLPackage. In this example, HTTP_PORT is used.
  5. Click Add g_V95_AddIcon16.gif.
  6. Define the local properties that are used to parameterize the BLPackage. For example, you can add a local property called HTTP_PORT that you will use with a service blueprint.
    LocalProperty.png

    Note

    The name you assign to the local property must exactly match the name in the service blueprint.

    In the example shown above, HTTP_PORT has a default value of 80. When end-users request an offering from the Service Catalog, they can change the default HTTP port from 80 to the port number they require.

  7. Use the local properties as parameters you can pass in to the deployment of your application.
    1. If the required object (file, configuration setting, registry key) does not already exist in the BLPackage, you must first import that server object into the BLPackage.
    2. Parameterize the file by editing the BLPackage (for example, changing the object attributes).
  8. Click the Package tab.
  9. Select the new server object that you imported into the BLPackage.
    HTTP_PORT.png
  10. Create a BLPackage Deploy Job that deploys the BLPackage that you parameterized.
    BLDeployJob.png
  11. You must create the job in the CSM_Applications subfolder of the Jobs folder. You can click the Package tab to view the local properties that you parameterized. Make sure the BMC Cloud Lifecycle Management administrator knows these parameters.
  12. Set the following extended properties in the BLPackage Deploy Job:
    • PRODUCT_MANUFACTURER
    • PRODUCT_NAME
    • PRODUCT_VERSION
      These values are written to the Prouct Catalog and you can find them later when adding software packages to the service blueprint.
  13. Execute the Publish Product Catalog Job to update the Product Catalog with your new object.
    BBSA5.gif All the Deploy Jobs where you set the PRODUCT_MANUFACTURER, PRODUCT_NAME, or PRODUCT_VERSION properties in the CSM_Application folder are published to BMC Cloud Lifecycle Management cloud database.

    Note

    A Publish Product Catalog Job is automatically created during installation in the CSM_Publish_Product_Catalog folder.

    You can ignore warnings about Patch Catalog and Compliance templates.

You now can use this parameterized BLPackage by adding it to an application in a service blueprint.

Note

A service blueprint parameter name must exactly match the name of a BLPackage's local property.

For more information about using parameters in a BLPackage, see Configuring-service-blueprint-parameters, especially To configure parameters. For more information about adding applications to a service blueprint, see Creating-copying-or-editing-a-service-blueprint, especially To add and define applications in a service blueprint.

To import assets

These steps continue the Apache server example by showing you how to select the server objects you want to include inside the BLPackage and then editing it (for example, changing the object attributes). It assumes that you have already created the local properties in the BLPackage.

  1. Open the BLPackage.
  2. Click the Package tab.
  3. From BLPACKAGE, select BLPackage > Import Assets to open the Import wizard.
  4. Select Live server objects and then click Next.
  5. Add a server object by clicking New.gif.
  6. Navigate to the live server that contains the server objects that you want to bundle with the BLPackage.
    ImportPackageType3.gif
    In this example, you navigated to the live Apache server apache-7.
  7. Click Configuration and then navigate to the server object to bundle with the BLPackage (for example, the specific ServerAdmin value instead of the entire configuration file).
    Listen.png
    In addition to a configuration file, other live server objects you can import are an executable installer, a granular setting of a configuration file, the state of a windows service, and so on.
  8. Click OK.
  9. Click Finish.
     The assets are now imported into the BLPackage.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*