Author |
Message
|
Pats21 |
Posted: Wed Feb 05, 2020 3:45 am Post subject: IIB on Docker/Kubernetes |
|
|
Disciple
Joined: 08 Sep 2006 Posts: 154
|
Hi All,
Would like to know if anyone has worked on IIB on Dockers and Kubernetes.
I have got the docker image, however want to run the same on Kubernetes Cluster.
I am looking for a sample Deployment YAML file.
If anyone has worked. Kindly help.
Thanks in advance. |
|
Back to top |
|
 |
joebuckeye |
Posted: Wed Feb 05, 2020 9:40 am Post subject: Re: IIB on Docker/Kubernetes |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
We started looking into it, first with IIB 10 and then with ACE but found with our current license with IBM that it would be cost prohibitive to run in containers.
ACE is much better setup to run in containers than IIB from what we found. This is to be expected though since ACE is more recent.
We relied heavily on this link https://hub.docker.com/r/ibmcom/ace/ for building our ACE image that we ran in Kube.
Here is the deployment yaml we used (I redacted our image name and truststore password). We had separate yaml's for service and ingress artifacts.
Code: |
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ace-rad-deployment
labels:
app: ace-rad
spec:
replicas: 1
selector:
matchLabels:
app: ace-rad
template:
metadata:
labels:
app: ace-rad
spec:
containers:
- name: ace-rad
image: IMAGE NAME GOES HERE
env:
- name: LICENSE
value: accept
- name: MQ_QMGR_NAME
value: RAD_QM
- name: ACE_SERVER_NAME
value: RAD_ACE
- name: ACE_TRUSTSTORE_PASSWORD
value: PASSWORD GOES HERE
resources:
limits:
memory: "2Gi"
ports:
- containerPort: 7600
- containerPort: 7800
- containerPort: 7843
- containerPort: 1414
- containerPort: 9443
|
But the Kube part is easy, we spent most of the time on getting the image to work how we wanted.
And most of that work was adding scripts and files where the image expects to find things (mainly in /home/aceuser/initial-config sub-folders) to allow easy config of the image. |
|
Back to top |
|
 |
Pats21 |
Posted: Thu Feb 06, 2020 5:00 pm Post subject: |
|
|
Disciple
Joined: 08 Sep 2006 Posts: 154
|
Thank you for your response joebuckeye.
It was useful.
Additionally, I am trying to access the WebUI for the pod that is running as part of this deployment.
Can you let me know how to access the same? i.e. the IP Address and Port on which it would be available. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 07, 2020 1:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Pats21 wrote: |
Thank you for your response joebuckeye.
It was useful.
Additionally, I am trying to access the WebUI for the pod that is running as part of this deployment.
Can you let me know how to access the same? i.e. the IP Address and Port on which it would be available. |
Check the documentation. I believe by default you're looking at port 4414.
You need to make sure the port is open in the firewall and mapped / routed.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Fri Feb 07, 2020 3:06 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
I am trying to access the WebUI for the pod that is running as part of this deployment |
You will need to create an Ingress definition for that. |
|
Back to top |
|
 |
joebuckeye |
Posted: Fri Feb 07, 2020 9:18 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
There are a couple ways to get WebGUI access to your instance in the pod.
If you are on your local development machine you can set up a Service artifact using NodePorts.
Code: |
---
apiVersion: v1
kind: Service
metadata:
name: ace-rad
labels:
app: ace-rad
aprmid: "7076"
spec:
type: NodePort
selector:
app: ace-rad
ports:
- name: web-gui
protocol: TCP
port: 7600
nodePort: 31600
- name: ace-http
protocol: TCP
port: 7800
nodePort: 31800
- name: ace-https
protocol: TCP
port: 7843
nodePort: 31843
- name: mq
protocol: TCP
port: 1414
nodePort: 31414
- name: mq-console
protocol: TCP
port: 9443
nodePort: 31443
|
This names the ports you exposed in your deployment and the nodePort says what port to listen on your dev machine (in the above file that would be port 7600). But port mapping is very easy so you could make it anything you want.
If this was to be deployed to a Kube cluster then you still need the Service artifact but it would be different than the local nodePort one.
Code: |
---
apiVersion: v1
kind: Service
metadata:
name: ace-rad-service
labels:
app: ace-rad
aprmid: "7076"
spec:
selector:
app: ace-rad
ports:
- name: web-gui
protocol: TCP
port: 7600
- name: ace-http
protocol: TCP
port: 7800
- name: ace-https
protocol: TCP
port: 7843
- name: mq
protocol: TCP
port: 1414
- name: mq-console
protocol: TCP
port: 9443
|
Then you need to setup an Ingress as timber mentioned.
There is not much here because I blanked out our specific setup stuff and this would be very dependent on the infrastructure your Kube team has set up for you.
Code: |
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ace-rad-ingress
annotations:
kubernetes.io/ingress.class: "default"
kubernetes.io/tls-acme: "true"
spec:
tls:
- hosts:
- ace.example.com
secretName: ace-example-cert
rules:
- host: ace.example.com
http:
paths:
- backend:
serviceName: ace-rad-service
servicePort: ace-http
|
In the above Ingress we are only exposing the ace-http port (7800) to the outside world.
You can add more ports or URI mappings under the rules: stanza.
Good luck on your Kube journey BTW. I found it very flexible and quick and easy to modify once you get the basics down. You can create a basic ACE template and then start dropping in BAR files.
It is best when you can create a pipeline that detects code check in, builds a BAR file, creates a new image using that BAR file and then reloading your pod to use the new image. |
|
Back to top |
|
 |
timber |
Posted: Sat Feb 08, 2020 2:18 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
In case it helps, the OP is asking about IIB on Kubernetes. You can run IIB in Kubernetes but ACE is much easier because it has specific features that make it simple to create a container image for a BAR file. |
|
Back to top |
|
 |
joebuckeye |
Posted: Tue Feb 11, 2020 7:15 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
In my experience the Kube part is much easier than getting the IIB or ACE image working as you want it to. |
|
Back to top |
|
 |
|