Deploy CICS TG container on OCP
- Before you begin
- Log in to the OpenShift® command-line interface (CLI) by using oc login. To perform these steps, you need to be a cluster administrator.
- Log in to the OCP cluster and verify the contents of the CICS Transaction Gateway installer package.
- Log in to the namespace on OCP
cluster.
oc login -u <username> -p <password> -n <namespace> - Log in to the OCP container registry by using Podman
command.
podman login -u <username> -p <password> <OCP_container_registry_url> - Download the CICS TG Container
image.
tar -xvf <cicstg_tar_file_name>After extraction of CICS TG, the installation package contains the following files:- ibm-cicstg-container-linux-x86:9.3: CICS TG Container image
- README.text: Readme file
- Log in to the namespace on OCP
cluster.
- Load CICS Transaction Gateway container image to OCP registry.
- Load IBM®
CICS TG docker image into OCP local container
registry.
podman load ibm-cicstg-container-linux-x86:9.3 - Verify that the image is loaded into OCP local
registry.
podman images - Tag the image into an OCP container registry-compliant format of your OCP
cluster.
podman tag <image_name>:<image_tag> image-registry.openshift-image- registry.svc:5000/<namespace>/<image_name>:<image_tag> - Push the image to OCP container
registry.
podman push image-registry.openshift-image-registry.svc:5000/<namespace>/<image_name>:<image_tag> - Verify that the image is pushed to OCP
registry.
oc get imagestream -n <namespace>
- Load IBM®
CICS TG docker image into OCP local container
registry.
- Deploying CICS Transaction Gateway application on OCP.
- To deploy CICS TG container, save the following sample
CICS TG deployment yaml as
ctcstg_deployment.yaml file by replacing image name, namespace, port
details.
apiVersion: apps/v1 kind: Deployment metadata: name: cicstg-container namespace: default # change according to your namespace labels: app: cicstg-container spec: replicas: 2 selector: matchLabels: app: cicstg-container template: metadata: labels: app: cicstg-container spec: containers: - name: cicstg-container # change according to your namespace image: <image> imagePullPolicy: IfNotPresent env: - name: LICENSE value: "accept" ports: - name: cicstglistener containerPort: 2006 --- kind: Service apiVersion: v1 metadata: name: cicstg-container namespace: default # change according to your namespace labels: app: cicstg-container spec: selector: app: cicstg-container ports: - name: cicstg port: 2006 nodePort: 30443 type: NodePort - Deploy CICS TG application by applying the configuration
from ctcstg_cloud.yaml
file.
oc apply -f ctcstg_deployment.yaml - To verify the deployment of CICS TG pods and service for
the CICS TG
application.
The created ReplicaSet from this output ensures that two cicstg pods are running.oc get deployment cicstg-container oc get pods | grep cicstg-container oc get service | grep cicstg-container - Run the "oc logs” command to check the CICS TG logs in
running pods.
For example,
oc logs cicstg-container-88769df74-6n2bw
- To deploy CICS TG container, save the following sample
CICS TG deployment yaml as
ctcstg_deployment.yaml file by replacing image name, namespace, port
details.
- Running CICS Transaction Gateway application on Red Hat OpenShift Cluster.
To verify CICS TG deployments, you can run the CICS TG client EC01 application. You can run the "oc describe pod" command to get the CICS TG Gateway IP address and port number.
For example,oc describe pod cicstg-container-88769df74-6n2bwNow run the ECI application with CICS TG pod Node IP address and nodePort number.
For example,java com.ibm.ctg.samples.eci.EciB2 jgate=tcp://< IPAddress > jgateport= < node port number > server=TXAOR1 prog0=EC01 COMMAREAlength=18