BRPM Automation - BSA - bsa_generatepackage_deploy

Version 3
    Share This:

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

    Created by: Fred Breton


    This automation generate a Bladelogic package from the build of an application module and then deploy the package to the targets corresponding to a defined blueprint in the targeted environment. You can see an example of usage of this automation in this demo video.


    part.jpg

    This automation allows to generate a package from a component and then to deploy this package to all targets of an environment for a specific blueprint. The component has to come from a component template that contains a part that refers to a file type and that is parameterized as shown in the picture. The FILE_NAME property will get the value provided in Archive name field of the step and DEPLOY_DIR is setup in the component to the path where the build archive are pushed on the build server.


    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.

    With this automation, after the package has been created, it is then deployed to all Bladelogic components that are in the targeted environment and that are children of component template that is the targeted Blueprint.


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

    1. step.jpgBuilder: the component used to generate the package
    2. Archive name: the file name of the archive that contain the payload for the application module we want to package
    3. Package folder: the location where to store the generated package
    4. Package name: the name of the generated package
    5. Target environment: The environment name of the targeted environment, can be inherited from the environment associated with the request
    6. 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.
    7. Deploy option: allows setup option for the deploy job
    8. Job folder: Bladelogic job folder where to store the generated 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.

     

    Requirements


    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_generatepackage_deploy.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.

    Dependencies:

     

    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_componentbuilders.rb -> BRPM Automation - BSA - bsa_componentbuilders
    2. bsa_app_package_folders.rb -> BRPM Automation - BSA - bsa_app_package_folders
    3. bsa_getenvironment.rb -> BRPM Automation - BSA - bsa_getenvironment
    4. bsa_targetblueprint.rb -> BRPM Automation - BSA - bsa_targetblueprint
    5. bsa_deployphases.rb -> BRPM Automation - BSA - bsa_deployphases
    6. bsa_deployjob_folders.rb -> BRPM Automation - BSA - bsa_deployjob_folders

     

    There is also a dependency on BSA side: 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

    Community.jpg

    *Note: This is a community supported content