Scroll to navigation

AMAZON-ECS-INIT(1) AMAZON-ELASTIC-CONTAINER-SERVICE AMAZON-ECS-INIT(1)

NAME

amazon-ecs-init - Elastic Container Service container agent supervisor

SYNOPSIS

amazon-ecs-init ACTION

DESCRIPTION

amazon-ecs-init supports the initialization and supervision of the Amazon ECS container agent (http://github.com/aws/amazon-ecs-agent), including configuration of cgroups, iptables, and required routes among its preparation steps.

ACTIONS

Configure the system and load the ECS agent container image
Start the ECS agent container and wait for it to stop
Stop the ECS agent container
Stop the ECS agent container
Cleanup system from ECS agent configuration
Reload the cached ECS agent container image

INIT SYSTEM USAGE

amazon-ecs-init is officially supported to run under systemd on Amazon Linux 2 and upstart on Amazon Linux 1.

SYSTEMD

systemd units are expected to use the ACTIONS pre-start, start, stop, and post-stop to manage the lifecycle of the ECS agent.

These ACTIONS must be used in the [Service] section with the appropriate Exec directives:

# in ecs.service
[Service]
Type=simple
ExecStartPre=/usr/libexec/amazon-ecs-init pre-start
ExecStart=/usr/libexec/amazon-ecs-init start
ExecStop=/usr/libexec/amazon-ecs-init stop
ExecStopPost=/usr/libexec/amazon-ecs-init post-stop

UPSTART

Upstart jobs are expected to use the ACTIONS pre-start, start, pre-stop, and post-stop to manage the lifecycle of the ECS agent.

The directives in the upstart job must align with the above ACTIONS:

# in ecs.conf
pre-start exec /usr/libexec/amazon-ecs-init pre-start
exec /usr/libexec/amazon-ecs-init start
pre-stop exec /usr/libexec/amazon-ecs-init pre-stop
post-stop exec /usr/libexec/amazon-ecs-init post-stop

TROUBLESHOOTING

Troubleshooting guidance is provided in the online Amazon ECS documentation, please visit https://docs.aws.amazon.com/AmazonECS/latest/developerguide/troubleshooting.html

COPYRIGHT

Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

LICENSE

Licensed under the Apache License, Version 2.0.

NOTES

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_agent.html
https://github.com/aws/amazon-ecs-agent
https://github.com/aws/amazon-ecs-init
2018-06-01 AMAZON