Friday, 11 May 2018

IBM Integration Bus on Docker - Story of a tinkerer

Following this recipe: -

I started by pulling the Git repo: -

and then built the Docker image: -

cd iib-docker/

ls -al

total 32
drwxr-xr-x  6 davidhay  staff   192 11 May 10:15 .
drwxr-xr-x  4 davidhay  staff   128 10 May 13:33 ..
-rw-r--r--  1 davidhay  staff  1975 11 May 10:15 Dockerfile
-rw-r--r--  1 davidhay  staff  1460 10 May 13:33
-rw-r--r--  1 davidhay  staff   410 10 May 13:33
-rw-r--r--  1 davidhay  staff  2611 10 May 13:33

docker build -t iibv10image .

and spun up a container: -

docker run --name myNode -e LICENSE=accept -e NODENAME=MYNODE -P iibv10image

Sourcing profile
Version:      ''
Product:      'IBM Integration Bus'
Build Number: '490'
IE02 level:   'ie02-L20140415-1143'
IB Level:     'ib1000-L171130.490_P'
Server level: 'S1000-L171127.10584'
Toolkit level:'20171121-1732' [not installed]
Node MYNODE does not exist...
Creating node MYNODE
BIP8071I: Successful command completion. 
Starting syslog
Starting node MYNODE
BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem. 
Creating integration server default
BIP1124I: Creating integration server 'default' on integration node 'MYNODE'...
BIP1117I: The integration server was created successfully. 

The integration node has initialized the integration server.
BIP8071I: Successful command completion.
Running - stop container to exit

and then checked for the listening ( and mapped ) ports: -

docker port myNode

4414/tcp ->
7800/tcp ->

and then hit up IIB: -


Having deployed a Broker Archive (BAR) file to the Integration Server, I was able to hit my flow: -

Nice !

For the record, the Dockerfile: -

# © Copyright IBM Corporation 2015.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at

FROM ubuntu:16.04

LABEL maintainer "Dan Robinson , Sam Rogers "

LABEL "ProductID"="447aefb5fd1342d5b893f3934dfded73" \
      "ProductName"="IBM Integration Bus" \

# Install curl
RUN apt-get update && \
    apt-get install -y curl rsyslog sudo && \
    rm -rf /var/lib/apt/lists/*

# Install IIB V10 Developer edition
RUN mkdir /opt/ibm && \
   curl \
   | tar zx --exclude iib- --directory /opt/ibm && \
   /opt/ibm/iib- make registry global accept license silently

# Configure system
RUN echo "IIB_10:" > /etc/debian_chroot  && \
    touch /var/log/syslog && \
    chown syslog:adm /var/log/syslog

# Create user to run as
RUN useradd --create-home --home-dir /home/iibuser -G mqbrkrs,sudo iibuser && \
    sed -e 's/^%sudo .*/%sudo ALL=NOPASSWD:ALL/g' -i /etc/sudoers

# Increase security
RUN sed -i 's/sha512/sha512 minlen=8/'  /etc/pam.d/common-password && \
    sed -i 's/PASS_MIN_DAYS\t0/PASS_MIN_DAYS\t1/'  /etc/login.defs && \
    sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t90/'  /etc/login.defs

# Copy in script files
COPY /usr/local/bin/
COPY /usr/local/bin/
COPY /usr/local/bin/
RUN chmod +rx /usr/local/bin/*.sh

# Set BASH_ENV to source mqsiprofile when using docker exec bash -c
ENV BASH_ENV=/usr/local/bin/

# Expose default admin port and http port
EXPOSE 4414 7800

USER iibuser

# Set entrypoint to run management script

leads me to believe that I could use other versions of IIB or even AppConnect Enterprise (ACE), which is kinda like IIB v11: -

No comments: