Appendix A: How to run a free Docker IBM® MQ for Developers on Windows, Linux and AWS EC2

« Back to tutorials home

Running free IBM® MQ for Developers (and Testers)

IBM have released a special IBM® MQ for Developers (and Testers) you can run for free. There are two main options how to run it. We will focus on the docker version, because it is easier to set up in our opinion. Not everybody has access to a Linux box, so we will show you how to use the free tier AWS EC2 virtual machine for that.

Running on Docker in AWS free tier from Windows

Unfortunately it is not possible to run Docker Linux images on Windows systems. So you cannot run a Docker IBM MQ for Developers on your Windows laptop. To work around that we will use a free AWS Linux virtual machine. We will sign up for a free AWS EC2 account, run a Linux VM there, install docker and run IBM MQ. AWS free tier will allow you to use a Linux host for a year free of charge.
Running free IBM MQ for developers on AWS EC2 free tier
Running free IBM MQ for developers on AWS EC2 free tier
Follow these steps to install a Docker IBM® MQ for Developers on AWS free tier:
  1. Create a free account on the AWS website. You will need a credit or debit card to register, but it will not be charged as long as you use the free tier only. Please note it might take up to 24 hours to activate your account.
  2. Create a linux virtual machine instance on AWS EC2. Make sure you keep the PEM file you have downloaded, you will use it to connect to the virtual machine very soon using PuTTY.
  3. Download PuTTY and PuTTYGen
  4. Connect using PuTTY to your AWS EC2 Linux instance
  5. You should now see a PuTTY connected to your instance
    Connected to EC2
  6. Run the following commands to update yum and install docker, and make sure you do not get any errors:
    sudo yum update -y
    sudo yum install docker -y
    Install docker
    sudo service docker start
    Started docker
    sudo docker run hello-world
    Connected to EC2
  7. Display, read and make sure you understand and are OK with the IBM® MQ license by running:
    sudo docker run --env LICENSE=view ibmcom/mq:9
    You will be accepting the license in the next step.
    Connected to EC2
  8. Run Docker MQ (please notice that by setting LICENSE=accept you are accepting the license you have seen in the previous step):
    sudo docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --volume /var/example:/mnt/mqm --publish 1414:1414 --publish 9443:9443 --detach ibmcom/mq:9
    Connected to EC2
  9. Allow for connections from your IP to the AWS EC2 instance on ports used by IBM® MQ (1414 and 9443) by adding new rules to the security group. Note that if your IP changes, you will loose the connectivity and have to do this step again.
  10. You can test the connection by using a web browser to connect to the web console. Open this URL in your browser https://your-ec2-hostname:9443/admin/ and use username admin and password passw0rd.
  11. Done! Your MQ instance is up and running. You can now try connecting to it with your application and Traffic Parrot by pointing them at your-ec2-hostname, port 1414, queue manager name QM1, username app and an empty password. There are a few default queues and topics defined there which you can use, if you need more you will have to add them. For more details see instruction at the official IBM® MQ docker image website.
  12. Next step, follow the JMS IBM® MQ mocking and service virtualization tutorial to learn how to simulate systems communication using IBM® MQ queues and topics and test your software in isolation. It will help you find more bugs and reduce time it takes to test.