[AWS] ECS ~Part1: Cluster Creation~

Purpose

In this series, let me explain how to setup ECS resources and deploy a sample image.
ECS is managed container service and you can implement it easily.
If you are a beginner for container, I recommend you to use ECS first.

Refer to below URL if you want to know about ECS in detail.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html

In part1 section, I would like to explain how to create ECS cluster.

ECS Cluster Creation
Firstly, open ECS console.

Yo can see below screen and please click Get started button.

Setting screen is displayed as below. But, I canceled this step anyway.

First step is to create clusters.
ECS cluster is a logical group of tasks or services. Your tasks and services are run on infrastructure that is registered to a cluster.

Click Create Cluster button.

Next, you can choose cluster template.
Since I want to develop linux server, I chose EC2 Linux + Networking.

And, input cluster demo as you like.

Then customize your EC2 setting according to your requirement.
You can set the number of EC2 instance in this step.

Then, IAM role needs to be set to ECS resource.
In this case, new role will be created as below.
Finally, click Create button.

After a few minutes, the cluster will be created.
You had better check the cluster’s status by clicking View Cluster button.

If the Status is Active, it is successfully created !!

Status check of EC2 instance
Open EC2 console.
You can see a EC2 instance created by ECS is Running successfully.
Let’s confirm the Auto Scaling Groups setting.

Auto Scaling Groups is created at the time of ECS cluster creation automatically.

And, check the Launch Configuration as well.

OK, Auto Scaling Groups and Launch Configurations are defined.
Please change those setting and change auto scaling function according to your requirement.

Finally, Let’s access EC2 instance by SSH and check the status.

By executing docker ps command, you can see a container service is started successfully.
If it has any problems, check the startup log by executing docker logs command as below.

That’s all for part1 topic. In part2, let me explain how to set ECS service and task.
Thank you very much for reading it !!

If you think this article is beneficial for you, I would be glad if you click below icon for my motivation.
ブログランキング・にほんブログ村へ

コメント