This guide reports the steps to build an API Manager image in a Docker environment, as well as how to deploy it to AWS Fargate.
Assumptions
It’s assumed that the Base image and the Admin Node Manager image have already been built and deployed to AWS.
Regarding Cassandra, although it may be running as a Docker container, in this case, it is assumed as normally installed.
Deploy API Manager image to AWS Fargate
API Manager deployment
- Cassandra IP/port
- EFS mount point for permanent files
- Build of API Manager image
- AWS Fargate configuration for API Manager
- Tag & Push of APIM to ECR
- Start APIM container
- Scaling up of the container
- API Gateway Manager topology
- Cassandra IP/port
Cassandra is listening on <ipaddress-cassandra>:9042
- EFS mount point for permanent files
The EFS mount point is useful for configuring the virtual volumes in AWS Fargate where the permanent files of the AMPLIFY™ API Management execution will be saved. This can be achieved, see below:
yum install nfs-utils
mkdir ~/efs-mount-point
sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,hard,noresvport <ipaddress>:/ \ ~/efs-mount-point
cd ~/efs-mount-point
mkdir axway
/apigateway
/events
/trace
/conf/licenses
/groups/emt-group/emt-service/trace
- Build of API Manager image
Starting from the Axway Docker scripts, you can build the API Manager image as seen below:
build_gw_image.py –license=license.lic \
–merge-dir=/root/efs-mount-point/axway/apigateway \
–default-cert –apimanager –group-id=apimanager-group \
–parent-id=api-base-771:1.0 –out-image-api-manager-771:1.0
- AWS Fargate configuration for API Manager
Here are the main configurations to be done in AWS to create the microservice for API Manager.
task-definition = task-test-axway-api-manager-771
cluster = ms-axway-test
service = api-manager-771
service type = REPLICA
deployment type = rolling update
Virtual volume on EFS storage
licenses = /axway/apigateway/conf/licenses
logs = /axway/apigateway/groups/emt-groups/emt-service/log
events = /axway/apigateway/events
trace = /axway/apigateway/groups/emt-groups/emt-service/trace (*)
Container keys
EMT_DEPLOYMENT_ENABLED true
EMT_ANM_HOSTS = <ipaddress-ANM>.8090
CASS_HOST = <ipaddress-cassandra>
(*) Note that at container runtimes, it’s generated (on the vmware) this type of trace file:
/root/efs-mount-point/axway/apigateway/groups/emt-service/trace/<ipaddress>.eu-central-1.compute.internal_<TMS>.trc
- Tag & Push of APIM to ECR
docker tag api-manager-771:1.0 \
<id-ecr>/dkr.ecr.eu-central-1.amazonaws.com/axway.repository.test:api-node-manager-771
docker push \
<id-ecr>/dkr.ecr.eu-central-1.amazonaws.com/axway.repository.test:api-node-manager/api-manager-771
After the push command, the API Manager image has been added to the Amazon ECR repository.
- Start of APIM container
When the API Manager container is running, it appears as seen below on the AWS Fargate console.
- Scaling up of the container
A manual scaling up configuration in AWS is done as seen below. But in general, the microservices will be defined as auto-scaling.
task definition = test-task-axway-api-node-manager-771:2
add container
cluster: ms-axway-test
service: api-node-manager-771
service type: REPLICA
number of tasks: 2
- API Gateway Manager topology
In the end, API G/M Dashboard looks like this below:
Discover how to run an API Builder standalone Docker image on AWS Fargate.
Follow us on social