Skip to content

Bootstrapping Managed Installations

WayneLeishman edited this page Jan 24, 2018 · 9 revisions

The best way to bootstrap SPM installations is by using the Command Central bootstrap installer.

Getting Ready

The seed installer used to bootstrap Command Central itself is automatically saved. This enables you to bootstrap remote installations of the same version and operating system as the Command Central server.

Double check that you already have at least one bootstrap installer for your local OS:

[user@linuxbox tutorial]$ sagcc list provisioning bootstrap installers
Name                         Version Platform  Size(MB)        
cc-def-10.1-fix5-lnxamd64.sh    10.1 lnxamd64      1104

Note: if you get an error running 'sagcc' commands, open a new Git command window (As Administrator on Windows) and try again.

The Command Central bootstrap installer comes with several advantages over auto-generated SPM bootstrap installers that were used in older versions of Command Central:

  • It does not require Java on the target system
  • It comes automatically with the latest fixes, including Java fixes
  • It allows changing Administrator password for the target SPM

Local Dev Installation Bootstrap

Let's start with local node bootstrap process which is the easiest option with no dependencies. Here's a summary of steps to perform:

  1. Open templates/tutorial/template.yaml in the text editor and modify version: to be 0.3 to denote the change we're making and a comment to the changes: list.
  2. Managed installations called nodes are defined via nodes: section which we need to add first. Global defaults for any nodes are defined under default:/default: section. Node-specific properties can be customized using default:/<nodeAlias>: section. A boilerplate definition including conventional variable names is shown below.
  3. For nodes to be bootstrapped they have to be mapped to a layer. Layer is a set of runtimes setup in the same way using the same set of inline templates. The layers are defined using layers: section and must have unique aliases.
  4. Layers are then mapped to the nodes using provision: section which maps each layer to the list of nodes it should be provisioned on. In our case, we map management layer to a single spm.alias node.

To implement the above steps, modify your tutorial template.yaml file to look like what you see below...

alias: tutorial
description: How to bootstrap local nodes
version: 0.3
changes:
  - 0.1 Initial draft
  - 0.2 Added input parameters
  - 0.3 Added local node bootstrap
   
environments:
  default:
    cc.installer: ${}                              # CC boostrap installer name
    install.dir:  ${}                              # SPM installation directory
    spm.port:     8192                             # SPM connection port
    spm.alias:    dev${spm.port}                   # SPM alias
 
nodes:                                             # NODES definition
  default:                                         # defaults for any environment type
    default:                                       # default node definition
      port: ${spm.port}                            # SPM connection HTTP/S port
      secure: false                                # do not use SSL port
      bootstrapInfo:
        installDir: ${install.dir}                 # installation directory
        installer: ${cc.installer}                 # cc installer
     
    ${spm.alias}:                                  # definition for specific nodeAlias
      host: localhost                              # Use localhost
 
layers:                                            # LAYERS definition
  management:                                      # management layer with SPMs
 
provision:                                         # PROVISIONing mapping of layers to nodes
  default:                                         # default environment type
    management: ${spm.alias}                       # management layer is single node

Save the changes to the template.yaml file.

Depending on your operating system you will need to use different cc.installer and install.dir values. Here are reasonable default variables that you need to specify in your environment/default/env.properties configuration file.

# Default for *nix
install.dir=${user.home}/sag/${spm.alias}

# Defaults for Linux
# cc.installer=cc-def-10.1-fix5-lnxamd64.sh
 
# Defaults for Mac
# cc.installer=cc-def-10.1-fix5-osx.sh

# Defaults for Windows
# cc.installer=cc-def-10.1-fix5-w64.zip 
# install.dir=C:\\Users\\${user.name}\\sag\\${spm.alias}

Uncomment relevant variables for your local OS and available installers. Modify values as necessary. Comment the variables you don't need.

IMPORTANT:

  1. Make sure you use a cc.installer file that exists in the ${CCE_HOME}/profiles/CCE/data/installers/ folder

Note: as mentioned above, you can also determine the files that exist for your local OS by running the following 'sagcc' command:

[user@linuxbox tutorial]$ sagcc list provisioning bootstrap installers
Name                         Version Platform  Size(MB)        
cc-def-10.1-fix5-lnxamd64.sh    10.1 lnxamd64      1104
  1. Make sure install.dir path is a folder that the user account that runs Command Central has write access and that this folder does not exist yet!

  2. Make sure spm.port value is unique and not used by any other local process, including CCE/SPM itself.

Apply the template using 'ant up' as shown below. You can monitor the installation progress using Command Central Web UI Jobs view. It till take several minutes to complete.

[user@linuxbox tutorial]$ ant up
...
BUILD SUCCESSFUL
Total time: ....

Experiment

  • Bootstrap additional local installations, e.g. dev8292 using spm.port=8292
  • Bootstrap additional local installations for an older version, e.g. 9.12

You can download additional Command Central bootstrap installers for your desired version and target OS from the Software AG Software Download Center on Empower and copy them to ${CCE_HOME}/profiles/CCE/data/installers/ folder.

Summary

Congratulations! You've bootstrapped a new empty dev8192 installation on your local machine. The installation root is what you have specified in your env.properties file as install.dir property value.

If you have problems achieving the goals of this tutorial stage, use the following command to checkout everything that needed to be done so far. Make a note about your modifications of environment/default/env.properties because the version that you will check out will overwrite them.

[user@linuxbox tutorial]$ git checkout stage-03 -f
Switched to branch 'stage-03'
Clone this wiki locally