Installer Life becomes easier — IBM Workload Scheduler

Bdison Lin
7 min readDec 27, 2022

--

Installation Guide - IWS, DB2, Oracle

IBM Workload Automation(IWS) is a complete solution for batch and real-time workload management, available for distributed mainframe or hosted in the cloud. Use it to drive workloads on hosted servers, at low costs for your central server. Increase your productivity with powerful plan- and event-driven scheduling, and run and monitor your workloads wherever you are.

Be the distribute workload environment with static and dynamic scheduling capabilities. Use this configuration to run workload both statically and dynamically across your distributed network. The run time environment is used to:

  • Run on the agent job types with advanced options, both those supplied with the product and the additional types implemented through the custom plug-ins.
  • Enable the capability to remotely run, from the agent, the dynamic workload broker resource command on the server.
    For information about dynamic scheduling, how to run application job plug-ins and the dynamic workload broker resource command on the server.

Distributed workload environment with static and dynamic scheduling capabilities

DB2 : dbhostname : tws-bdison
MDM : dbhostname : TWS-MDM
DWC : dbhostname : TWS-DWC
DDM : dbhostname : TWS-DDM

Then let’s go to join the installer’s life journey:

Installation procedures

Typical installation scenarios for products and components.
Typical installation scenarios for products and components.

Note : Maybe your install step follow the tempo like: configure the database then install component

Step 1 : When installing an IWS components, consider the following prerequisites.

  • Java: Ensure that your system meets the operating system and Java requirements. For WebSphere Application Server Liberty Base detailed system requirements.
  • Application Servers (WAS) : WebSphere Application Server Liberty Base is required on all workstations where you plan to install the master components and the Dynamic Workload Console (DWC)
  • Database: Before you start the installation, you must create and populate the database for both the Master Domain Manager (MDM) and the Dynamic Workload Console (DWC).

Note: Install WebSphere Application Server Liberty Base from the command line as follows:

################# Liberty install #################
java -jar wlp-base-all-22.0.0.5.jar --acceptLicense WLP

Step 2 : Configure the required databases before starting the MDM installation.

Configure a DB2 database for MDM
Configure a Oracle database for MDM
  • Configure a DB2 database for MDM
./configureDb.sh --rdbmstype DB2 \
--dbhostname tws-bdison \
--dbport 50000 \
--dbname TWS \
--dbuser db2inst1 \
--dbadminuser db2inst1 \
--dbadminuserpw 1qaz2wsx \
--dbpassword 1qaz2wsx
  • Configure a Oracle database for MDM
./configureDb.sh \
--rdbmstype ORACLE \
--dbname twsdb\
--dbuser twsuser \
--dbpassword HelloWelcome \
--dbhostname hostcenter\
--dbport 1803 \
--dbadminuser system \
--dbadminuserpw HelloWelcome \
--iwstsname tws_data \ ### table space
--iwslogtsname tws_data \ ### table space
--iwsplantsname tws_data ### table space

Step 3 : Installing the Master Domain Manager (MDM) — DB2 example

./serverinst.sh --acceptlicense yes \
--rdbmstype DB2 \
--dbhostname TWS-MDM \
--dbport 50000 \
--dbname TWS \
--dbuser db2inst1 \
--dbpassword 1qaz2wsx \
--wauser root \
--wapassword wNLEE3SW6jeq \
--wlpdir /root/APP/WLP

Step 4 : Configure the database for DWC — DB2 example

################# DWC DB2 config #################
./configureDb.sh --rdbmstype DB2 \
--dbhostname TWS-MDM \
--dbport 50000 \
--dbname DWC \
--dbuser db2inst1 \
--dbpassword 1qaz2wsx \
--dbadminuser db2inst1 \
--dbadminuserpw 1qaz2wsx

Step 5 : Installing the Dynamic Workload Console (DWC) — DB2 example

################# DWC install #################
./dwcinst.sh --acceptlicense yes \
--rdbmstype DB2 \
--user dwcadmin \
--password 1qaz2wsx \
--dbname DWC \
--dbuser db2inst1 \
--dbpassword 1qaz2wsx \
--dbhostname TWS-DWC \
--dbport 50000 \
--wlpdir /root/APP/WLP

Step 6 : Create a Database and Configure the database DDM — DB2 example

################# Create DDM database #################
su - db2inst1
db2 create database DDM
################# Configuring a DDM #################
./configureDb.sh \
--rdbmstype DB2 \
--componenttype DDM \
--dbhostname 162.133.84.67 \
--dbport 50000 \
--dbname TWS-DDM \
--dbuser db2inst1 \
--dbpassword 1qaz2wsx \
--dbadminuser db2inst1 \
--dbadminuserpw 1qaz2wsx

Step 7 : Installing the Dynamic Domain Manager (DDM) — DB2 example

  • A dynamic domain manager is the management hub in a domain running both static and dynamic workload. All communications to and from the dynamic agents in the domain are routed through the dynamic domain manager.
################# DDM install #################
./serverinst.sh --acceptlicense yes \
--rdbmstype DB2 \
--dbhostname TWS-DDM \
--dbport 50000 \
--dbname DDM \
--dbuser db2inst1 \
--dbpassword 1qaz2wsx \
--wauser root \
--wapassword dFG6X4X6h9c3 \
--componenttype DDM \
--domain MASTERDM \
--master tws-bdison \
--mdmbrokerhostname TWS-MDM\
--mdmhttpsport 31116 \
--wlpdir /root/APP/WLP

Step 7 : Installing the agents

  • Install the agents Fault-Folerant Agent (FTA) or Dynamic Agent (DA) in your distributed or end-to-end network by using the twsinst script.
  • Install a fault-tolerant agent on Virtual Machine Server
################# FTA install on VM #################
./twsinst -new \
-uname twsuser \
-acceptlicense yes \
-agent fta \
-company IBM \
-create_link \
-hostname TWS-DDM \
-inst_dir "/home/twsuser" \
-master TWS-BDISON \
-port 37124 \
-reset_perm \
-skipcheckprereq \
-thiscpu ddmfta \
-work_dir "/home/twsuser/tmp"
  • Install a dynamic agent on Virtual Machine Server
################# Dynamic Agent install on VM #################
./twsinst -new \
-uname agtuser \
-acceptlicense yes \
-addjruntime true \
-agent dynamic \
-displayname TWS-DWC \
-tdwbport 31116 \
-tdwbhostname bdison-vm \
-thiscpu bdison
  • Install a dynamic agent on OpenShift Container Platform (OCP)
################# Dynamic Agent install on OCP #################
oc new-project ibm-wa-agent --display-name="DDM-DynamicAgent" --description="Workload Automation Dynamic Agent"


oc create secret docker-registry ibm-entitlement-key -n ibm-wa-agent \
--docker-username=cp \
--docker-password= ## get from https://licensing.flexnetoperations.com\
--docker-server=cp.icr.io


oc secrets link default ibm-entitlement-key --for=pull

oc create -f wa-agent-deploy-ocp.yml

oc process ibm-workload-automation-agent-dynamic -p LICENSE=ACCEPT \
-p INSTANCE_NAME=ibm-ocp-da \
-p SERVERHOSTNAME=tws-bdison \
-p IMAGE=cp.icr.io/cp/ibm-workload-automation-agent-dynamic:9.5.0.05.20211217 | oc create -f -
  • Using yaml template to deploy agent on OCP
####################################################################
# Licensed Materials Property of HCL*
# (c) Copyright HCL Technologies Ltd. 2019. All rights reserved.
#
# * Trademark of HCL Technologies Limited
####################################################################

apiVersion: "v1"
kind: Template
metadata:
name: ibm-workload-automation-agent-dynamic
annotations:
openshift.io/display-name: "IBM Workload Automation Agent"
description: "IBM Workload Automation Agent application for OpenShift."
tags: "Workload Scheduler,Workload Automation,Automation,DevOps"
objects:
- apiVersion: v1
kind: Service
metadata:
name: ${INSTANCE_NAME}-waagent-h
labels:
app: "waagent"
instance: "${INSTANCE_NAME}"
spec:
clusterIP: None
ports:
- name: ita-port
protocol: TCP
port: 31114
targetPort: 31114
selector:
app: "waagent"
instance: "${INSTANCE_NAME}"

- apiVersion: "apps/v1"
kind: StatefulSet
metadata:
name: "${INSTANCE_NAME}-waagent"
labels:
app: "waagent"
instance: "${INSTANCE_NAME}"
spec:
updateStrategy:
type: RollingUpdate
serviceName: ${INSTANCE_NAME}-waagent-h
replicas: ${REPLICA_COUNT}
selector:
matchLabels:
app: "waagent"
instance: "${INSTANCE_NAME}"
template:
metadata:
labels:
app: "waagent"
instance: "${INSTANCE_NAME}"
affinity: waagent
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: affinity
operator: In
values:
- waagent
topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- amd64

initContainers:
- name: init-config
image: "${IMAGE}"
imagePullPolicy: Always
volumeMounts:
- name: data
mountPath: /tmp/data
command: [/opt/wautils/wa_populate_volume.sh]
args: ["-s /home/wauser -d /tmp/data"]

containers:
- name: waagent
readinessProbe:
exec:
command:
- /opt/wautils/wa_probe.sh
- agent
- readiness
initialDelaySeconds: 10
periodSeconds: 30
livenessProbe:
exec:
command:
- /opt/wautils/wa_probe.sh
- agent
- liveness
initialDelaySeconds: 60
periodSeconds: 60
env:
- name: WA_IS_KUBE
value: "true"
- name: WA_DEBUG_SCRIPTS
value: "false"
- name: LICENSE
value: "${LICENSE}"
- name: LANG
value: "${LANG}"
- name: TZ
value: "${TZ}"
- name: WA_DEBUG
value: "${WA_DEBUG}"
- name: AGT_NAME
value: "${AGT_NAME}"
- name: SERVERHOSTNAME
value: "${SERVERHOSTNAME}"
- name: SERVERPORT
value: "${SERVERPORT}"
- name: POOLS
value: "${POOLS}"
image: "${IMAGE}"
imagePullPolicy: ${PULL_POLICY}
resources:
limits:
cpu: 1
memory: 2Gi
requests:
cpu: 200m
memory: 200Mi
volumeMounts:
- name: data
mountPath: /home/wauser
subPath: wauser
# BEGIN SECTION - Certificates' Secret: to use custom SSL certificates
# - name: cert-bind-volume
# mountPath: /opt/wautils/certs
#volumes:
#- name: cert-bind-volume
# secret:
# defaultMode: 0664
# secretName: ${CUSTOM_CERT_SECRET}
# END SECTION - Certificate's Secret
volumeClaimTemplates:
- metadata:
name: "data"
labels:
app: "waagent"
instance: "${INSTANCE_NAME}"
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: "2Gi"
storageClassName: "${STORAGE_CLASS}"
# BEGIN SECTION - PV Selector: to use selectors in the persistence volume binding process
#selector:
# matchLabels:
# ${PV_LABEL_NAME}: ${PV_LABEL_VALUE}
# END SECTION - PV Selector

parameters:
- name: IMAGE
description: "IBM Workload Automation Agent Docker image"
required: true
value: "ibm-workload-automation-agent-dynamic:9.5.0.01"
- name: PULL_POLICY
description: Docker image pull policy (Always | IfNotPresent | Never)
required: true
value: "Always"
- name: INSTANCE_NAME
description: Application instance name
required: true
value: ""
- name: REPLICA_COUNT
description: Number of replicas to run
value: "1"
required: true
- name: STORAGE_CLASS
description: Storage class name used for dynamic Persistence Volume provisiong. Leave blank to disable dynamic provisioning
required: false
value: ""
# BEGIN SECTION - PV Selector: to use selectors in the persistence volume binding process
#- name: PV_LABEL_NAME
# description: Presistent Volume label name
# required: true
# value: ""
#- name: PV_LABEL_VALUE
# description: Presistent Volume label value
# required: true
# value: ""
# END SECTION- PV Selector
- name: LICENSE
description: Use ACCEPT to accept the license agreement
required: true
value: "not accepted"
- name: LANG
description: The language of the agent container (en | de | es | fr | it | ja | ko | pt_BR | ru | zh_CN | zh_TW)
required: true
value: "en"
- name: WA_DEBUG
description: It executes the container in debug mode so it will not be stopped in case of errors
required: true
value: "false"
- name: TZ
description: The TZ operating system environment variable
required: true
value: "Europe/Rome"
- name: AGT_NAME
description: Agent Display Name
value: "WA_AGT"
required: true
- name: SERVERHOSTNAME
description: Hostname or IP address of the master domain manager
value: ""
required: true
- name: SERVERPORT
description: Port number of the master domain manager
value: "31116"
required: true
- name: POOLS
description: A comma separated list of static workstation pools with which you want to register this agent
value: ""
required: false
# BEGIN SECTION - Certificates' Secret: to use custom SSL certificates
#- name: CUSTOM_CERT_SECRET
# description: The name of the secret used to store all the customized certificates
# value: "waagent-cert-secret"
# required: true
# END SECTION - Certificate's Secret

message: "Your IBM Workload Automation Agent is starting. Your agent is connecting to the Master Domain Manager at host ${SERVERHOSTNAME}"

--

--