AO Peer One-hit Silent Installer Script

Version 6
    Share This:

    The script below can be used to perform a complete AO peer installation (e.g. AM, Repo, CDP, OCP) with a single command. This can be very useful for initial installation, testing different configurations, rebuilding test environments, or performing upgrades across multiple environments.


    This script also does the following:

    • Unsets the DISPLAY environment variable to avoid AWT errors with some Linux distros.
    • Creates a user under which to run the AO components (default is "orchestrator").
    • Changes ownership of all AO component files to the above user.
    • Sets each component to launch as the above user.
    • Creates symlinks into init.d.
    • Configures the start and stop priorities for chkconfig so the services start on boot.
    • Enables the use of the "service" command for starting and stopping components (e.g. "service baocdp stop").


    You must provide the fully configured silent install files for each component that you wish to install. Also note that once the CDP has been installed, you still need to manually create additional peers in Grid Manager before you can install them.


    Example silent installation scripts have been attached to this document as a zip file. The basic items that must be changed for your environment are marked with "##"; you may also wish to change other items such as port numbers.


    Update 22nd November 2017: The script still works with AO 7.9.x, though there's no support for installing an external RSSO automatically. You can use the embedded RSSO by setting the options files appropriately, or use an existing, external instance of RSSO. Also, we're still using the old SysV-style init scripts, where most recent Linux distros have moved to systemd. Getting the systemd unit files to work correctly needs a bit of work so, in the meantime, below is a very basic unit file if you're in dire need of one. Note that it doesn't handle unexpected service termination in a clever way and might require "systemctl stop baocdp" before a start in order to set the correct unit status.


    # Systemd unit file for Atrium Orchestrator CDP
    Description=BMC Atrium Orchestrator CDP
    ExecStart=/opt/bmc/BAO/CDP/bin/ start
    ExecStop=/opt/bmc/BAO/CDP/bin/ stop
    # Note: don't use the "RUN_AS_USER" in if the User and Group are set in this file


    This file is placed under /etc/systemd/system as, for example, baocdp.service and then run (as root or via sudo):

    systemctl enable baocdp
    systemctl start baocdp



    v1.01 (29th Feb 2012): If set, use IATEMPDIR to find the installation log-file

    v1.02 (16th Jul 2013): Explicitly use /sbin folder for service/chkconfig. Updated binary installer filename to latest 7.6.02 version.

    v1.03 (22nd Nov 2017): Hacky support for the default folders in 7.9 whilst keeping service names in lower-case.


    # Purpose: Automate the installation of multiple AO components on a single peer.
    # Author: Gordon Mckeown -
    # This script is provided "as is" with no warranty, expressed or implied.
    # Use at your own risk.
    # Version: 1.03
    AO_SILENT="-i silent"
    SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
    unset LAX_DEBUG
    unset DISPLAY
    if [ -z "$IATEMPDIR" ]; then
    installComponent() {
    # Parameters:
    #     $1 = Name of options file
    #     $2 = ID for the app (used to define the init script names)
    #     $3 = Directory name
    #     $4 = Start priority for service
    #     $5 = Kill priority for service
         echo -e "\n\n"; echo $CMD_LINE
         echo Return code was $RC
         if [ "$RC" -eq "1" ] || [ "$RC" -eq "0" ]; then
              echo "Installer returned with a good exit code."
              echo "Installer returned with an error code. Abort!"
              grep -B 1 SEVERE $IATEMPDIR/BAO_install_log.txt | tail -n 5
              exit -1
         sed -i.bak -e"s/\(RUN_AS_USER=\).*/\1$AO_USER/" -e"s/\(# chkconfig: \).*/\102345 $STARTPRI $KILLPRI/" $INSTALL_BASE/$DIRNAME/bin/
         ln -s $INSTALL_BASE/$DIRNAME/bin/ /etc/init.d/$APPID
         /sbin/chkconfig $APPID on
         /sbin/service $APPID start
    # Add user under which the AO daemons will run
    id $AO_USER &> /dev/null
    if [ "$?" -eq "0" ]; then
         echo "User $AO_USER already exists. No need to create it."
         echo "Adding user $AO_USER."
         useradd $AO_USER
    echo "Creating install base directory and setting ownership..."
    mkdir -p $INSTALL_BASE
    installComponent prod-grid1-cdp1-repo.txt baorepo REPO 96 97                 # Install RSSO/Repository
    installComponent prod-grid1-cdp1-cdp.txt baocdp CDP 97 96                    # Install CDP
    echo -e "\n\nInstallation completed.\n"