CloudFormation is Amazon Web Service's tool for creating and managing "stacks" of other AWS resources as code.
Cumulus is a tool we wrote at catchoftheday.com.au to help you manage your stacks in CloudFormation and build bigger logical stacks from multiple cloudformation stacks. https://github.com/cotdsa/cumulus.
4. AWS CloudFormation
“... an easy way to create and manage a collection of
related AWS resources ... ”
- http://aws.amazon.com/cloudformation/
Uses JSON templates to describe “stacks” of resources
12. So basically…
Create almost any AWS resources with one API call
Once created, stacks can be updated or deleted
Templates are re-usable and can be used to create
multiple stacks simultaneously. Resources are assigned
dynamic names
Resources are tagged throughout the stack, with stackname, stack-id and logical-id (name of template
resource)
14. It works great! …except
Templates are JSON files. No comments. Not the easiest
format for humans to write
Templates are standalone and complete. No inclusion of
other templates
Creation of stacks requires manual specification of
template parameters
15. …which leads to
Very large template files with a “data centre” worth of
resources in it
or
Smaller templates with lots of manual parameters to feed
each one
or…
16. Stack resources in templates
It is possible to create a CloudFormation stack inside a
stack
Once created, cannot update the parameters of an
inside stack by updating the outside stack template
(update of outside stack will fail)
Template for inside stack needs to be uploaded to an S3
bucket before stack creation
We wanted a better way!
17. Cumulus
Python command line tool to add extra awesome to
CloudFormation
Concept of a mega stack, made up of multiple
CloudFormation stacks.
Adds an extra mega-stack yaml file on top of
Cloudformation JSON templates
Written by CatchOfTheDay WebOps team
18. What does this give us?
Keep CloudFormation template files small and re-usable
Single file for a mega stack, including all its parameters
Stacks can be dependent on each other and have
dynamic parameter values from other stack
resources
More time writing YAML, less time writing JSON
Watch stack events in near real-time
19. Cumulus YAML file example
See:
https://github.com/cotdsa/cumulus/blob/master/exam
ples/cumulus_example_stack.yaml
22. Future improvements
Handle larger templates by using S3 upload
Find a way to show meaningful diffs between running
stacks and local templates before doing an update
Abstract away JSON templates altogether?
Generally more robust code, better error handling and
writing tests
23. Please use and improve
Open to pull requests, issues and ideas
or even just let us know you are getting value from it...
https://github.com/cotdsa/cumulus