Just curious, how do people here deploy/manage CloudFormation templates? That is, what tools do you use to actually deploy updates? Any tools for testing those updates?
Also, what config management tools do you use with your CloudFormation processes?
We keep our templates in git and deploy them with ansible. Every change goes through code review before being applied so it should be safe. Ansible is good because it lets you store variables securely and do other automation around hitting cloudformation, such as uploading things to s3.
where i am, we store cft’s in git, and run them through jenkins via shell scripts. previous position, stored in git and ran them through octopus deploy with powershell scripts.
We store everything in git. We use boto to fetch whatever data we need and then pass it into cfn to build the resource. Once the infrastructure is in place, ansible installs all the software. So there is a hard line between provision and configuration. Cfn for provision and ansible for configuration.
This question got me curious, what kind of updates to templates are you usually deploying? My updates are usually just a new AMI rev, but sometimes includes changes to launch config userdata. I assumed changes to CF templates are not a regular part of the deploy process.
Actually, I’m not even using CF yet but yeah, most of the time I won’t be making infrastructure changes but sometimes I will need to. More often I do need to deploy new versions of my apps, like everybody else, I do that all the time.
I write mldular-ish templates in a ruby DSL (cfndsl), and use cfn2dsl to convert any reference templates I want to the DSL.
I deliver via a runbook and the AWS CLI for first time bootstrapping. Any remaining changes are delivered via either a CI/CD pipeline managed by CodeDeploy or via update procedures written in the runbook (CLI again).
Interestingly I do find some use for terraform in my stack as well, might seem like a duplicate of concerns but it’s outside the scope of this thread.
Interestingly I do find some use for terraform in my stack as well, might seem like a duplicate of concerns but it’s outside the scope of this thread.
Yeah, that part is especially interesting. . . I can start a new thread if you want.
I am genuinely interested in hearing more about this as most people seem to use Terraform as a replacement for CF.
Terraform manages our blue-green deployment, ie ASG & AMI swapping. CF runs into issues with frequent changes to stacks & state management is what I found so we opted to draw a boundary between what’s managed by CF and what’s managed by Terraform.
It feels a bit odd but overall I’m more comfortable with tooling that triggers API calls handling a deployment process. Also managing a smaller chunk of state “in-flux” as opposed to a whole production stack template every time we want to deploy - dozens of times a day - appears less error prone.
Whilst I could probably achieve a similar thing with Cloudformation managing certain elements of our stack in a child/cross-stack template I appreciate Terraforms state-management capabilities, we have plans to leverage their remote state storage module + vault to inject sensitive information (secret 0) into launch configurations.
I use Sceptre with troposphere templates. Instead of having 1 giant stack I break them down into smaller pieces and group them together, makes updates easier. They take outputs from each other as parameters, sceptre calculates the dependencies based on the configs and takes care of launching them in the right order. Also lets you deploy multiple versions of the same-ish stack easily (like dev/prod). Disclosure, I work at cloudreach but this is based on personal preference.