ECS container best practices

0

I have 10 docker images that our system uses which are meant to be portable between different container management systems. To provide the first iteration of AWS capable images, I have created the repository for each of them in AWS and the necessary roles and resources to run them. I have successfully brought them up as services in a cluster and gotten them to talk to each other and accessed the NGINX container service from the internet.

How can I replicate the cluster without having to build it by hand every time? Is there a component of AWS that I can use to model what I have then pull that in and run it? In other words is there an equivalent to Docker-Compose that I can use to run against, and it stands up the containers as services and brings in the necessary resources?

Chris
已提问 1 年前255 查看次数
2 回答
0
已接受的回答

Hello :) You are doing the right thing to have an ECR Repo per service image, that allows each of these to evolve over time on their own.

Creating and updating ECS services all the time can be cumbersome, especially if you are starting with AWS & ECS. As per your docker-compose question, there is ECS Compose-X which does just that (and more!). You will be able to use the docker compose format to define your services, sidecars if you need to, and what it does is generate the AWS CloudFormation templates to use and deploy all your services. We use it in our CICD pipelines and it orchestrates everything we need to do. It also allows to define other AWS resources you might need (new or existing ones) that your services need access to, and grant least-privileges permissions to the IAM roles automatically.

There are plenty of examples/guides in the labs to get started, and if you have any issues, feel free to join the Slack Channel to ask for help, or raise an issue in GitHub.

Hope this helps,

profile picture
已回答 1 年前
0

Wow! Thanks. That is what I was looking for. Just starting out with this, I didn't know if I was going down the wrong path doing everything by hand and there were screens somewhere that did it for me but I just couldn't find them. Now it seems that there really aren't any. The support guy gave me a link: https://aws.amazon.com/blogs/containers/automated-software-delivery-using-docker-compose-and-amazon-ecs/ which also took me down a similar path but with a different outcome. I already popped over to compose-x and it seems extremely helpful and also what I am looking for.

Chris
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则