Installation Procedure for ECS with EC2
Step 1 Create a security group
Create a security group that allows the following access in inbound rules
- HTTP port (#80) for web browser access to HACOBE-CLOUD.
- Waiting port for receiving streams (please match the sender's settings)
Please configure additional rules as appropriate for your environment.
Step 2 Create an IAM role for ECS tasks
Open the IAM console and create an IAM role with the following settings.
| Item | Value |
|---|---|
| Trusted entity type | AWS service |
| Service or use case | Elastic Container Service |
| Use case | Elastic Container Service Task |
| Permissions policies | Attach the following two policies |
- AmazonECSTaskExecutionRolePolicy |
|
- AWSMarketplaceMeteringRegisterUsage |
Step 3 Create an ECS Cluster
Open the ECS console and create a cluster with the following settings.
Cluster Configuration
| Item | Value |
|---|---|
| Cluster name | Cluster name string |
Infrastructure
| Item | Value |
|---|---|
| Infrastructure | Select Amazon EC2 Instances |
| EC2 Instance type | m5.large or higher recommended |
| EC2 Instance role | Add the IAM role created in Step 2 |
| Desired capacity | minimum = 1 |
Network settings for Amazon EC2 instances
| Item | Value |
|---|---|
| Security group name | Add the security group created in Step 1 |
Step 4 Create a task definition
Open the ECS console and create a task definition with the following settings.
- Task definition configuration
| Item | Value |
|---|---|
| Task definition family | Task definition name string |
- Infrastructure requirements
| Item | Value |
|---|---|
| Launch type | Select Amazon EC2 instances |
| Operating system/Architecture | Linux/x86_64 |
| Network mode | host |
| Task role | Add any applicable roles, such as CloudWatch coordination, if any |
| Task execution role | Add the IAM role created in step 1 |
- Container details
| Item | Value |
|---|---|
| Name | Container name string |
| Image URI | URI of container image |
Step 5 Run the task definition
Open the ECS console, select the Tasks tab, and click Run new task.
Run the task with the following settings.
- Task details
| Item | Value |
|---|---|
| Task definition family | Select the task definition created in Step 2 |
- Environment
| Item | Value |
|---|---|
| Compute options | Seldct Launch type |
| Launch type | Select EC2 |
- Networking
| Item | Value |
|---|---|
| Security group name | Add the security group created in Step 1 |
Step 6 Access the HACOBE-CLOUD web page
Open the EC2 console and check the instance that has been launched.
Access the IP address of the HACOBE-CLOUD instance with a web browser.