Automate VM Provisioning, IS Installation & Configuration - Azure Devops, ARM Templates & Command Central

This article provides the steps for achieving automated provisioning of an Azure VM, Install and Configure webmethods Integration Server using Azure Devops, Command Central, Azure Resource Manager (ARM) templates and YAML templates.

The high-level steps are given below

  1. Provision Azure VM based on desired configuration using ARM template.
  2. Enable WinRm (Windows Remote Management) for installation on HTTPs using ARM template and PowerShell script.
  3. Install SPM on the new VM using Command Central via WinRm & YAML templates.
  4. Connect to the new VM from Command Central.
  5. Install & Configure webmethods Integration Server using Command Central via WinRm & YAML templates.
  6. Start the Integration Server.

Pre-Requisite

  • Command Central Server installed, configured and accessible remotely.
  • Access to Azure Portal with a valid subscription.
  • Access to Azure Devops Portal.

Detailed Steps

  1. Log into to Azure Devops Portal (dev.azure.com) and under your organization, create a new project ( Use the classic editor ).

  2. Create a new pipeline within the project and connect to the desired repository. In this case, I am using Azure Repos Git.
    image

  3. Create and empty pipeline job and azure creates an agent job by default.
    image

  4. Within the Agent Job, add a new step “ARM Template deployment”
    image
    For this task, you need to have the “Azure Resource Manager Connection” configured. If you have already configured one, go ahead and use it. If not click on manage and create a new service connection.
    For the new service connection, click on “Azure Resource Manager” as shown below and select “Service Principal” manual or automatic. If service principal is not created, you can create one using the below command from Azure PowerShell.
    image image
    image
    Below is the command for Password based authentication using Azure CLI. You can even use certificate-based authentication.
    Command - az ad sp create-for-rbac --name ServicePrincipalName
    For creating an Azure AD application and Service Principal via portal, please refer to link - https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal

  5. Once the ARM service connection is configured, lets proceed with VM provisioning via ARM templates.
    In the Azure pipeline “ARM Template Deployment”, select the service connection created and provide the subscription details. The templates here is uploaded from Azure Repos Git.
    The template parameters can be overwritten as shown below.
    The template in this case does the below –
    Provision a new VM with the desired size, OS, location etc.
    Create Self Signed Certificate and Enable WinRm over HTTPs
    image
    Templates used in the POC Attached below
    ARM_SampleTemplate.zip (4.0 KB)
    Sample templates for different tasks are available in the below link. We can even combine different templates as needed.
    https://azure.microsoft.com/en-in/resources/templates/

  6. After the VM is created and provisioned, we need to install webmethods Platform Manager on the VM remotely using Command Central. Add the “Run PowerShell on Target Machines” task to execute the Platform manager installation.
    This task uses Platform Manager YAML template and a power shell script to access the VM using WinRm. The necessary product image, fix image, license key and the templates need to be uploaded on Command Central.
    For more details refer to - https://github.com/SoftwareAG/sagdevops-templates/tree/master/templates/sag-spm-boot-winrm
    image
    Script used here –
    <Path to sagcc.bat>/sagcc.bat exec templates composite apply <sag spm YAML Template> nodes=["<fqdn of the vm>"] cc.installer=<cc installer.zip> install.dir=C:\\SoftwareAG os.username=<domain>\<username> os.password=****** --sync-job --wait 900

  7. Next Step is to add a node in Command Central and connect to Platform Manager on the newly provisioned VM. We again use “Run PowerShell on Target Machines” to connect to Platform Manager. This task will also be executed on the build server, i.e. Command Central machine.
    This task uses YAML template and to connect and add the node in Command Central
    image
    Script used here –
    <Path to sagcc.bat>/sagcc.bat/sagcc.bat exec templates composite apply sag-spm-connect hosts=<fqdn of the vm> spm.port=8092 --sync-job --wait 360

  8. Once the node is added to Command Central, we can proceed with webmethods Products installation again using Command Central. Here also we will use “Run PowerShell on Target Machines” to install and configure Integration Server. The configuration necessary for Integration Server is provided via the YAML template.image
    Script used here – <Path to sagcc.bat>/sagcc.bat exec templates composite apply sag-is-server nodes=<fqdn of the vm> is.memory.max=512 repo.product=<product repo> is.integrationserver.license.key=<is license key> --sync-job --wait 900*

  9. Once all the steps are executed in sequence, VM is provisioned, Platform Manager is installed and connected to Command Central and finally Integration Server is installed and configured based on the YAML template.
    image