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:
- Adding a local property to a BLPackage
- Adding or modifying properties
- Software and BLPackage Deploy Job overview
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
This section provides high-level guidelines for creating a BLPackage Deploy Job. When you perform this procedure, you are creating software packages that you can use when defining an application in a service blueprint in BMC Cloud Lifecycle Management. Applications let you deploy software on VMs that you provision using the cloud.
Best practice: Because the BLPackage Deploy Job supports blueprint parameterization, BMC recommends that you create a BLPackage Deploy Job instead of using an application component template.
For detailed information, see the following topics in the BMC Server Automation online technical documentation:
- If you plan to create an application component template, use BMC Server Automation to create Software Deploy Jobs to install applications on target virtual machines.
To create a BLPackage Deploy Job
BMC Server Automation BLPackages can be used to install applications on target virtual machines.
A BLPackage is a collection of server assets, software packages, and an XML instruction set. A BLPackage can include installers, files, configuration objects, and so on. The BLPackage can also include parameterized property values among its server assets. The parameterized property values must match exactly the blueprint parameter values used by the service blueprint.
- Log on to BMC Server Automation.
- Click Depot.
- Open the BLPackage that requires a local property for editing.
- Click the Local Properties tab to add a local property to the BLPackage. In this example, HTTP_PORT is used.
- Click Add .
Define the local properties that are used to parameterize the BLPackage. For example, you can add a local property called
HTTP_PORTthat you will use with a service blueprint.
The name you assign to the local property must exactly match the name in the service blueprint.
In the example shown above,
HTTP_PORThas 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.
Use the local properties as parameters you can pass in to the deployment of your application.
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.
Parameterize the file by editing the BLPackage (for example, changing the object attributes).
Click the Package tab.
Select the new server object that you imported into the BLPackage.
Create a BLPackage Deploy Job that deploys the BLPackage that you parameterized.
Create the job in the CSM_Applications subfolder of the Jobs folder. Click the Package tab to view the local properties that you parameterized. Make sure the BMC Cloud Lifecycle Management administrator knows these parameters.
Set the following extended properties in the BLPackage Deploy Job:
PRODUCT_VERSIONThese values are written to the Product Catalog and can be found later when adding software packages to the service blueprint.
Execute the Publish Product Catalog Job to update the Product Catalog with the new object.
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.
All the Deploy Jobs where you set the
PRODUCT_VERSION properties in the CSM_Application folder are published to BMC Cloud Lifecycle Management cloud database.
You now can use this parameterized BLPackage by adding it to an application in a service blueprint.
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.
- Open the BLPackage.
- Click the Package tab.
- From BLPACKAGE, select BLPackage > Import Assets to open the Import wizard.
- Select Live server objects and then click Next.
- Add a server object by clicking .
- Navigate to the live server that contains the server objects that you want to bundle with the BLPackage.
In this example, you navigated to the live Apache server apache-7.
- Click Configuration and then navigate to the server object to bundle with the BLPackage (for example, the specific
ServerAdminvalue instead of the entire configuration file).
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.
- Click OK.
- Click Finish.
The assets are now imported into the BLPackage.