Swap URL: This is for blue/green deployment. The idea is to update the floating DNS to point to different stack’s ELB CNAME. It allows us to easily divert the traffics to different backend stack, but keep it transparent to users.
Cloudformation snippet
"Resources": { "Route53DNSRecord": { "Properties": { "Comment": "Floating DNS Record", "HostedZoneName": { "Fn::Join": [ "", [ { "Ref": "MasterHostedZone" }, "." ] ] }, "Name": { "Fn::Join": [ "", [ { "Ref": "Env" }, ".", { "Ref": "App" }, ".", { "Ref": "MasterHostedZone" }, "." ] ] }, "ResourceRecords": [ { "Fn::Join": [ "", [ { "Ref": "App" }, "-", { "Ref": "Owner" }, "-", { "Ref": "Env" }, "-", { "Ref": "Version" }, ".", { "Ref" : "HostedZone" }, "." ] ] } ], "TTL": "60", "Type": "CNAME" }, "Type": "AWS::Route53::RecordSet" } }
Delete Stack: This is for house keeping. Once you are happy with the new stack, and want to get rid of the old stacks. It is the quickest way – deleting the stacks in Cloudformation. Everything that were created in the Create Stack plan will be removed completely. It keeps the environment clean.
Just tell Cloudformation the Stack file name, for instance: ${bamboo.App}-${bamboo.Owner}-${bamboo.Env}-${bamboo.deploy.release}-Stack, just this simple 🙂
Release promotion process should be strictly followed, this will avoid the untested codes to run in production environment.
The codes should be deployed to DEV, then get tested and verified before promoted to UAT. Tests need to be done in UAT before promoting the release in PROD.
So far, this is my favourite Bamboo Plan. It supports hot deployment and cold deployment (blue/green deployment).