• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
AWS Infrastructure as code - CloudFormation and Cumulus
 

AWS Infrastructure as code - CloudFormation and Cumulus

on

  • 667 views

CloudFormation is Amazon Web Service's tool for creating and managing "stacks" of other AWS resources as code. ...

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.

Statistics

Views

Total Views
667
Views on SlideShare
667
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • ----- Meeting Notes (26/11/2013 19:36) -----Intro
  • ----- Meeting Notes (26/11/2013 19:36) -----Peter
  • ----- Meeting Notes (26/11/2013 19:36) -----Marketing
  • ----- Meeting Notes (26/11/2013 19:36) -----ProductRepeatedly, predictably ordered fashionInfrastructure as code - Collection/BlueprintOpposedManually/Console* 2 Terms - Resources defined using JSON ‘Templates’ to create ‘stacks’ of resources.
  • ----- Meeting Notes (26/11/2013 19:36) -----Hard to see
  • ----- Meeting Notes (26/11/2013 19:36) -----4 Main elements, other version desc
  • ----- Meeting Notes (26/11/2013 19:36) -----Parameters – Keyname, constraints
  • ----- Meeting Notes (26/11/2013 19:36) -----Mappings – AWSRegionArch2AMIKey attribute/pair
  • ----- Meeting Notes (26/11/2013 19:36) -----Resources – The only required section of the 4.KeyNameNext slide is 2nd Resources.
  • ----- Meeting Notes (26/11/2013 19:36) -----Resources 2:Fn:FindInMap function - key
  • ----- Meeting Notes (26/11/2013 19:36) -----Outputs returned to caller
  • ----- Meeting Notes (26/11/2013 19:36) -----Templates reusable -> Example web server, database server -> Bring up 2 more stacks, unique names.
  • * Hate JSON* No inclusion like other languages
  • Manual parameters – Or in my case, setting the values as defaults, which meant they were no longer re-usable or shareable.

AWS Infrastructure as code - CloudFormation and Cumulus AWS Infrastructure as code - CloudFormation and Cumulus Presentation Transcript

  • AWS Infrastructure as code CloudFormation and Cumulus
  • Who we are  Ash Caire WebOps Lead at Catch Group  Peter Hall WebOps Engineer at Catch Group Twitter: @peterkh
  • Catch Group  catchoftheday.com.au  scoopon.com.au  groceryrun.com.au  eatnow.com.au  mumgo.com.au
  • 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
  • Full CloudFormation Example
  • Simple CloudFormation Example
  • Simple CloudFormation Example
  • Simple CloudFormation Example
  • Simple CloudFormation Example
  • Simple CloudFormation Example
  • Simple CloudFormation Example
  • 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)
  • CloudFormation Demo
  • 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
  • …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…
  • 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!
  • 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
  • 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
  • Cumulus YAML file example  See: https://github.com/cotdsa/cumulus/blob/master/exam ples/cumulus_example_stack.yaml
  • Cumulus Demo
  • 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
  • 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
  • Questions?