webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Tech Bytes IWHI: Deploy and run webMethods.io Integration multi-instance edge runtime on Azure Kubernetes Service (AKS) 

Tue January 07, 2025 12:52 AM

Introduction

Deploy and run webMethods.io Integration multi-instance edge runtime on Azure Kubernetes Service (AKS). This will help users to do multi-instance setup of Integration Runtime using AKS

Prerequisites

  • Working wm.io origin tenant
  • Azure portal subscription

Steps to be followed

  • Create Integration runtime on webMethods.io Integration origin tenant
  • Generate the lifetime token
  • Create the AKS cluster on Azure portal
  • Why to create Kubernetes secret?
  • Deployment of yaml file on Azure cluster
  • Verifying the health of pods on AKS
  • Verify the connectivity status on webMethods.io Integration tenant

Description

The multi-instance configuration can be done through wm.io Origin UI. Here we tried to replicate same using AKS cluster

Create Integration runtime on webMethods.io Integration origin tenant

  • Login to the webMethods.io origin tenant.
  • Under the integration runtimes.
  • Register the runtimes

Generate the lifetime token

  • On the right hand side click on user icon and select the settings
  • Click on oAuth 2.0 and select the token management.
  • Provide your edge runtime and select the validity of token as lifetime 

Create the AKS cluster on Azure portal

  •  Configure the AKS
  • While doing the basic configuration we have provided cluster name as "wmcontainerdada"

Why to create Kubernetes secret?

  • Kubernetes uses an image pull secret to store information needed to authenticate our registry
  • If we want to fetch container images from a private repository, we need a way for the kubelet on each node to authenticate to that repository
  • We need to use a secret to pull the image from a private container image registry or repository, in our case from 'sagcr.azurecr.io'.

          '

           Steps to create the secret     

  • We will create a Secret by providing credentials on the cloud shell window, OOB feature provided by Azure.
  • command to create the secret

kubectl create secret docker-registry <Any Name Of Your Choice eg: azsecretcred> --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

kubectl create secret docker-registry regcred --docker-server=sagcr.azurecr.io --docker-username=*********** --docker-password=************* --docker-email=abcd.xyz@softwareag.com

where:

You have successfully set your Docker credentials in the cluster as a Secret called 'regcred'. After successful run of above command you should see message - 'secret/regcred created'.

Deployment of yaml file on Azure cluster

  • sample yaml file used for deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: irt-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: integration-runtime
  template:
    metadata:
      labels:
        app: integration-runtime
    spec:
      containers:
      - name: Edge Runtime name to be replaced
        image: sagcr.azurecr.io/webmethods-edge-runtime:11.0.3
        env:
        - name: SAG_IS_CLOUD_REGISTER_URL
          value: "<Tenant URL>"
        - name: SAG_IS_EDGE_CLOUD_ALIAS
          value: "<SAG CLOUD ALIAS>"
        - name: SAG_IS_CLOUD_REGISTER_TOKEN
          value: "< lifetime Token generated from webMethods.io >"
        ports:
        - containerPort: 5566
      imagePullSecrets:
      - name: regcred

Sample Yaml used for deployment

            

apiVersion: apps/v1
kind: Deployment
metadata:
  name: irt-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: integration-runtime
  template:
    metadata:
      labels:
        app: integration-runtime
    spec:
      containers:
      - name: cardissuanceazureruntime
        image: ibmwebmethodsregistry.azurecr.io/ibmwebmethods:latest
        env:
        - name: SAG_IS_CLOUD_REGISTER_URL
          value: "https://originawsstage02.stag-int-aws-us.webmethods.io"
        - name: SAG_IS_EDGE_CLOUD_ALIAS
          value: "EdgeRuntime_cardissuanceazureruntime"
        - name: SAG_IS_CLOUD_REGISTER_TOKEN
          value: "eccbf4414dfd435abf0eac013e729efe2ef66cdc2ad54f609a51fd6aa0fb412a"
        ports:
        - containerPort: 5566

Note:

  1. Above yaml file is used when the ACR repo is used. if we are using the SAG repo then secret needs to be created and  section should be added in the yaml file.
  2. In the ACR we need to add the role so that image can pulled in AKS. to do same add the role ACRpull and give rights to kuberntes agent pool.

Verifying the health of pods on AKS

  • Open the cloud shell and type kubectl get pods
  • we can also review monitoring tab under overview to check the pod status
Verify the connectivity status on webMethods.io Integration tenant
Note: We should first get a long-term access token for Integration Runtime that we going to create and use that long term token to register the runtime and create multiple instances of the same.

Statistics
0 Favorited
54 Views
0 Files
0 Shares
0 Downloads

Comments

Tue January 07, 2025 04:47 AM

Thanks for sharing details