BRPM Automation - BSA - bsa_execute_action

Version 2
    Share This:

    BRPM Automation Info
    Name: bsa_execute_action
    Type: Automation
    RPM Compatible Version: 4.3 and higher
    Version: 1.0
    Integration type: BAA/BSA

    Created by: Fred Breton

    action.jpgThis automation allows to select an action that is in fact a BlPackage and then to deploy this package to all targets of an environment for a specific blueprint. The list of action provided is the list of package found in Depot/BRPM/Actions/<blueprint name> in BSA .

    In Bladelogic side, an environment is a component group that contain components representing the available services for this environment that will be needed for the application (like tomcat, MySQL, etc...). To be recognize as an environment, a component group needs to have its property DESCRIPTION set to Environment.

    A Blueprint is represented in Bladelogic side as a component template. To be recognized as a Blueprint a component template needs to have its property DESCRIPTION set to Blueprint.

    You can see an example of usage of this automation in this demo video.

    The field that you need to complete to use this automation are the following:execaction.jpg

    1. Target environment: The environment name of the targeted environment, can be inherited from the environment associated with the request
    2. Target blueprint: The blueprint type on which the package has to be deployed in the targeted environment, can be inherited from the value provided by parameter Blueprint of the component associated with the step.
    3. Required parameters:  It display the parameters for which you have to provide value in "Action parameters" field. Those are local parameters of the blpackage that represent the action that are not mapped with parameters of the same name coming from request environment or from targeted BSA component.
    4. Action parameters: free text field to provide value to parameters, typically value to parameters displayed in "Required parameters" field. Syntax is PARAMNAME1=value1, if you need to setup several parameters, then the separator between param=value couple is |
      If you put a parameter that is already mapped with a BSA component property or a BRPM request environment property, then the value that will be use is the one provided in "Action parameters" field.
    5. Job folder: Bladelogic job folder where to store the generated deploy job.
    6. Deploy option: allows setup option for the deploy job


    In the text field, it is possible to use value coming from BRPM parameters. The syntax to call a value from a parameter is rpm{parameter_name}. This is useful do define request template that can generate request without need of then changing content of the steps.

    Remark on usage: With some BRPM version, after you selected value for "Target_Blueprint" and "Action" field, "Required_parameters" may not display anything. You need to save the step, then reopen it, put Target_Blueprint to "select", then to the value you previously selected. Action and Required_parameters will then be refreshed properly (can take 1min).

    You need to create an integration server pointing to your BladeLogic server to point the API (if not already done). FromSystem > Integrations, click Create new Integration at the right side of your screen:

      Server Name:  <up to you>  Server URL:   <BladeLogic Webservice url; example: https://bl-appserver:9843>  Username:     <BLadeLogic user>  password:     <password of previously defined user>  Details: role: <role you want to use; example BLAdmins>  authentication_mode: <example: SRP>

    If you want to create a new automation category for BSA associated resource automation and automation follow the documentation Managing automation categories.Instruction for importing the resource automation:autom.jpg

    1. Click on the link bsa_execute_action.rb to download the resource automation
    2. Copy the file to your BRPM server in
      <BRPM install dir>/WEB-INF/lib/script_support/
      LIBRARY/resource_automation/<automation category> before 4.4 and from BRPM version 4.4, <BRPM install dir>/lib/script_support/
      LIBRARY/automation/<automation category>
      Automation category is one you may have created (requirements) and you may need to create the associated directory, or one already existing.
    3. From the BRM Console you need to import the resource automation, Environment -> Automation, click on Import scripts from Library on the right top of the screen.
    4. Select the integration server (the BAA/BSA server you'll connect to), to use as -> Automation, and the Category in which you've classified your resource automation.
    5. A list of non already imported resource automation should appear. Check the box associated with the script you want to import. Click import button.


    The following files that are script libraries that need to have been copied on <BRPM install dir>/WEB-INF/lib/script_support folder of your BRPM server:  bsa_utilities.rb and script_helper.rb (the last one replacing the file provided with the product) . After those files have been added to the environment, you need to restart BRPM. The following resource automations need to have been loaded in the same automation category that the one you plan to load the automation:

    1. bsa_getenvironment.rb -> BRPM Automation - BSA - bsa_getenvironment
    2. bsa_targetblueprint.rb -> BRPM Automation - BSA - bsa_targetblueprint
    3. bsa_getaction -> BRPM Automation - BSA - bsa_getaction
    4. bsa_requiredpackageproperties -> BRPM Automation - BSA - bsa_requiredpackageproperties
    5. bsa_deployphases.rb -> BRPM Automation - BSA - bsa_deployphases
    6. bsa_deployjob_folders.rb -> BRPM Automation - BSA - bsa_deployjob_folders


    Because of ressource automation 4, BSA needs to have added command on its web service and that require to install on BSA the following content:Blade ZipKit - WebServices CLI - ListBlPackageLocalProperties



    *Note: This is a community supported content