In this step you will create the Docker image for the IBM® MQ broker we are using to simulate the on-premises broker.
It's required to have Git installed and configured on yout machine.
Clone the 'mq-container' GitHub project by running the following comand:
git clone https://github.com/ibm-messaging/mq-container.git
In this step, we are creating the Docker image, by running the following commands:
cd mq-container
git checkout b751640b79a9a40031f23f9bb473aec68b691170
make build-devserver
Now we are tagging the locally created Docker image with the tag '9.1.0.0' and 'latest' and pushing it to your ECR repository.
region=$(aws configure get region)
accountid=$(aws sts get-caller-identity --query Account --output text)
aws ecr get-login-password \
--region $region | docker login \
--username AWS \
--password-stdin $accountid.dkr.ecr.$region.amazonaws.com
aws ecr create-repository \
--repository-name amazon-mq-migration-from-ibm-mq/mqadvanced-server-dev
docker tag mqadvanced-server-dev:9.1.0.0-x86_64-ubuntu-16.04 $accountid.dkr.ecr.$region.amazonaws.com/amazon-mq-migration-from-ibm-mq/mqadvanced-server-dev:9.1.0.0
docker push $accountid.dkr.ecr.$region.amazonaws.com/amazon-mq-migration-from-ibm-mq/mqadvanced-server-dev:9.1.0.0
docker tag mqadvanced-server-dev:9.1.0.0-x86_64-ubuntu-16.04 $accountid.dkr.ecr.$region.amazonaws.com/amazon-mq-migration-from-ibm-mq/mqadvanced-server-dev:latest
docker push $accountid.dkr.ecr.$region.amazonaws.com/amazon-mq-migration-from-ibm-mq/mqadvanced-server-dev:latest
docker run -it --rm -e LICENSE=accept -e MQ_QMGR_NAME=QMGR -p 9443:9443 -p 1414:1414 mqadvanced-server-dev:9.1.0.0-x86_64-ubuntu-16.04
To access the service, go to:
https://127.0.0.1:9443/ibmmq/console/
Because the MQ Console is using a self-signed certificate, it's required to accept connections to an URL which look insecure.
To log in to the IBM Console, you have to use the following default credentials (you can find all default credentials and a description, how to change it, here):
- User: admin
- Password: passw0rd
After a successful login, you should see a screen similar to this one:
To be able to run this step, it's required to have the AWS CLI installed!
Now we are ready to run run our IBM® MQ broker as Amazon ECS task in Fargate. Run the first command from the root directory of this project to launch the AWS CloudFormation template. The second command will wait, until the AWS CloudFormation stack was launched successfuly and is ready to use. Alternatively, you can also open your CloudFormation console and watch the resource creation process. It takes ~ 3 minutes to complete:
aws cloudformation create-stack \
--stack-name ibm-mq-broker \
--template-body file://ibm-mq-broker.yaml \
--capabilities CAPABILITY_IAM
aws cloudformation wait stack-create-complete \
--stack-name ibm-mq-broker
In your Fargate console you should see one running task with the task definition name ibm-mq-broker-task:#. Klick on the task link and lookup the public IP address which is assigned to your IBM MQ broker.
To access the console of your IBM MQ broker, go to:
https://<public IP>:9443/ibmmq/console/
You can use this web console to read messages from the broker and write messages to it.
Congratulations, you've successfully completed step 1! You can move on to Step 2: Deploy the Amazon MQ broker