ministryofjustice / bootstrap-cfn

Opinionated layer for AWS CloudFormation
Other
17 stars 9 forks source link

cfn_update process for EC2 resources #261

Closed ltsampros closed 7 years ago

ltsampros commented 7 years ago

Partial support for cloudformation updates is now supported on the EC2 and ELB sections of the configuration file:

fab application:courtfinder aws:my_project_prod environment:dev config:/path/to/courtfinder-dev.yaml tag:[tag_name] cfn_update

Note: Running this command will show you some structured output of what changes and how. Also a unified diff is printed on output between the old and the new Launch Configuration sections. Although we have gone to great lengths with this command, it can result in destructive operations, particularly if one reduced the desired/max/min capacities of the Auto Scaling Group.

Note #2: In order to test this, you will have to set PYTHONPATH pointing to this branch of the PR and to bootstrap-salt's version https://github.com/ministryofjustice/bootstrap-salt/pull/80

Note #3: The fabfile.py of the relevant -deploy repo should contain a line like this: from bootstrap_salt.fab_tasks import cfn_create, cfn_delete, cfn_update

ltsampros commented 7 years ago

@yufangzhang This code is "updating docker" as a "side-effect". It needs an updated bootstrap-salt and currently the new b-salt version ships with a new urllib3 version. That version is required for new-docker but I don't think it breaks older docker formulas.