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
- 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.
- Create the deployment.
Run the following command:
kubectl create -f castiron.yaml
- Expose the deployment as service.
Use one of the following methods:
- Login to the Kubernetes worker node and check the docker container status
Run the following command:
docker exec -it <container ID> /bin/bash
- 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.
- 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:
- 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
- Similarly, secure connector ports 9443 and 9445 are mapped to 32605 and 31882 respectively
- Receive request port 86 is mapped to 32750. So, if your orchestrations are exposing any APIs, all those ports need to be mapped/exposed.
- 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