Transcript

CloudFormationAWS Resource Automation

Caveats

• Not affiliated with AWS • No expert in AWS • Not extensive cover of CF

World of AWS

Before We Start

• AWS Account • AWS Management Console • IAM Keys • AWS CLI • Boto (Python)

What is CloudFormation?

a template (config/manifest) in json

What is CloudFormation?

Anatomy Of A CF Template

Parameters

Mappings

Resources

Outputs

The Basic Sekeleton

Intrinsic Functions

Fn::Base64 Fn::FindInMap Fn::GetAtt Fn::GetAZs Fn::Join Fn::Select Ref

Condition Functions

Fn::And Fn::Equals Fn::If Fn::Not Fn::Or

Walkthroughhttp://bit.ly/phpmelb-aws-cf-auto

Other Cool Stuff

• AWS::CloudFormation::CustomResource • AWS::CloudFormation::WaitCondition • AWS::CloudFormation::WaitConditionHandle • CloudFormation Helper Scripts

• cfn-init • cfn-get-metadata • cfn-signal

These are handy

• Instances Profiles • curl http://169.254.169.254/latest/meta-data/ • Cumulus (https://github.com/cotdsa/cumulus)

How Do We Automate?

A Typical Scenario

• Already has a production environment • Possible have RDS or DB instance • Plenty of application servers • Deployment is difficult

Script Build First

Then CloudFormation

Deploying

Deployment Pipeline

Deployment Pipeline

Quick Demo

Why Is This Important?

• Highly auditable • [Cruelly] consistent & predictable • Conveniently reproducible !

• Immutable Servers • Avoids EOL of Instances • Reduces RTO

Thank [email protected]

@visualdensity @peaziesocial


Top Related