Previous Topic: Execute Commands

Next Topic: Deploy CA ITCM Software Packages or Groups


Create and Update Files

Many applications reference configuration files when they execute. The application definition enables you to create and update files as part of the definition.

Follow these steps:

  1. Click Resources, and in the Explore tree, select Applications. In the Applications pane, click the tool icon for the application to Edit.
  2. Select the Installation Actions tab.
  3. Click + (Add).

    The Define Action wizard opens in the Select Installation Action panel.

    Note: If you are adding actions during Define Applications, start from this step.

  4. Select Create File or Update File from the Action drop-down list.
  5. Input the file name, and for the Create File option specify the File Format.
  6. (Optional) Click Username to specify user credentials to use when executing the action.

    Note: This option enables user-restricted actions during service provisioning. The primary use case is to enable clustered application deployment using domain user credentials.

  7. Add a description, modify the supported operating systems for the specified file as required, and click Next.

    The Define Installation Action Options panel opens.

    Note: Specifying supported operating systems for actions as well as applications enables you to define separate OS-specific actions. An action only executes when an application deploys to the specified operating systems for the action. For example, define an application that supports Windows and Linux, and specify separate .bat and .sh actions for Windows and Linux respectively.

  8. To add parameters to a file for the create file action, click the Add icon:
    1. Specify an Action Parameter to add to the file.
    2. Specify a Default Value for the action parameter.

      Note: Use the Value List to maintain a set of values for the parameter.

    3. (Optional) Select User Editable to indicate that the end user can input a value for the action parameter during the execution of the command. Specify a Label as the prompt the end user receives when an input is required.
    4. (Optional) Select Mandatory to specify that a user input is required.
    5. Click Finish.

    The wizard adds the parameter and value to the properties file. Repeat this step for each line in the file.

    Example: To Add an Editable Password to a Key-Value Properties File

    CA Server Automation adds password=changeit to the properties file. When users provision the service, CA Server Automation prompts them to input a password.

  9. To edit parameters in a file for the update file action, click the Add icon:
    1. Specify the text to replace in the Action Parameter input.
    2. Specify the new text in the Default Value input.

      Note: Use the Value List to maintain a set of values for the parameter.

    3. (Optional) Select User Editable to indicate that the end user can input a value for the action parameter during the execution of the command. Specify a Label as the prompt the end user receives when an input is required.
    4. (Optional) Select Mandatory to specify that a user input is required..
    5. Click Finish.

    The wizard replaces the specified text in the file with the new values. Repeat this step for each text string to replace.

    Example: To Specify a Wiki Name in a Generic Wiki Properties File

    CA Server Automation replaces instances of ###WIKINAME### in the properties file with the name of your Wiki site.

  10. Click Finish.

    The wizard adds the Action to the Action list in the Installation Actions panel.

  11. (Optional) Repeat steps 3 through 10 to add additional actions to apply during application execution. Use the up and down arrows to specify the order in which to execute actions.
  12. Click OK.

    Note: If you are adding actions during Define Applications, click Finish.

    CA Server Automation modifies the application definition to execute the defined actions when it is deployed during service provisioning.