Bringing up an App Connect Professional Docker container in Kubernetes

Before you begin

  • The provided App Connect Professional Docker tar file contains the App Connect Professional Docker image and ubuntu 16.04
  • Ensure the Docker image is available on Kubernetes worker nodes by running the following command:

    Docker Command to load into local repository:

    docker load < 7.5.3.0-dockerimage_built-20181024-1338_H18_64.tar

    You can use the following Docker command to list all the existing images:

    docker images

    Example format of output from the preceding command:

    <castiron>  7.5.3.0       92f880af3c92     14 hours ago     1.3 GB

Procedure

  1. Edit the castiron.yaml file with proper image name

    You can use your own Docker repository if you want to avoid loading the Docker image every time on different kubernetes worker nodes.

  2. Create the deployment.

    Run the following command:

    kubectl create -f castiron.yaml

  3. Expose the deployment as a service.

    Use one of the following methods:

    • Assign dynamic ports to use App Connect:
      kubectl expose deployment castiron-deployment --type=NodePort
    • Assign preconfigured ports mentioned in the castiron-service.yaml file:
      kubectl create -f castiron-service.yaml

  4. Login to the Kubernetes worker node and check the Docker container status

    Run the following command:

    docker exec -it <container_ID> /bin/bash

  5. Inside the Docker container check the component status.

    Run the following command:

    castiron -–status

    Response expected:

        Cast Iron Component Status
        --------------------------
         DerbyServer    : Up
         Maestro        : Up
         WMC            : Up
         Gateway        : Up
    

    If any of the components are not up after 10 minutes, extract postmortem logs. For more information about extracting the logs, see: Working with the App Connect Professional container.

  6. When all the processes are up and running, then open the web management console page on the dynamic node port mapped to 8443 port using the worker node IP address.
    https://<workernode_ip>:<dynamic_port>

    To discover the dynamic node port mapped, run the following command for the deployment name (castiron-deployment) mentioned in the castiron.yaml:

    kubectl get service castiron-deployment

    Example output:

    castiron-deployment   NodePort   10.107.49.159   <none>        8443:32336/TCP,9443:32605/TCP,80:32570/TCP,443:31882/TCP

    Explanation for this example:

    1. App Connect Professional management port 8443 is mapped to 32336. You can access the web management console by using port 32336. So, the address is https://<workernode_ip>:32336
    2. Similarly, secure connector port 9443 is mapped to 32605
    3. Receive request ports 80 and 443 are mapped to 32750 and 31882 respectively. So, if your orchestrations are exposing any APIs, all those ports need to be mapped/exposed.

  7. Steps to use the secure connector in kubernetes

    When all the processes are up and running, to use the secure connector edit the localConfig_ws.xml present in the secure connector install location (<:installed_secure_connector>/config). Change the value of agentServerPort from 9443 to the mapped value. In this example it is 32605. After changing the value, it will look like the following example:

    <agentServerPort>32605</agentServerPort>

Sample castiron yaml file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: castiron-deployment
labels:
   app: castiron
spec:
replicas: 1
selector:
   matchLabels:
     app: castiron
template:
   metadata:
     labels:
       app: castiron
   spec:
     containers:
     - name: castiron
       image: castiron:7.5.3.0
       imagePullPolicy: IfNotPresent
       ports:
       - containerPort: 8443
         name: wmc
       - containerPort: 9443
         name: gateway
       - containerPort: 443
         name: httpsserver
       - containerPort: 80
         name: httpserver
Sample castiron-sevice.yaml file
apiVersion: v1
kind: Service
metadata:
  labels:
    app: castiron
  name: castiron-deployment
  namespace: default
spec:
  externalTrafficPolicy: Cluster
  ports:
  - name: port-1
    nodePort: 30329
    port: 8443
    protocol: TCP
    targetPort: 8443
  - name: port-2
    nodePort: 31278
    port: 9443
    protocol: TCP
    targetPort: 9443
  - name: port-3
    nodePort: 31326
    port: 443
    protocol: TCP
    targetPort: 443
  - name: port-4
    nodePort: 30727
    port: 80
    protocol: TCP
    targetPort: 80
   selector:
    app: castiron
  type: NodePort
status:
  loadBalancer: {}



Feedback | Notices


Timestamp icon Last updated: Wednesday, 13 February 2019


https://www.ibm.com/support/knowledgecenter/SS3LC4_7.5.3/com.ibm.wci.VAuserguide.doc/CIDC_migrating_projects_cia_cic.html