IBM MQ Bridge to blockchain

At IBM MQ version 904, the IBM MQ Bridge to blockchain is available on Linux for connecting to advanced queue managers. Version 903 IBM MQ Bridge to blockchain for connecting to z/OS queue managers worked with the initial beta service in IBM Cloud. As we were preparing for 904, the IBM Blockchain offering expanded to include the Blockchain platform, Hyperledger Fabric, Hyperledger Composer, and several ways to explore setting up your own blockchain network that includes some sample blockchain networks that helped us get started. We tested the 904 bridge with two example networks and wanted to share how we set them up. We worked with:
  • A Local Hyperledger Fabric network built with Docker and the Fabcar sample
  • A Kubernetes container cluster network with the Example02 sample
In this post we share the steps for configuring an Ubuntu system for the local Hyperledger Fabric network. We used Docker and the Fabcar sample chaincode. Look out for the Part 2 post where we share our steps for the Kubernetes cluster network example.

Configuring a local Hyperledger Fabric network built with Docker and the Fabcar sample

  1. Install the current hyperledger fabric prereqs. New version of docker, docker-compose and cURL - (i.e. apt-get install docker-compose; apt-get install curl).
  2. (Optional) Add docker service to start on machine startup.
  3. Add the docker group if it doesn't already exist:
    sudo groupadd docker
  4. Add the user "$USER" to the docker group. Change the user name to match your preferred user. If you do not want to use your current user:
    sudo gpasswd -a $USER docker
  5. Run "newgrp docker" or log out/in to activate the changes to groups
  6. Use "docker run hello-world" to check if you can run docker without sudo
  7. Download Hyperledger Fabric samples:
    git clone
  8. Download platform specific binaries:
    cd fabric-samples; curl -sSL | bash -s 1.0.0
  9. Add platform specific binaries bin directory to your PATH and in your .profile to preserve on reboot
  10. Run the script to create fresh SSL certificates:
    cd basic-network;./
  11. Edit basic-network/docker-compose.yml:
    • Under the CA docker image configuration, replace:
      command: sh -c 'fabric-ca-server start
      --ca.certfile /etc/hyperledger/fabric-ca-server-config/
      --ca.keyfile /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk
      -b admin:adminpw -d'
    • With:
      command: sh -c 'fabric-ca-server start
      --ca.certfile /etc/hyperledger/fabric-ca-server-config/
      --ca.keyfile /etc/hyperledger/fabric-ca-server-config/replace_value_with_new_key_file
      -b admin:adminpw -d'
    • Where replace_value_with_new_key_file is the newly generated *_sk file found under "fabric-samples/basic-network/crypto-config/peerOrganizations/".
  12. Start the fabcar demo:
    If you reboot your machine, you'll have to rerun this command or add it to a startup job.

Configuring the IBM MQ Bridge to blockchain to connect to your Fabcar blockchain network

Once the Hyperledger Fabric containers are running, you can start configuring your IBM MQ Bridge to blockchain. You will need several parameters from your docker-compose.yml configuration file to allow the bridge to successfully connect to your Fabcar blockchain network. See Configuring IBM MQ for use with blockchain for more information.  

Join The Discussion

Your email address will not be published.