How to add a parameterized configuration file to a component template

This topic was edited by a BMC Contributor and has not been approved.  More information.

The more you work with component templates and your environment, the more you become aware of what you need to track, remediate, and possibly eliminate. This section describes how to refine the objects in a component template, also known as the Parts.

Adding parts to a component template

The following example presents the basic steps for adding parts to a component template.

  1. Open your component template and choose the Parts tab. Then click Add and select the part to add.
    In this example we are adding a specific WAR file, and also a related Windows Service.

  2. Click the Snapshot/Audit tab. For each part that you added in the previous step, validate what you want to capture as part of the Snapshot and Audit.
    In the example below, we selected Contents, which means Take a full backup of this object. This ensures that if someone changes this file, we can remediate it with the file in the Snapshot. Otherwise, we would only be able to remediate the file permissions and ownerships, which might not be sufficient.

Adding configuration files

Sometimes you might care about a specific entry within a file, but not about the entire contents of a file. In the example below, the database.properties file contains a set of configuration entries for JPetStore. BMC Server Automation parses this file and treats every entry within the file as its own separate configuration object.

Because this configuration file is specific to JPetStore, we will define the configuration object within the component template. This is instead of defining the configuration file within the Configuration Object Dictionary, which would associate the configuration file with every server of a particular operating system.

  1. Within the component template, click the Local Configuration Objects tab. To add a new object, click Add , select Configuration File and click Next.

  2. Browse to the database.properties file on a server and click OK.

  3. Because the JPetStore path is parameterized, we want to parameterize the configuration file, as well. To parameterize, insert a property into the path to the file.

  4. Select the appropriate grammar file for parsing the file, and then click Finish.
    The grammar file determines how to separate each entry within the file into a unique object, and must match the formatting of your file.


    The custom Configuration File object is displayed within the JPetStore component template.

  5. Include the configuration file as a part within the component template. On the Parts tab, add the Local Config File and click OK. Then save the Component Template.

Was this page helpful? Yes No Submitting... Thank you

Comments