# python-ecs-deploy
[](https://github.com/qiqiming/python-ecs-deploy/blob/master/LICENSE)
[](https://pypi.org/project/python-ecs-deploy/)
inspired by <https://github.com/silinternational/ecs-deploy>, rewrite use python3
This script use ecs client of boto3 to instigate an automatic blue/green deployment.
It only updates the tag of the images in the task definition with the same image name you provided
This allows you to easily implement CI/CD
## usage
```
ecs-deploy
optional arguments:
-h, --help show this help message and exit
-k AWS_ACCESS_KEY, --aws-access-key AWS_ACCESS_KEY AWS Access Key ID. May also be set as environment variable AWS_ACCESS_KEY_ID
-s AWS_SECRET_ACCESS_KEY, --aws-secret-key AWS_SECRET_ACCESS_KEY AWS Secret Access Key. May also be set as environment variable AWS_SECRET_ACCESS_KEY
-r region_name, --region region_name AWS Region Name. May also be set as environment variable AWS_DEFAULT_REGION
-c cluster_name, --cluster cluster_name Name of ECS cluster
-n service_name, --service-name service_name Name of service to deploy
-i images [images ...], --images images [images ...] Name of Docker image to run(support multiple images)
ex: --images repo/image:1.0 repo2/image2:8.0
--scale nums Modifies the number(positive) of container instances of the current Task Definition
```
## example
You have a task definition that contains two docker images(aaa/foo:1.0, bbb/bar:2.0)
Update the service with the new image:
```
ecs-deploy -c test_cluster -n test_service -i aaa/foo:1.1 bbb/bar:3.0
```
Scale current service number of tasks
```
ecs-deploy -c test_cluster -n test_service --scale 5
```
## Installation
```
pip install python-ecs-depl
```
[](https://github.com/qiqiming/python-ecs-deploy/blob/master/LICENSE)
[](https://pypi.org/project/python-ecs-deploy/)
inspired by <https://github.com/silinternational/ecs-deploy>, rewrite use python3
This script use ecs client of boto3 to instigate an automatic blue/green deployment.
It only updates the tag of the images in the task definition with the same image name you provided
This allows you to easily implement CI/CD
## usage
```
ecs-deploy
optional arguments:
-h, --help show this help message and exit
-k AWS_ACCESS_KEY, --aws-access-key AWS_ACCESS_KEY AWS Access Key ID. May also be set as environment variable AWS_ACCESS_KEY_ID
-s AWS_SECRET_ACCESS_KEY, --aws-secret-key AWS_SECRET_ACCESS_KEY AWS Secret Access Key. May also be set as environment variable AWS_SECRET_ACCESS_KEY
-r region_name, --region region_name AWS Region Name. May also be set as environment variable AWS_DEFAULT_REGION
-c cluster_name, --cluster cluster_name Name of ECS cluster
-n service_name, --service-name service_name Name of service to deploy
-i images [images ...], --images images [images ...] Name of Docker image to run(support multiple images)
ex: --images repo/image:1.0 repo2/image2:8.0
--scale nums Modifies the number(positive) of container instances of the current Task Definition
```
## example
You have a task definition that contains two docker images(aaa/foo:1.0, bbb/bar:2.0)
Update the service with the new image:
```
ecs-deploy -c test_cluster -n test_service -i aaa/foo:1.1 bbb/bar:3.0
```
Scale current service number of tasks
```
ecs-deploy -c test_cluster -n test_service --scale 5
```
## Installation
```
pip install python-ecs-depl
```
Metadata
Release files for python-ecs-deploy 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-ecs-deploy-0.0.4.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_ecs_deploy-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / python-ecs-deploy-0.0.4.tar.gz
| Download URL | python-ecs-deploy-0.0.4.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60a5a2cf5794d47dcba58e97a73cc420305658ccc06133060428c932a525116c
|
|
BLAKE2b-256 checksum How to use checksums |
c242dbe17f5fa00db7eb8c9d7b21e2f22cf49c3fda39ad1f4543b5c0f28f93fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.1
|
Release files / python_ecs_deploy-0.0.4-py3-none-any.whl
| Download URL | python_ecs_deploy-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab96a79f4e454bc67fa2eea126a9c79b08f29d8d7440095cccdff33ca126096f
|
|
BLAKE2b-256 checksum How to use checksums |
83da2e09bca370a2697bdd443f692da30c50d409b450aa6dae37c78557af4b5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.1
|