Today I entered the Amazon ECS space and combined it with some new features of webMethods 10.0. In this post I’ll discuss:

  • Creating a webMethods Integration Agent docker image
  • Uploading the image to the Amazon EC2 Container Registry (ECR)
  • Running a basic Amazon EC2 Container Service (ECS) service with the webMethods Integration agent 

Prerequisites

SoftwareAG documentation recommends to create a docker image from a fully installed and configured IS. It’s not (yet) possible to take a base image, add some config files and build/run it.

So you’ll need to install and configure a webMethods IS 10.0 (linux) first. You’ll also need to install docker on the same machine.

Creating the Integration Agent docker image

SSH to your newly installed/configured webMethods Integration Server machine. We’ll use the is_container.sh script to build the Integration Agent Image. It’s a bash script to easily create Dockerfiles and build images.

Note: With the 10.0 innovation release SoftwareAG introduced the webMethods Integration Agent. Which is a light-weight version of the Integration server. Hence the “createLeanDockerFile” parameter below.

cd <SAG installation dir>/IntegrationServer/docker
./is_container.sh createLeanDockerfile -Dfile.name=IS_Agent_Dockerfile

The script created a Dockerfile called “IS_Agent_Dockerfile” in your <SAG installation directory>. Build the Dockerfile using the is_container.sh script.

./is_container.sh build \
     -Dfile.name=IS_Agent_Dockerfile  \
     -Dimage.name=is_agent:100

Tip: Go and grab a coffee cause this can take a while …

Once finished, this should have created a docker image called “is_agent:100”. To test the image, simply execute the ‘docker run’ command below. This will boot up the webMethods Integration agent in a container.

docker run -d -p 5557:5555 -p 9997:9999 is_agent:100 /sag/profiles/IS_default/bin/sagis100 console

Uploading the image to the Amazon EC2 Container Registry

Note: Next section requires an Amazon AWS account. Following web ui operations can also be done via the AWS cli or ECS cli

In the Amazon AWS console, go to EC2 Container Service. Select ‘Repositories’ on the right and a create a new one.

The next screen will provide an aws login command. Run it on a machine were the aws cli is installed. This will return a docker login command to login to your newly created ECR repository. Execute this command on the machine where you have build the Integration Agent image.

aws ecr get-login --no-include-email --region <your region>

Give the is_agent image a new tag (which includes the repository URI) and push the image to the ECR repository.

docker tag is_agent:100 111111111.dkr.ecr.eu-central-1.amazonaws.com/integration-agent-demo-repo:100
docker push 11111111111.dkr.ecr.eu-central-1.amazonaws.com/integration-agent-demo-repo:100

Note: replace “11111111111.dkr.ecr.eu-central-1.amazonaws.com/integration-agent-demo-repo” with your repository URI (see Amazon ECS web ui).

Configure and run a basic ECS service

I’ll assume that you have already a ACS Cluster running. See Amazon ECS documentation for more info. First create a new Task definition:

Go to your ECS cluster and create a new service:

Add our IS_Agent container to your service as shown below:

Start the service and you’ll have the Integration agent up and running.

What’s next?

Now that we have the basics, I’ll get into scaling the integration agent by deploying multiple instances on Amazon ECS. I’ll try to keep you posted.

Don’t hesitate to reach out on Twitter or LinkedIn.
Greetings, Samuel