cuttlesoft / ecs-deploy.py Goto Github PK
View Code? Open in Web Editor NEWSimple Python script for initiating blue-green deployments on Amazon EC2 Container Service (ECS)
Simple Python script for initiating blue-green deployments on Amazon EC2 Container Service (ECS)
I attempted to call ecs-deploy-py like so:
ecs-deploy-py --region us-west-1 --cluster my-cluster --service-name my-service --image "docker.io/myorg/myrepo:${TRAVIS_COMMIT}"
But I get the following error:
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.2/bin/ecs-deploy-py", line 11, in <module>
sys.exit(CLI())
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/ecs_deploy.py", line 31, in __init__
self.client = boto3.client('ecs', **credentials)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/boto3/__init__.py", line 83, in client
return _get_default_session().client(*args, **kwargs)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/session.py", line 836, in create_client
client_config=config, api_version=api_version)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 70, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 224, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/args.py", line 45, in get_client_args
endpoint_url, is_secure, scoped_config)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/args.py", line 103, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/client.py", line 297, in resolve
service_name, region_name)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/regions.py", line 122, in construct_endpoint
partition, service_name, region_name)
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/botocore/regions.py", line 135, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
I can avoid the error if I execute ecs-deploy-py like this:
AWS_DEFAULT_REGION=us-west-1 ecs-deploy-py --cluster my-cluster --service-name my-service --image "docker.io/myorg/myrepo:${TRAVIS_COMMIT}"
It seems the exitcode is always 1? In that case it would hard to tell when the command succeeds/fails..
If I run ecs-deploy-py with cluster name and service name only, the task role attribute will be set to None in the new task definition generated.
After doing an update with ecs-deploy.py the service is getting updated and well as a tax revision is done. But, in the new task that is getting created the Task size parameters are getting removed. The Task memory (MiB) and Task CPU (unit) are null after I do an update.
Can this be fixed soon pls ? :)
$ ecs-deploy-py -r us-east-1 -c aaaaaaaa -n 'aaaaaaaa' -i '0000000.dkr.ecr.us-east-1.amazonaws.com/aaaaaaa:latest' -v
ClientError: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Invalid setting for container 'aaaaaaa'. At least one of 'memory' or 'memoryReservation' must be specified.
TypeError: '>' not supported between instances of 'float' and 'str'
ecs-deploy-py -c -n -i : -t 300
Basically when i am trying ecs-deploy-py it is failing with ERROR: script returned exit code 1
no other output so thought of increasing time.
Right now the script returns error when a service has 0 running task number:
27-Jan-2017 15:53:57 ClientError: An error occurred (InvalidParameterException) when calling the DescribeTasks operation: Tasks cannot be empty.
In our case the running task number is changed by autoscale policy and sometimes it can be 0. Maybe we can catch this exception and just give a warning instead of error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.