Tools for working with AWS ECS clusters.
pip install git+https://github.com/silvercar/ecs-cluster
This will update the image in the task definition, and update the service to use this new definition. Afterwards, the ecs-agent will take care of starting new tasks and stopping the old ones (according to its deployment configuration/health check rules).
ecs-cluster update-image --cluster <cluster_name> --service <ecs_service_name> --container <ecs_container_name> --image <ecr_image>
ecs-cluster ssh-service --cluster cluster-name --service service-name --user username
Same as above, except the tasks will be forcefully stopped first, and then replaced.
Note the --restart
flag.
ecs-cluster update-image --cluster <cluster_name> --service <ecs_service_name> --container <ecs_container_name> --image <ecr_image> --restart
-
Branch off of master, so make sure you're on master first:
git checkout master
-
Create your feature branch:
git checkout -b my-new-feature
-
Test your changes: (From the root of the repository, run: )
$ virtualenv venv --python=python3.6 $ . venv/bin/activate $ pip install --editable . $ ecs-cluster
-
Commit your changes:
git commit -am 'Add some feature'
-
Push to the branch:
git push origin my-new-feature
-
Submit a pull request :D