Giter Site home page Giter Site logo

iib-docker's Introduction

Please note that we have now released IBM App Connect Enterprise v11, which you can find at ot4i/ace-docker

Overview

This repository contains a Dockerfile and some scripts which demonstrate a way in which you might run IBM Integration Bus in a Docker container.

This repository also contains a Dockerfile and some scripts which demonstrate a way in which you might run IBM Integration Bus with an [IBM MQ] Server(http://www-03.ibm.com/software/products/en/ibm-mq).

IBM would welcome feedback on what is offered here.

Docker Hub

A pre-built version of the stand-alone IIB image is available on Docker Hub as ibmcom/iib with the following tags:

A pre-built version of the IIB with MQ Server image is available on Docker Hub as ibmcom/iib-mq-server with the following tags:

Building the image

The image can be built using standard Docker commands against the supplied Dockerfile. For example:

cd 10.0.0.11/iib
docker build -t iibv10image .

This will create an image called iibv10image occupying approximately 1.15GB of space (including the size of the underlying Ubuntu base image) in your local Docker registry:

REPOSITORY     TAG       IMAGE ID        CREATED          SIZE
iibv10image    latest    b8403ecfcd0d    2 seconds ago    1.15GB
ubuntu         14.04     132b7427a3b4    3 weeks ago      188MB

If you wish to build the image with an MQ install, then run something like the following:

cd 10.0.0.11/iib-mq-server
docker build -t iib-mq-image .

What the image contains

The built image contains a full runtime installation of IBM Integration Bus for Developers Edition V10.0. If you wish to include the toolkit in your installation then you should build your own version of our Dockerfile but with the --exclude iib-10.0.0.11/tools part of the tar command removed.

If you install the stand-alone image, which does not contain an installation of IBM MQ, some functionality may not be available, or may be changed - see this topic for more information.

Running a container

After building a Docker image from the supplied files, you can run a container which will create and start an Integration Node to which you can deploy integration solutions.

Running with the default configuration

In order to run a container from this image, it is necessary to accept the terms of the IBM Integration Bus for Developers license. This is achieved by specifying the environment variable LICENSE equal to accept when running the image. You can also view the license terms by setting this variable to view. Failure to set the variable will result in the termination of the container with a usage statement. You can view the license in a different language by also setting the LANG environment variable.

In addition to accepting the license, you can optionally specify an Integration Node name using the NODENAME environment variable and an Integration Server name using the SERVERNAME environment variable. If using the image with MQ, you can also specify a Queue Manager name using the MQ_QMGR_NAME environment variable.

The last important point of configuration when running a container from this image, is port mapping. The Dockerfile exposes ports 4414 and 7800 by default, for Integration Node administration and Integration Server HTTP traffic respectively. This means you can run with the -P flag to auto map these ports to ports on your host. Alternatively you can use -p to expose and map any ports of your choice. The same applies to the image with MQ where the additional port exposed by default is 1414 for the MQ listener.

For example:

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

If you wish, you can also deploy an IBM Integration Bus BAR file by specifying a Docker volume which makes the BAR file(s) available when the container is started:

docker run --name myNode -v  /local/path/to/BARs:/tmp/BARs/<yourbars> -e LICENSE=accept -e NODENAME=MYNODE -e SERVERNAME=MYSERVER -P iibv10image 

This will run a container that creates and starts an Integration Node called MYNODE and exposes ports 4414 and 7800 on random ports on the host machine. At this point you can use:

docker port <container name>

to see which ports have been mapped then connect to the Node's web user interface as normal (see [verification](# Verifying your container is running correctly) section below).

Running with the default configuration and a volume

The above example will not persist any configuration data or messages across container runs. In order to do this, you need to use a volume. For example, you can create a volume with the following command:

docker volume create qm1data

You can then run a queue manager using this volume as follows:

docker run --name myNode -e LICENSE=accept -e NODENAME=MYNODE -e SERVERNAME=MYSERVER -e MQ_QMGR_NAME=QM1 -v qm1data:/mnt/mqm -P iibv10image

The Docker image always uses /mnt/mqm for MQ data, which is correctly linked for you under /var/mqm at runtime. This is to handle problems with file permissions on some platforms.

Customizing the queue manager configuration

You can customize the configuration in several ways:

  1. By creating your own image and adding your own MQSC file into the /etc/mqm directory on the image. This file will be run when your queue manager is created.
  2. By using remote MQ administration, via an MQ command server, the MQ HTTP APIs, or using a tool such as the MQ web console or MQ Explorer.

Note that a listener is always created on port 1414 inside the container. This port can be mapped to any port on the Docker host.

Running administration commands

You can run any of the Integration Bus commands using one of two methods:

Directly in the container

Attach a bash session to your container and execute your commands as you would normally:

docker exec -it <container name> /bin/bash

At this point you will be in a shell inside the container and can source mqsiprofile and run your commands.

Using Docker exec

Use Docker exec to run a non-interactive Bash session that runs any of the Integration Bus commands. For example:

docker exec <container name> /bin/bash -c mqsilist

Running MQ commands

It is recommended that you configure MQ in your own custom image. However, you may need to run MQ commands directly inside the process space of the container. To run a command against a running queue manager, you can use docker exec, for example:

docker exec -it <container name> dspmq

Using this technique, you can have full control over all aspects of the MQ installation. Note that if you use this technique to make changes to the filesystem, then those changes would be lost if you re-created your container unless you make those changes in volumes.

Accessing logs

This image also configures syslog, so when you run a container, your node will be outputting messages to /var/log/syslog inside the container. You can access this by attaching a bash session as described above or by using docker exec. For example:

docker exec <container id> tail -f /var/log/syslog

Verifying your container is running correctly

Whether you are using the image as provided or if you have customised it, here are a few basic steps that will give you confidence your image has been created properly:

  1. Run a container, making sure to expose port 4414 to the host - the container should start without error
  2. Run mqsilist to show the status of your node as described above - your node should be listed as running
  3. Access syslog as descried above - there should be no errors
  4. Connect a browser to your host on the port you exposed in step 1 - the Integration Bus web user interface should be displayed.

At this point, your container is running and you can deploy integration solutions to it using any of the supported methods.

List of all Environment variables supported by this image

  • LICENSE - Set this to accept to agree to the MQ Advanced for Developers license. If you wish to see the license you can set this to view.
  • LANG - Set this to the language you would like the license to be printed in.
  • NODENAME - Set this to the name you want your Integration Node to be created with.
  • SERVERNAME - Set this to the name you want your Integration Server to be created with.
  • MQ_QMGR_NAME - Set this to the name you want your Queue Manager to be created with.
  • MQ_APP_PASSWORD - Changes the password of the app user. If set, this will cause the IIB.SVRCONN channel to become secured and only allow connections that supply a valid userid and password. Must be at least 8 characters long.

Issues and contributions

For issues relating specifically to this Docker image, please use the GitHub issue tracker. For more general issues relating to IBM Integration Bus or to discuss the Docker technical preview, please use the Integration Community. If you do submit a Pull Request related to this Docker image, please indicate in the Pull Request that you accept and agree to be bound by the terms of the IBM Contributor License Agreement.

License

The Dockerfile and associated scripts are licensed under the Eclipse Public License 1.0. Licenses for the products installed within the images are as follows:

  • IBM Integration Bus for Developers is licensed under the IBM International License Agreement for Non-Warranted Programs. This license may be viewed from the image using the LICENSE=view environment variable as described above.
  • IBM MQ Advanced for Developers is licensed under the IBM International License Agreement for Non-Warranted Programs. This license may be viewed from the image using the LICENSE=view environment variable as described above.
  • License information for Ubuntu packages may be found in /usr/share/doc/${package}/copyright

Note that the IBM Integration Bus for Developers license does not permit further distribution. The IBM MQ Advanced for Developers license does not permit further distribution and the terms restrict usage to a developer machine.

iib-docker's People

Contributors

alfredoweinberg avatar bthomps avatar dcb-robinson avatar geleji avatar ibmrob avatar jfluitsma avatar s-rogers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iib-docker's Issues

Support for volumes

It seems that currently the /var/mqsi structure is created during the Docker build phase, meaning that any volumes attached later at the same point (e.g., when starting the container for the first time) will hide all of the IIB data. It would be nice to have the option of populating /var/mqsi on container start, so that volumes could be handled correctly.

Build issue

Hello ,
I am using windows 8.1 machine,downloaded the docker tool kit.
I cloned the iib-docker to local repo.
Then,i ran the command
docker build -t iib-docker .
But the unable to view the image name with the command docker images ,i am getting
please help me
asd

Guide for deploying on Openshift

Hi,
we are facing many problems deploy the image on Openshift..
Could you please provide a "How-To" guide?
it would be very usefull..
Thanks!

Adminstartion UI not accessible from local

I am not able to access the admin UI from my local laptop even after exposing the port number 4414.

<.0.7/server/bin$ mqsilist DOCKER -e Exec_Grp_Common
BIP1877I: REST API 'nw_services_oms_v1' on integration server 'Exec_Grp_Common'
is running.
BIP1273I: Shared library 'nw_common_subflows' is deployed to integration server
'Exec_Grp_Common'.
BIP8071I: Successful command completion.

And even rest api is not accessible.

Command used to expose the port.

docker run -d --name iib10_common -p 4414:4414 dtr.nwie.net/dgs/iibv10.0.0.7base:Common

Any leads would be appreciated

exec format error as of 32d2f18

Via the latest commit 32d2f18 I receive the following error when attempting to run the container:

standard_init_linux.go:195: exec user process caused "exec format error"

docker version info:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:11:19 2017
OS/Arch: linux/amd64

Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:53 2017
OS/Arch: linux/amd64
Experimental: false

Rebuilt from source using commit 159ce4f and confirmed that it works without issue on the same box / configuration.

mqsicreateexecutiongroup command is not working in docker container

Hi,

I am trying to create the Integration server inside the node , node is created in the docker container.
I have tried couple of options but all have failed .One of the sample failed command is below one .

  1. sudo docker exec 3c093a9d8846 /bin/bash -c mqsicreateexecutiongroup -n 'IIBV10NODE' -i "http://3c093a9d8846:4414" -e IntServer

Here is the output of the command as below..


Sourcing profile

BIP1121I: Creates an integration server.

Syntax:
mqsicreateexecutiongroup integrationNodeSpec -e integrationServerName [-w timeoutSecs] [-v traceFileName]

Command options:
'integrationNodeSpec' is one of:
(a) 'integrationNodeName' : Name of a locally defined integration node
(b) '-n integrationNodeFileName' : File containing remote integration node connection parameters (*.broker)
(c) '[integrationNodeName] -i ipAddress -p port' : hostname and port of a remote integration node. 'integrationNodeName' optional for validation.
(d) '[integrationNodeName] -i uri' : URI for the remote integration node in the form tcp://[[:]@]:
If a user name and password are supplied, any URI Reserved characters in the password must be percent-encoded.
'-e integrationServerName' name of the new integration server
'-w timeoutSecs' maximum number of seconds to wait for the integration server to be created (default is 60)
'-v traceFileName' send verbose internal trace to the specified file.

Please let me know if you have this working sample command which can be executed from the docker command prompt.

Docker exec command does not work as provided

This command ๐Ÿ‘Ž Using Docker exec

Use Docker exec to run a non-interactive Bash session that runs any of the Integration Bus commands. For example:

docker exec /bin/bash -c mqsilist

works if changed to

docker exec -it /bin/bash -c mqsilist

Trying to run this image on Openshift but getting the permission error.

Failed to open file /var/mqsi/registry/BIP15063/HASharedWorkPath with error Perm
ission denied
BIP2113E: Integration node internal error: diagnostic information ''Permission d
enied'', '13', ''/var/mqsi/registry/BIP15063/HASharedWorkPath''.
An internal software error has occurred in the integration node. Further messag
es will indicate the effect of this error on the integration node's transactions
.
Shutdown and restart the integration node. If the problem continues to occur, t
hen restart the system. If the problem still continues to occur contact your IB
M support center.

BIP8081E: An error occurred while processing the command.
An error occurred while the command was running; the command has cleaned up and
ended.
Use messages prior to this one to determine the cause of the error.
Check for some common problems:
Does the user id have the correct authorities (for example a member of the mqbr
krs group)?
Is any operating system limit set too low to allow the command to run?
Is the environment correctly set up?
Correct the problem and retry the command, otherwise, contact your IBM support
center.


Node MYNODE does not exist...
Creating node MYNODE
Failed to open file /var/mqsi/registry/MYNODE/HASharedWorkPath with error Permis
sion denied
Failed to open file /var/mqsi/registry/MYNODE/HASharedWorkPath with error Permis
sion denied
BIP8081 An exception was caught while processing the command, 'Unable to format
an ImbException message for output, ImbException message number is BIP2113'.

IIB Docker Image: Configuring Broker while creating the Image

IBM IIB image comes with only few instructions.
Create Integration node, if it doesn't exist
Create Integration servers
Deploy bar file.

Did anyone tried Configuring a full functional IIB while creating image
Operations such as
Configuring SSL
ODBC Setup
LDAP Authentication for WebGUI?

I was trying to use IBM provided Image as base and tried to implement this, but while executing the steps I am getting below error.
"mqsilist: not found"

It is not recofnising any mqsi commands.

Any pointers?

Thanks

create broker with -w

it's less an issue - more enhancement request:

  • expose a volume in the dockerfile: VOLUME /var/mqsi/data
  • change iib_manage.sh: mqsicreatebroker $NODE_NAME -w /var/mqsi/data
    This would give us the option to mount an external volume to store broker runtime data
    Cheers
    Joerg

docker build command accepts lowercase only

docker build -t IIBV10IMAGE .
repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"

docker build -t iibv10image .
Sending build context to Docker daemon 11.26 kB
Step 0 : FROM ubuntu:14.04
14.04: Pulling from library/ubuntu

iib with ibmmq

Any info on how to integrate iib and mq? The most desired state is running each in their own container. On docker side, I am using userdefined network and already put both container on the created network, they have dns visibility to each other.

Vulnerability Assessment on Bluemix

the security assessment on bluemix required four actions:

  • update /etc/login.defs with PASS_MAX_DAYS 90
  • update /etc/login.defs with PASS_MIN_LEN >=8
  • upgrade libssl
  • upgrade libgnutls
    Recommended fixes:
  • add login.defs to github and copy it into the image
  • extend the Dockerfile with:
    RUN apt-get update &&
    apt-get dist-upgrade -y

Cheers
Joerg

How to run without admin right (OpenShift by default das not allow this)

Hi,

I try to make my image run on OpenShift and they by default prevent you to run you image as root. They basically logon with the -u option as a random user. And this also prevents the use of sudo.

Is there any option to get the iib logs without sudo /usr/sbin/rsyslogd.

Thanks in advance.

Dennis

PS: There is an option to allows root access in OpenShift, but that would be a last resort.

Build with Docker for Mac

Docker released a new version for Mac called "Docker for Mac". I have installed this new Docker on my Mac 10.10.5 and tried building the docker image with the instructions provided but it didn't work for me. When I downloaded the 10.0.0.4 and executed the command docker build -t iibv10image this is what I got

"docker build" requires exactly 1 argument(s).
See 'docker build --help'.

Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Did anyone run into a similar issue?

docker pull

I am following docker hub description and usage and ran through following commands but container is not running.

docker pull ibmcom/iib
and then
docker run --name myNode -e LICENSE=accept -e NODENAME=MYNODE -e SERVERNAME=MYSERVER -P iib

I am getting below messages but container is not starting up

_Sourcing profile
Set environment variable LICENSE=accept to indicate acceptance of license terms and conditions.

License agreements and information can be viewed by running this image with the environment variable LICENSE=view. You can also set the LANG environment variable to view the license in a different language._

Administration commands not working if i run inside the container

I am trying to execute mqsilist command by logging into IIB container but i am getting below error. I am running the command as iibuser. The executable is in following path /opt/ibm/iib-10.0.0.11/server/bin and i also noticed all the files present in bin directory are having '' end of each file.
ls -ltr is showing like below for all the files.
Ex: mqsilist

./mqsilist:error while loading shared libaries:libImbCmdLib.so cannot open such shared object file:No such file or Directory

But i am able to execute the below command. So, if i run the command without logging in the container its working but the same command if i run inside the container its not working which is strange to me.
docker exec /bin/bash -c mqsilist

Could you please help me what could be the issue.

Build on windows 7 with VirtualBox

To get an image build I had to make a few changes to the Dockerfile. It might be ignorance on my side but I thought I would share anyway as it might be helpful.
Dockerfile:

  1. downloading the 1.2GB install using curl did not work for me. Instead I included the *.tar.gz in the build files. As a result my container file size is 3.3GB :(
  2. the --exclude options for the tar gave errors and I had to remove that
  3. /etc/sudoers does not exist

iib_manage.sh:

  1. sudo does not exist

Everything works 100% now. Thank you for sharing and getting me started.
Amanda

/tmp/kernel_settings.sh: not found Docker 1.10.3 / OSX and WIN7

Hi everyone,

I have the following error after cloning the project and running 'docker build -t iib10v4 .' under Docker version 1.10.3 on OSX and WIN7. Any suggestions? Thanks!

Step 7 : COPY kernel_settings.sh /tmp/
 ---> c923d36480a4
Removing intermediate container fa15c7540018
Step 8 : RUN echo "IIB_10:" > /etc/debian_chroot  &&     touch /var/log/syslog &&     chown syslog:adm /var/log/syslog &&     chmod +x /tmp/kernel_settings.sh;sync &&     /tmp/kernel_settings.sh
 ---> Running in 7bcbfa166e46
/bin/sh: 1: /tmp/kernel_settings.sh: not found
The command '/bin/sh -c echo "IIB_10:" > /etc/debian_chroot  &&     touch /var/log/syslog &&     chown syslog:adm /var/log/syslog &&     chmod +x /tmp/kernel_settings.sh;sync &&     /tmp/kernel_settings.sh' returned a non-zero code: 127

Best Regards
Dennis

MQTT not starting up when running on Windows 10

When I run this container using Docker for Windows on Windows 10 the MQTT process is failing to start.

Here are the contents of the file /var/mqsi/components/MYNODE/stderr:

Sourcing profile

2017-10-03 13:50:44.627996 AdminAgent started. Process ID : 120 Broker is: MYNODE
1507038646: mosquitto version 1.4 (build date 2015-02-18 23:32:10+0000) starting
1507038646: Config loaded from /var/mqsi/components/MYNODE/config/MYNODE.
1507038646: Opening ipv4 listen socket on port 11883.
1507038646: Opening ipv6 listen socket on port 11883.
1507038646: Error: Cannot assign requested address
1507038653: mosquitto version 1.4 (build date 2015-02-18 23:32:10+0000) starting
1507038653: Config loaded from /var/mqsi/components/MYNODE/config/MYNODE.
1507038653: Opening ipv4 listen socket on port 11883.
1507038653: Opening ipv6 listen socket on port 11883.
1507038653: Error: Cannot assign requested address

When I run the container on a Linux node MQTT starts up ok.

Any hints for what might be causing this issue?

Docker file with toolkit

I am planning to build custom image for dynamic devops environment. I will use the IIB custom image to build the artifact. I think we should provide info on how that can be achieved.

The only issue with current image is doesnt support full compilation using mqsicreatebar which required toolkit to be started on the backend.

Let me know if it is ok to add a new PR for a seperate Docker file with toolkit support. I am sure many will benefit from it.

Thanks.

Kernel config file

In the kernel_settings.sh file:
Line 15 and Line 18 are the same.
What is the point in having kernel.shmall twice in the file?

db2 client

Is the db2 client part of the container?

installation failed

I had to change the tar command from 'zx' to 'zxv' to enable the download and the extraction of the IIB archive file.
J.

Building on MAC OS X

I had to modify the script slightly to be able to build on a MAC (El Capitan, saw same comments for windows 7), added;
syslog and sudo
RUN apt-get update &&
apt-get install -y sudo &&
apt-get install -y rsyslog &&
apt-get install -y curl &&
rm -rf /var/lib/apt/lists/*

Made sure /etc/sudoers exists

Create user to run as

RUN useradd --create-home --home-dir /home/iibuser -G mqbrkrs,sudo iibuser &&
touch /etc/sudoers &&
sed -e 's/^%sudo .*/%sudo ALL=NOPASSWD:ALL/g' -i /etc/sudoers

Runs OK for me after this.
Thanks for the initial script.

toolkit omitted

What the image contains (...) full installation of IBM Integration Bus for Developer

This is misleading since at installation following argument omits the installation of the toolkit:

--exclude iib-10.0.0.11/tools

Without the tools we cannot automate .bar file building and deploying.

IIB docker build errors.

It looks like using current docker file I ran into two issues..

Issue 1 : $ docker build -t iibV10image .
repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"

I had to update the name docker build -t iibv10image .

Issue 2 : $ docker build -t iibv10image .
Erro : /bin/sh: 1: /tmp/kernel_settings.sh: Text file busy

I had to update the docker file to include the sync and it works now.

chmod +x /tmp/kernel_settings.sh &&
to
chmod +x /tmp/kernel_settings.sh;sync && \

standard_init_linux.go:195: exec user process caused "exec format error"

When I attempt to run a ibmcom/iib-mq-server:latest image from Docker Hub, I get an error as in the title.

After some research I have learned that such an error could be caused because the shell scripts contain CRLF as line breaks instead of the Unix standard LF. It is likely that the image on Docker Hub is built using the shell scripts with the line breaks as CRLF, causing this issue.

Could someone please verify this and push updated images to the Docker Hub?

Unable to create image: Error- not in gzip format

Unable to create image. Can you please help me what I have to do to fix this issue.
Machine: Mac OS.
Error:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Screenshot 2020-04-23 at 16 19 44

https

Is it possible to use HTTPS instead of HTTP (port 7843 instead of 7800) with this iib container?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.