Install fixes using Command Central composite template

This document contains detailed steps to create a command central composite template for installing fixes for webMethods products.

Overview 

This article describes detail steps to create a CCE composite template to install fixes for webMethods products or a particular product. The template and bootstrapped CCE used in this article are for webMethods Product version 10.2.

Prerequisites

  • Minimum Knowledge of YAML and Command Central.
  • A new Linux machine. Preferably RHEL with JAVA(java 1.8+) installed 
  • Apache Ant 1.9+,  Git Client
  • Software AG products installation

Building Composite Template to install Fix

Command Central is a tool that enables you to install, patch, configure, manage, and upgrade Software AG products remotely from one location.
Also, we can work with existing standalone product installations or create new ones; create repositories from which to install products (9.8 and later), install fixes (9.7 and later).

Bootstrapping Command Central:

Command Central needs an SPM to manage the installation. The process of installing the SPM is called bootstrapping.

The bootstrapper also automatically installs Platform Manager and the Command Central command line interface (CLI), as well as all latest fixes that are available for Command Central and SPM. 

Command to install Bootstrap CCE:

For Linux:

curl -O http://empowersdc.softwareag.com/ccinstallers/cc-def-10.2-fix2-lnxamd64.sh

chmod +x cc-def-10.2-fix2-lnxamd64.sh

./cc-def-10.2-fix2-lnxamd64.sh --accept-license -d /home/svtuser/CCE -p manage123 -C 8201 -c 8200 -S 8203 -s 8202

For Windows:

Download [http://empowersdc.softwareag.com/ccinstallers/cc-def-10.2-fix2-w64.zip]
Unzip cc-def-10.2-fix2-w64.zip
Run cc-def-10.2-fix2-w64.exe --accept-license -d C:\CCE -p manage123 C 8201 -c 8200 -S 8203 -s 8202

Argument Value
--accept-license Indicates that you accept the Software AG product license.
-d path (-d C:\CCE) Full path to the installation directory in which you are going to install Command Central.
-p password     (-p manage123) Password to use for the Command Central Administrator user account.
-C port number  (-C 8201) HTTPS port to use for Command Central.
-c port number  (-c 8200) HTTP port to use for Command Central.
-S port number (-S 8203) HTTPS port for Command Central to communicate with the local Platform Manager.
-s port number   (-s 8202) HTTP port for Command Central to communicate with the local Platform Manager.

Once the installation completed, we can access command central using URL specified in console.

Adding Credentials to Command Central:

If we want to install fixes from Empower or internal repositories using a composite template, we need to configure credentials to download fixes for webMethods products.

We can add credentials using command central UI or through composite template.

Using Command Central UI:

Login to Command Central. 

Navigate to CCE -> Command Central Server.

In Configuration select Credentials, and add new credentials details.

Using Command Central Composite template:

Clone the sagdevops-cc-server git-hub project:

Command: git clone https://github.com/SoftwareAG/sagdevops-templates.git

Navigate to %CCEInstallationDir%/CommandCentral/client/bin folder and run below commands:

  1. sagcc exec templates composite import -i /home/svtuser/sagdevops-templates/templates/sag-cc-creds/template.yaml
  2. sagcc exec templates composite apply sag-cc-creds empower.username=<empower user name> empower.password=<empower password>

Once it is added successfully, we can verify added credentials in Command Central UI:

Adding Repositories to Command Central:

We can add more than one repository to command central to install fixes.  

When we need to install fixes we need to configure the fix repository from which we will be downloading fixes, i.e. from Empower or internal fix repositories. We can add more than one repository to command central for installing fixes.  

We can add repository using command central UI or through composite template.

Using Command Central UI:

Login to Command Central. Click on Repositories link.

In fixes tab, Click on + link and select “Connect to SoftwareAG Repositories” 

Add new Repositories details.

Using Command Central Composite template:

Clone the sagdevops-cc-server git-hub project:

Command: git clone https://github.com/SoftwareAG/sagdevops-templates.git

Navigate to %CCEInstallationDir%/CommandCentral/client/bin folder and run below commands:

  1. sagcc exec templates composite import -i /home/svtuser/sagdevops-templates/templates/sag-cc-repos/template.yaml
  2. sagcc exec templates composite apply sag-cc-repos 

Once it is added successfully, we can verify added Repository in Command Central UI:

Or

We can verify through command line using below command:

Command: sagcc list repository fixes

Composite Template to install fixes:

With Command Central, we can use composite templates to create new environments and update or upgrade existing environments. 

The template definition describes the target state of the environment that you want to install or modify, and Command Central calculates how to achieve the target state, based on the data in the composite template.

A composite template uses a custom domain-specific language (DSL) and a template definition in the YAML format.

Environments:

Here we specify what type of environments we want to create on the target hosts. In the below example template, we define “default” environment and we need to specify what are the properties we are using in the template and its value.

Layers:

In this section we provide the fix repositories from which we are going to install fixes for all layers. In this example the spmFix layer is the first layer that Command Central applies, because this layer ensures that Platform Manager is updated to the required fix level and the spm-tuneup inline template is applied to install the latest SPM fix. The repo.fix parameter identifies the repository from which it will install the Platform Manager fixes.

The EmpowerFix layer is used to install all the latest fixes available in "repo.fix" repository for installed products.

Templates:

The spm-tuneup inline template is used to install the Platform Manager fixes, defined in the fixes property. The fix installation operation restarts Platform Manager.

The EmpowerFix_Template inline template installs the latest fixes available for installed products.

Provision:

Command Central uses the map in this section to determine which layers to apply on which target node for each environment type. The layers are mapped to the node aliases. In below example, we have defined default environment.

Command Central applies the spmFix layer on the host of the Platform Manager installation with alias "spm.host". After applying the spmFix layer, Command Central applies the EmpowerFix layer on the host specified for "spm.host".

Nodes:

The nodes section is used to determine the target machine Platform Manager where we will install fixes.

Variables used in the template to install fixes:

Variables Value
repo.fix The fix repository to use for installing fixes in this example it is Empower.
spm.fixes Here we need to specify SPM fixes need to install in the target SPM. Default value is ALL, which will install all available fixes. If we need to install particular fix we need to specify fix name. In this example [wMFix.SPM].
product.fixes Here we need to specify product fixes, we want to install in the target SPM. Default value is ALL, which will install all available fixes or if we need to install particular fix we need to specify fix name.
spm.port Target machine SPM port.
spm.host Target machine host name.
install.dir Target machine product installed directory.
fixRepo Fix repositories from which to install fixes for layers.
Fixes Specify a list of IDs for the fixes that you want to install, Command Central installs the latest available version of each fix and its dependencies

Example template:

Commands to execute template:

  1. Open the Command Prompt or shell window and change the working directory to %CCEInstallationDir%/CommandCentral/client/bin
  2. Verify that the local Command Central command line tool is running with the following command:
    sagcc list landscape nodes local -e ONLINE


     
  3. Import the template in Command Central using the sagcc exec templates composite import command: 
    sagcc exec templates composite import -i %Composite Template definition file%/template.yaml


     
  4. Apply the template by executing the sagcc exec templates composite apply command with the template alias name:
    sagcc exec templates composite apply Fixinstall

Once the job successfully completed, we can verify installed fixes in Command Central UI.

installFixes_CC_template6.png

installFixes_CC_template8.png

template.yaml (1 KB)