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
- Provision Azure VM based on desired configuration using ARM template.
- Enable WinRm (Windows Remote Management) for installation on HTTPs using ARM template and PowerShell script.
- Install SPM on the new VM using Command Central via WinRm & YAML templates.
- Connect to the new VM from Command Central.
- Install & Configure webmethods Integration Server using Command Central via WinRm & YAML templates.
- 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
- Log into to Azure Devops Portal (dev.azure.com) and under your organization, create a new project ( Use the classic editor ).
- Create a new pipeline within the project and connect to the desired repository. In this case, I am using Azure Repos Git.
- Create and empty pipeline job and azure creates an agent job by default.
- Within the Agent Job, add a new step “ARM Template deployment”
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.
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 - Create an Azure AD app & service principal in the portal - Microsoft identity platform | Microsoft Docs - 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 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. Azure Quickstart Templates
- 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 - sagdevops-templates/templates/sag-spm-boot-winrm at master · SoftwareAG/sagdevops-templates · GitHub
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
- 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
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
- 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.
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*
- 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.
Top comments (0)