Deploying a Flogo App to Amazon ECS and Fargate

    Procedure
  1. Build a Flogo app as a docker image.
  2. Push the Flogo docker image to Amazon Elastic Container Registry (ECR) as follows:
    1. 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
    2. 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>
    3. Push the tagged Docker image to the ECR registry:
      docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<ecr_repository_name>:<tag>
  3. 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.
  4. 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.
  5. 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.