Deploying a Flogo App to Amazon ECS and Fargate
- Procedure
- Build a Flogo app as a docker image.
- Push the Flogo docker image to Amazon Elastic Container Registry (ECR) as follows:
- Authenticate Docker to the ECR Registry using the following command. For more information, refer to the AWS documentation for Registry Authentication.
aws ecr get-login
- Tag the Flogo app Docker image with the ECR registry, repository, and optional image tag name combination:
docker tag <flogo_app_docker_image> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<ecr_repository_name>:<tag>
- Push the tagged Docker image to the ECR registry:
docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<ecr_repository_name>:<tag>
- Authenticate Docker to the ECR Registry using the following command. For more information, refer to the AWS documentation for Registry Authentication.
- Create a cluster in which to run your apps. For more information on how to create an Amazon ECS Cluster, refer to the AWS documentation for Creating Cluster.
- Create a task definition. The task definition defines what docker image to run and how to run it. For more information on how to create a task definition, refer to the AWS documentation available for Creating Task Definition.
- Run the app in containers. After creating the task definition, you can open the app containers either by manually running tasks or by creating a service using the Amazon ECS Service Scheduler. For more information on how to create a service, refer to the AWS documentation available at Creating Service.