Bringing up an App Connect Docker container in Kubernetes

Before you begin

  • Ensure that the provided TAR file contains the App Connect 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.2.0-docker_build-20180704.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>  latest              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 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 App Connect 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           8443:32336/TCP,9443:32605/TCP,86:32570/TCP,9445:31882/TCP

    Explanation for this example:

    1. App Connect management port 8443 is mapped to 32336. You can access the web management console by using port 32336. So, the address is https://:32336
    2. Similarly, secure connector ports 9443 and 9445 are mapped to 32605 and 31882 respectively
    3. Receive request port 86 is mapped to 32750. 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
       imagePullPolicy: IfNotPresent
       ports:
       - containerPort: 8443
         name: wmc
       - containerPort: 9443
         name: gateway
       - containerPort: 443
         name: wmcserver
       - containerPort: 9445
         name: gatewayserver




Feedback | Notices


Timestamp icon Last updated: Friday, 24 August 2018


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.VAuserguide.doc/CIDC_migrating_projects_cia_cic.html