Amazon ECS (EC2 Container Service)
Amazon ECS is supported, which allows RancherOS EC2 instances to join your cluster.
Prior to launching RancherOS EC2 instances, the ECS Container Instance IAM Role will need to have been created. This
ecsInstanceRole will need to be used when launching EC2 instances. If you have been using ECS, you created this role if you followed the ECS “Get Started” interactive guide.
Launching an instance with ECS
RancherOS makes it easy to join your ECS cluster. The ECS agent is a system service that is enabled in the ECS enabled AMI. There may be other RancherOS AMIs that don’t have the ECS agent enabled by default, but it can easily be added in the user data on any RancherOS AMI.
When launching the RancherOS AMI, you’ll need to specify the IAM Role and Advanced Details -> User Data in the Configure Instance Details step.
For the IAM Role, you’ll need to be sure to select the ECS Container Instance IAM role.
For the User Data, you’ll need to pass in the cloud-config file.
#cloud-config rancher: environment: ECS_CLUSTER: your-ecs-cluster-name # Note: You will need to add this variable, if using awslogs for ECS task. ECS_AVAILABLE_LOGGING_DRIVERS: |- ["json-file","awslogs"] # If you have selected a RancherOS AMI that does not have ECS enabled by default, # you'll need to enable the system service for the ECS agent. services_include: amazon-ecs-agent: true
By default, the ECS agent will be using the
latest tag for the
amazon-ecs-agent image. In v0.5.0, we introduced the ability to select which version of the
To select the version, you can update your cloud-config file.
#cloud-config rancher: environment: ECS_CLUSTER: your-ecs-cluster-name # Note: You will need to make sure to include the colon in front of the version. ECS_AGENT_VERSION: :v1.9.0 # If you have selected a RancherOS AMI that does not have ECS enabled by default, # you'll need to enable the system service for the ECS agent. services_include: amazon-ecs-agent: true
:must be in front of the version tag in order for the ECS image to be tagged correctly.
Amazon ECS enabled AMIs
Latest Release: v1.5.1
|eu-north-1||HVM - ECS enabled||ami-064549188a66e7ea6|
|ap-south-1||HVM - ECS enabled||ami-08595b2533a6195d2|
|eu-west-3||HVM - ECS enabled||ami-0e3cd3d86a637b352|
|eu-west-2||HVM - ECS enabled||ami-0f6ad4f7e408e1069|
|eu-west-1||HVM - ECS enabled||ami-0d8dae1cc019e6cef|
|ap-northeast-2||HVM - ECS enabled||ami-0c1f5bad8bbc0b6b2|
|ap-northeast-1||HVM - ECS enabled||ami-0e47cb2a4e9efb985|
|sa-east-1||HVM - ECS enabled||ami-0e7f3fa6d7434b64c|
|ca-central-1||HVM - ECS enabled||ami-0b004e903b48ed9a0|
|ap-southeast-1||HVM - ECS enabled||ami-05235fc0bc8051a45|
|ap-southeast-2||HVM - ECS enabled||ami-057db347305e01f91|
|eu-central-1||HVM - ECS enabled||ami-01bd38e3433481d8b|
|us-east-1||HVM - ECS enabled||ami-029bd9bf2b4521072|
|us-east-2||HVM - ECS enabled||ami-06cc66eb6efe0dc0d|
|us-west-1||HVM - ECS enabled||ami-050723009f13ccdd5|
|us-west-2||HVM - ECS enabled||ami-0e85f0edaeed888f1|
|cn-north-1||HVM - ECS enabled||ami-0c0fca27431002bc6|
|cn-northwest-1||HVM - ECS enabled||ami-067c78822a0314717|