BMC BladeLogic Server Automation 8.1.x
BMC Release Process Management allows you to integrate and use BMC BladeLogic Server Automation version 8.1.x for your own automation processes.
BMC BladeLogic Server Automation is a fully integrated and automated solution for configuring and maintaining end-user systems, applications, and operating systems according to user roles and your corporate policies, with full verification.
After you install the BMC Release Process Management product, access to automation and integration settings for BladeLogic Server Automation is disabled by default. To make BladeLogic Server Automation accessible from BMC Release Process Management, activate the BMC BladeLogic tab, configure the server settings for BMC BladeLogic Server Automation, and create the prerequisites for starting the BMC BladeLogic Server Automation server so you can start BMC BladeLogic Server Automation version 8.1.x directly from BMC Release Process Management.
After performing the necessary configuration, you can start using automation scripts. You can import scripts that are supplied with the application or you can create your own automation scripts.
To use BMC BladeLogic Server Automation version 8.1.x integration, complete the following actions:
To activate the BMC BladeLogic tab
- Log on to BMC Release Process Management as a user having the appropriate access permissions.
For more information about user roles and access permissions, see Administering-users-roles-and-access-permissions. - Go to System > Settings > General.
- In the Module Automation section, select the Enable BladeLogic Automation check box.
- Click Save.
In the Environment tab, the BMC BladeLogic tab appears.
To configure the server settings for BMC BladeLogic Server Automation
- Log on to BMC Release Process Management, and then go to Environment > BMC BladeLogic.
- Click Show BladeLogic Authentication.
Settings for BMC BladeLogic Server Automation appear. - Enter values for the following parameters of your BMC BladeLogic Server Automation server:
- IP Address: Specify the IP address of the BMC BladeLogic Server Automation server.
- User name: Specify the user name to connect to the BMC BladeLogic Server Automation server (for example, BLAdmin).
- Password: Specify the password to connect to the BMC BladeLogic Server Automation server.
Role Name: Specify the role name of the user that you specified in the User name field.
Profile Name: Specify the authentication profile name that you configured in the BMC BladeLogic Server Automation Console.
- Click Save.
To create the prerequisites for starting BMC BladeLogic Server Automation server
- Ensure that BMC BladeLogic Server Automation RCP client is installed on the BMC Release Process Management server.
For information about installing the BMC BladeLogic Server Automation RCP client, see . - Depending on your platform, modify the bljythonexe.cfg file or the bljythonfile to include the jython path:
Unix: /opt/bmc/BladeLogic/8.1/NSH/br/bljython*
-Dpython.path=$BLADELOGIC_HOME/br/jython \
\\ \\
$JAVA_HOME/bin/java -Xmx256m $JVM_ARGS -Dpython.home=$JYTHON_HOME \
-Dblx.cmrootdir=$BLADELOGIC_HOME/br \
-Dpython.path=$BLADELOGIC_HOME/br/jython \
-Dcom.bladelogic.cli.xmldir=$BLADELOGIC_HOME/br/xml/cli \
org.python.util.jython "${@}"Windows: C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br\bljythonexe.cfg
java.mainclass=org/python/util/jython
java.classpath=C:\BRPM\lib\jython\jython.jar
java.classpath=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br
java.classpath=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br\stdlib
java.classpath=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br\deployments
java.classpath=<default>
jvm.arg=-Xmx1024M
jvm.arg=-Dblx.cmrootdir=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br
jvm.arg=-Dpython.path=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br\jython
jvm.arg=-Dcom.bladelogic.cli.xmldir=C:\Program Files\BMC Software\BladeLogic\8.1\NSH\br\xml\cli
- Create a BMC BladeLogic Server Automation profile.
For example: C:\Windows\system32>blcred authprofile -add -profile Profile1 -host hostname:9840 -type srp Acquire profile credentials by using the system user or by downloading or copying PSEXEC so that you can run commands as a system user.
File location: C:\Windows\system32>blcred cred -acquire -profile Profile1 -username BLAdmin -password password
Sample commands:c:\>PsExec.exe -S cmd
\\ \\
PsExec v1.98 - Execute processes remotelyThe preceding code is Copyright (C) 2001-2010 Mark Russinovich
www.sysinternals.comC:\Windows\system32>blcred cred \-acquire \-profile Profile1 \-username BLAdmin \-password password
Authentication succeeded: acquired session credentialThe preceding code is from Microsoft Windows Version 6.1.7601, copyright (C) 2009 Microsoft Corporation. All rights reserved.
- Go to <RLM_Home>\releases\<Current_Version>\RPM\lib\script_support\, and open the bl_login file in a text editor.
Verify the BMC BladeLogic NSH installation path in the following line:
l_install_dirs = (['/opt/bmc/BladeLogic/8.1/NSH'])- If needed, change the default NSH installation path to your current NSH installation path and save your changes.
- In command line, set the path for the BMC BladeLogic Server Automation directories as to your environment variable:
Windows
set PATH="%PATH%;<BladeLogic_Home>\8.1\NSH\br;<BladeLogic_Home>\8.1\NSH\binUnix
export PATH=$PATH:<BladeLogic Home>/8.1/NSH/br/:<BladeLogic Home>/8.1/NSH/bin
To create custom automation scripts
- From BMC BladeLogic tab, click Create Automation on the right.
- On the scripts page, type a name for your script in the Name field and type a description in the Description field.
- Write your script in the Script field.
- Click Add script.
To import scripts from the library
- From the BMC BladeLogic tab, click Import from library.
- Select the check boxes for the necessary scripts.
- Click Import.
The following automation scripts are available for integrating with BMC BladeLogic Server Automation version 8.1.x:
Script to import from the library | Description |
---|---|
bl_create_component.py | None |
bl_create_deploy_package.py | None |
bl_create_job.py | Creates a Job from a package and executes it and deploys it to the target servers selected in step Note: Remove any property dependency on the server selection. |
bl_create_package.py | None |
bl_create_package_job.py | None |
bl_createComponentInstance.py | Creates a a component template instance based on the server selected in the step |
bl_CreateDeployJob_comptarget.py | None |
bl_deploy_execute_job.py | None |
bl_execute_job.py | Executes a Deploy Job asynchronously |
bl_execute_job_and_wait.py | Executes a Deploy Job and waits for its completion |
bl_ExecuteJobWithApproval.py | None |
bl_list_depot_packages.py | Lists all packages in a group and optionally flags a target (if specified) |
bl_list_jobs.py | Lists all the Jobs |
bl_ListAllServers.py | Lists all the servers including all the servers in a group (if specified) |
bl_ListProperties.py | Lists properties from the global property dictionary in a given base class |
bl_ListPropertyInstances.py | Lists property instances from the global property dictionary in a given base class |
bl_package_template.py | None |
bl_property_explorer.py | None |
bl_runCLI_command.py | Runs an arbitrary CLI command |
bl_set_active_server.py | None |
bl_set_items_example.py | Demonstrates the set directives in BMC Release Process Management for properties, servers, and components |
bl_setPropertyInstanceValue.py | Sets an instance value in the global property dictionary for a given base class and property |
bl_updateInstanceValue.py | None |
bladelogic_sync_servers.py | Adds servers from a BMC Server Automation group to BMC Release Process Management |