1
0
mirror of https://github.com/rancher/os.git synced 2025-04-27 19:15:23 +00:00
os/docs/os/amazon-ecs/index.md
Sven Dowideit 7a0ebc409b update master to generate docs like rancher.github.io does
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-08-17 06:01:19 +10:00

6.7 KiB

title
Amazon ECS on RancherOS

Amazon ECS (EC2 Container Service)


Amazon ECS is supported, which allows RancherOS EC2 instances to join your cluster.

Pre-Requisites

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

Version

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 amazon-ecs-agent.

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

Note: The : 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.0.3

Region Type AMI
ap-south-1 HVM - ECS enabled ami-771c6618
ap-south-1 HVM - ECS enabled ami-c61369a9
eu-west-2 HVM - ECS enabled ami-def7e6ba
eu-west-2 HVM - ECS enabled ami-f9f2e39d
eu-west-1 HVM - ECS enabled ami-2c8a7b55
eu-west-1 HVM - ECS enabled ami-62fa0b1b
ap-northeast-2 HVM - ECS enabled ami-a95e87c7
ap-northeast-2 HVM - ECS enabled ami-f35e879d
ap-northeast-1 HVM - ECS enabled ami-3c01eb5a
ap-northeast-1 HVM - ECS enabled ami-733bd115
sa-east-1 HVM - ECS enabled ami-73e6901f
sa-east-1 HVM - ECS enabled ami-93fb8dff
ca-central-1 HVM - ECS enabled ami-16d66872
ca-central-1 HVM - ECS enabled ami-b7d26cd3
ap-southeast-1 HVM - ECS enabled ami-4a53cb29
ap-southeast-1 HVM - ECS enabled ami-daa33bb9
ap-southeast-2 HVM - ECS enabled ami-12e2fb71
ap-southeast-2 HVM - ECS enabled ami-35e4fd56
eu-central-1 HVM - ECS enabled ami-3e5df351
eu-central-1 HVM - ECS enabled ami-e956f886
us-east-1 HVM - ECS enabled ami-3031184b
us-east-2 HVM - ECS enabled ami-9cddfdf9
us-east-2 HVM - ECS enabled ami-dadcfcbf
us-west-1 HVM - ECS enabled ami-4ce7cc2c
us-west-2 HVM - ECS enabled ami-c38464bb
us-west-2 HVM - ECS enabled ami-e3b6569b