Steps to deploy API Manager image to AWS Fargate

deploy API Manager image to AWS Fargate

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

  1. Cassandra IP/port
  2. EFS mount point for permanent files
  3. Build of API Manager image
  4. AWS Fargate configuration for API Manager
  5. Tag & Push of APIM to ECR
  6. Start APIM container
  7. Scaling up of the container
  8. API Gateway Manager topology

 

  1. Cassandra IP/port

Cassandra is listening on <ipaddress-cassandra>:9042

  1. 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

  1. 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

  1. 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

  1. 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.

  1. Start of APIM container

When the API Manager container is running, it appears as seen below on the AWS Fargate console.

  1. 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

  1. 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.

 

Previous articleDoes your B2B/EDI team need to embrace API integration?
Next articleHow Axway turns PSD2 from compliance to acceleration
Principal Services Architect, Pasquale works as a Project Manager in IT and technical consultant of finance and API Management.

LEAVE A REPLY

Please enter your comment!
Please enter your name here