Update: It’s now even easier! In 3 easy steps, you can use the Containers Service in IBM Bluemix to quickly get an IBM Integration Bus docker environment up and running; in less time than it takes to make a cup of tea!

This article describes how you can quickly get an IBM Integration Bus environment up and running within a Docker container¬†running¬†in the IBM Bluemix hosted cloud environment. ¬†If you follow the process outlined below, it shouldn’t take you any longer than about 15 minutes to get everything running! ¬†Since going on quite a dramatic diet in the lead up to the release of version 10 (March 2015), IBM Integration Bus now has a very small runtime footprint compared to many traditional enterprise IT stacks, such as application servers or databases. ¬†The “single package” zipped download file of IIBv10, which includes both the Eclipse based toolkit and also the runtime component, is approximately 1.2GB. Once installation is complete, the runtime server directory accounts for approximately 700MB on Windows for example. ¬†This small size, and zero mandatory pre-requisite products, makes it perfectly possible to easily build and run an IIB Docker image. ¬†To help users get started, a few months ago we published a Dockerfile on Github for the purpose of building such an image. ¬†You can do this on a laptop or desktop server, but with cloud based solutions becoming increasingly popular, this article provides a simple step-by-step guide for how to build and run IIB using Docker in IBM Bluemix. The whole process shouldn’t take any more than about 15 minutes to complete, so before you’re tempted to browse elsewhere let’s get cracking!

  1. If you’re completely new to these technologies, then you should begin by creating a free Bluemix Account, and within your organization, create a new space. ¬†In Bluemix you can use organizations and spaces to enable collaboration among users, and to help group together resources. ¬†You can manage access on a per-user basis. ¬†More information on these aspects can be found here. ¬†When you log in to your Bluemix dashboard, the icon in the top right corner allows you to manage your organizations. ¬†The rest of this article assumes you are using the US South Region of Bluemix. ¬†The Containers service on Bluemix has been available in this Region since June, and has just been made available in the London data center. ¬†So depending on your settings, you may need to change Region to get yourself access:Bluemix Manage OrganizationsIn the example shown, I’ve chosen to use a space named IIB:Bluemix define IIB space
  2. In order to get IIB running on the Bluemix Container Service, we will be building an IIB Docker image. ¬†This requires you to have a Docker environment in which to run the build. ¬†Developers wishing to explore Docker will frequently turn to a Linux Operating System or virtual machine environment to accomplish this. Browsing through any¬†simple introduction to Docker¬†will help explain this background, but to try and keep this article accessible to the widest group of readers possible, let’s focus on Windows. ¬†First you’ll need to prepare your system to build the image. ¬†At the time of writing (October 2015), you can download and install Docker v1.8.1 on Windows 64-bit from here. ¬†Create a build directory on your file system and copy in the download of docker-1.8.1.exe (add this to your PATH, or if you’re after a quick solution just rename the file to docker.exe). ¬†Second, you will need to install the Cloud Foundry CLI (version 6.11.3) from GitHub. ¬†In a moment we’ll also install the IBM Containers Cloud Foundry plugin, but we’ll show this from the command line. ¬†The last preparation step required for building the image is to get hold of a Dockerfile (and its associated scripts). ¬†Unrelated to the Containers service, we have already published some scripts which can be used to build an IIB Docker imag. ¬†Check out this project on Github¬†to find out more. For convenience, a¬†zip file is attached¬†to this article which contains a dockerfile and 4 associated shell scripts which works in the context of this example on the Containers Service. ¬†These scripts are very similar to those you will find on Github (the Dockerfile and iib_manage.sh have been editted slightly with regard to their usage of the root id, and to avoid packaging the IIB tooling into the Docker image). ¬†If you choose to locate all these components in one place, then the contents of your build directory (for example C:\Build) should end up looking like this:Picture16
  3. Open a command prompt window, navigate to the build directory (in this example on Windows, we have used C:\Build) and install the IBM Containers Cloud Foundry plugin:Install IBM Containers Cloud Foundry plugin
  4. Next, you need to log in to Bluemix. The -u parameter should be set to your IBM ID, and the -o parameter should be set to your organisation name (typically this will be the same value).  The -s parameter is the name of the space which you defined in step 1:cf login to Bluemix
  5. Now log in to the IBM Containers Service. ¬†login to the IBM Containers ServiceDon’t be concerned by the message about the local Docker daemon not running. ¬†By default at this point the docker command will expect a local daemon (hence the warning shown above), so we need to point to the containers service as the Docker host. To fix this, you need to set some environment variables to direct to the cloud: DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY. The path on your system may be different (you should be able to refer to the responses to your cf ic login command for help with this) but the values required on your system should look a bit like this:
    set DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
    set DOCKER_CERT_PATH=C:\Users\IBM_ADMIN\.ice\certs
    set DOCKER_TLS_VERIFY=1
  6. You can now build the image.  The command below creates an image named and tagged using the -t parameter.  The period character at the end of the command directs the docker build to the current directory in order to locate the Docker file. The process of building the image should take about 5 minutes to complete, so now might be a good time to grab a quick cup of tea!build the IIB docker imageOnce the build process completes, you should be able to list the docker images and the one you have just built and tagged should be included:list docker images
  7. You should now be able to return to your web browser and see the docker image which you have built (named iibdemo) in the Catalog view:view the IIB docker image
  8. Click on iibdemo and you can then use the image to start up a container. Choose a container name, select a size for the container and choose to Request and Bind a Public IP address for the container when it starts up. ¬†You will also need to expand the Advanced Options and set an Environment variable named LICENSE to the value “accept”. ¬†This manual step is an acknowledgement that you accept the terms of the IIB Developer edition license. ¬†If you don’t set this variable then the container will not start. ¬†Finally hit the CREATE button in the bottom right corner of the view:start the IIB container
  9. After a short wait, you should be shown a view of the running container:view the running container
  10. A node named IIBV10NODE should have been created for you within the container, so you should now be able to point your web browser at the IIB Web UI.  IIBV10NODE should be listening on port 9080, so construct the URL based on this port and the Public IP address which was assigned to the container.  In this example, this would be http://134.168.21.92:9080.  The picture below shows the IIB Web UI successfully connected:browse to the IIB web UI

This concludes our very brief exploration of how to get IBM Integration Bus up and running inside Docker using the IBM Container service on Bluemix.

[I’d like to thank Ashley Fernandez from the IBM Australia team for his joint collaboration on constructing this post!]

 

 

14 comments on"Using the Containers Service to run IBM Integration Bus in Bluemix in 10 easy steps!"

  1. Timm Bryant October 27, 2016

    I would like to access an on-premise MQ queue manager from this IIB installation. I’m new to BlueMix, so I’m not certain what additional components would need to be configured. A VPN service? An API-Gateway? Any pointers to where I can determine the proper way to configure this would be appreciated!

  2. Hello,

    Everything worked fine.
    But how can I establish a remote connection to the container from my local IIB10 installation?

    Thanks in advance.

  3. Ben could this be a conceivable method to run IIB for production integrations? I am looking for IIB solutions to support cloud integration that will provide 99.99 availability. IIBoC is very unstable right now.

  4. I got following error in Step 6.
    ————–
    Step 6 : RUN echo “IIB_10:” > /etc/debian_chroot && touch /var/log/syslog && chown syslog:adm /var/log/syslog && chmod +x /tmp/kernel_settings.sh && /tmp/kernel_settings.sh
    —> Running in 039aa87a59b0
    /bin/sh: 1: /tmp/kernel_settings.sh: Text file busy
    Removing intermediate container 039aa87a59b0
    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 && /tmp/kernel_settings.sh
    ‘ returned a non-zero code: 2
    ————–

    By slightly changing the Dockerfile, I could evade the error.
    —-before ——–
    RUN echo “IIB_10:” > /etc/debian_chroot && \
    touch /var/log/syslog && \
    chown syslog:adm /var/log/syslog && \
    chmod +x /tmp/kernel_settings.sh && \
    /tmp/kernel_settings.sh
    —-after ———-
    RUN echo “IIB_10:” > /etc/debian_chroot && \
    touch /var/log/syslog && \
    chown syslog:adm /var/log/syslog && \
    chmod +x /tmp/kernel_settings.sh
    RUN sync
    RUN /tmp/kernel_settings.sh
    ——————-

  5. Hi,

    I am getting this error after running command
    >cf ic login
    Client certificates are being retrieved from IBM Containers…
    FAILED
    The namespace must be set. Run “cf ic namespace set NAMESPACE” to set the namespace.

  6. I am not bale to login to IBM container in Step5, I have downloaded the IBM conainer from same site given in screenshot

    Client certificates are being retrieved from IBM Containers…
    FAILED
    Put https://containers-api.eu-gb.bluemix.net:8443/v3/tlskey/refresh: dial tcp 5.
    10.117.119:8443: ConnectEx tcp: A connection attempt failed because the connecte
    d party did not properly respond after a period of time, or established connecti
    on failed because connected host has failed to respond.

  7. Gurdeep Rahi November 21, 2015

    Great to see Docker support for some our middleware products as customers are beginning to ask for it.

  8. IIB Developer November 18, 2015

    I did all the above steps till step 9 , it is showing as you have given in the step 9 however the step 10 is not coming for me. when i checked with the command docker images it is showing size as 0 byte. i did not receive any error also.

    • Ben_Thompson November 23, 2015

      Hi IIB Developer,

      Thanks for your comment – are you sure you are able to get all the way to successfully starting the container (step 9)? If there was a problem in building the image I would have expected you to receive an error on trying to start up the container. When you run the command “docker images” you should see the image listed in your repository (something like “registry.ng.bluemix.net/YOURORG/iibdemo”) with the tag of “latest” and a virtual size. Is it this virtual size which is showing as 0 bytes? If you are still seeing issues perhaps you could email me the full output of the docker images command? … and any other errors you received along the way?

      Thanks again for your interest.

      Cheers,
      Ben

  9. IIB Developer November 05, 2015

    Hi I am getting this error rpc: can’t find method CliRpcCmd.IsMinCliVersion

    c:\build>cf ic login
    rpc: can’t find method CliRpcCmd.IsMinCliVersion

    • Ben_Thompson November 05, 2015

      Hi there, it looks like this could be caused by your version of the Cloud Foundry plugin not being recent enough for the Containers Service – check out this link which discusses this: https://www.ng.bluemix.net/docs/containers/container_troubleshoot.html

      • IIB Developer November 05, 2015

        Thanks , I have another issue. is there any additional step i need to follow?
        c:\build1>docker build -t iibdemo:latest .
        Post http://127.0.0.1:2375/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpus
        etcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&memory=0&memswap=0&rm=1&t=
        iibdemo%3Alatest&ulimits=null: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connec
        tion could be made because the target machine actively refused it..
        * Are you trying to connect to a TLS-enabled daemon without TLS?
        * Is your docker daemon up and running?

        • Ben_Thompson November 05, 2015

          My apologies – the intention in step 6 is to leverage the Docker CLI to run the IBM Containers in the cloud. By default the docker command will expect a local daemon (hence the error you received getting you to check the daemon is up and running). To fix this, you need to set some environment variables to direct to the cloud (I think this advice is actually printed out at the end of the response in step 5, but I failed to clearly direct you to do this in the article instructions – so I am sorry about that …. will edit the text!). So, to fix, set up the environment variables for DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY. For example on my system (the path you wish to use for the certificates may be different on your system):

          set DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
          set DOCKER_CERT_PATH=C:\Users\IBM_ADMIN\.ice\certs
          set DOCKER_TLS_VERIFY=1

Join The Discussion

Your email address will not be published. Required fields are marked *