SlideShare ist ein Scribd-Unternehmen logo
1 von 36
James Andrew Vaughn (Andy) @MindTouch
Tear It Down, Build It Back Up:
Empowering Developers with
Amazon CloudFormation
James Andrew Vaughn (Andy)
• Software Architect at MindTouch
• @modethirteen on Twitter & GitHub
• Interests
• Software Build and Testing Automation
• Frontend Web Performance
• Web Components & Polymer
• SSO and Identity Management
@modethirteen
Agenda
• What is Amazon CloudFormation? Why use it?
• Managing your release testing and production infrastructure
code
• Give developers the power (`cause knowledge is power!)
@modethirteen
Why manage infrastructure
as code?
@modethirteen
@modethirteen
All of our customers host their brand on our
common, hosted infrastructure. One mistake
and all customer brands look bad #yousuck
@modethirteen
Before CloudFormation
• Infrastructure had grown organically over years
• Hand rolled scripts with boto.py to create different EC2 instance
types, and manual Puppet runs to configure them
• Non EC2 AWS Resources managed by hand
• No infrastructure in different zones or fast, programatic disaster
recovery for entire infrastructure
• Developers were ignorant of production infrastructure
@modethirteen
Weekly releases must be simple,
repeatable, non events
@modethirteen
Developers cannot be isolated from
the infrastructure where their code
will ultimately run
@modethirteen
Code gives context to problems
solved and provides audit trail for
infrastructure design
@modethirteen
Infrastructure code and server
configuration code is versioned with
application code
@modethirteen
CloudFormation: Define creation of AWS
resources (EC2 as well as Security
Groups, SQS, RDS, etc)
Puppet, Chef, SaltStack, Ansible: Define
actions that occur within EC2 instances
once they’ve been provisioned
@modethirteen
CloudFormation vs Terraform
• Access to nearly every AWS
resource. Better support for
VPC, Security Groups, IAM,
Cloudfront, SQS
• Stable and mature
• JSON infrastructure templates
can be generated by
Troposphere (with Python
logic)
• Vendor neutrality: AWS, OpenStack, Heroku,
etc
• Can execute infrastructure plans as a dry run
• DSL for generating infrastructure templates
(HCL)
• If one resource fails to build, subsequent
rebuild will only build tainted resource and
those dependent on it
• Open source so AWS API coverage can be
improved by community
Google Docs: Terraform AWS Coverage
@modethirteen
CloudFormation Stacks
Main Stack
Sub Stacks
A stack is a collection of AWS resources that can be configured
@modethirteen
App Server Pool
Stack
Database
Stack
ElasticSearch
Stack
App Server Pool
Stack
Main Stack
@modethirteen
CloudFormation Stacks
Resources are things that can be queried, configured in the AWS API (including CloudFormation
sub stacks). Examples: Listing S3 buckets, Adding Route 53 DNS entries, Taking DB snapshots
@modethirteen
Database
Stack
ElasticSearch
Stack
App Server Pool
Stack
Main Stack
• AutoScaling::AutoScalingGroup
• AutoScaling::LaunchConfiguration
• IAM::InstanceProfile
• IAM::User
• AutoScaling::AutoScalingGroup
• AutoScaling::LaunchConfiguration
• CloudFormation::WaitCondition
• IAM::InstanceProfile
• IAM::User
• RDS::DBInstance
• IAM::InstanceProfile
• IAM::User
@modethirteen
Custom Resources
• CloudFormation::CustomResource
• Sends custom HTTP message (Service Token) to any of your endpoints, and
continues stack execution after response
• AWS SNS
• AWS Lambda
• Node.JS
• Your choice!
@modethirteen
CloudFormation Stacks
Stack parameters come from API input, version controlled JSON templates,
or from the output of other stacks
@modethirteen
• MySQL Storage Engine
App Server Pool
Stack
Database
Stack
ElasticSearch
Stack
App Server Pool
Stack
Main Stack
• ElasticSearch Version
• App Server Pool EC2 Group Name
• ElasticSearch EC2 Group Name
• RDS MySQL IP & Port
@modethirteen
CloudFormation Stacks
Parameters of stack can be outputted to dependent stacks. Example: IP’s,
Security Policies, Custom Values, etc.
@modethirteen
Template: {…}
App Server Pool
Stack
Database
Stack
ElasticSearch
Stack
App Server Pool
Stack
Main Stack
• MySQL Storage Engine
• ElasticSearch EC2 Group Name
• RDS MySQL IP & Port
• ElasticSearch Version
• App Server Pool EC2 Group Name
Template: {…}
@modethirteen
Stack Policy: Stack Update
Resource Access Control
@modethirteen
Deploying a Stack
@modethirteen
Troposphere
@modethirteen
Puppet / Chef / SaltStack / Ansible
• Stack includes an EC2 Instance or AutoScaling Group Resource
• Resource includes a “UserData” metadata section, for bootstrapping an instance or group of
instances
• Include data that cloud-init uses to install instance configuration tool of choice
• curl http://169.254.169.254/latest/user-data
• Example:
• cloud-init installs puppet from UserData commands
• cloud-init runs puppet (configures instance and installs cfn-signal)
• cfn-signal notifies CloudFormation that puppet was success or failure
@modethirteen
Execute Deployment
@modethirteen
Lessons Learned
• Goal was to put entire existing AWS infrastructure into CloudFormation, no
immediate value was attained
• Difficult getting buy in for incremental improvements to infrastructure
management
• Existing resources cannot be migrated to CloudFormation
• Know the caveats of deleting AWS Resources, they can fail a stack tear down
• AWS Resources missing from CloudFormation API can be mitigated with
Custom Resources
• Must understand what a resource does when it updates
@modethirteen
Send in the Developers
@modethirteen
Approach #1 : Build your own web
console for launching test
and dev stacks
@modethirteen
Approach #2 : Every developer has
their own AWS account billed to main
AWS account
@modethirteen
Approach #3 : One developer AWS
account billed to main account
@modethirteen
The Teams
• Are developer teams responsible for their own container /
infrastructure templates, are operators part of these teams
• Are developers just as responsible for troubleshooting when
infrastructure goes down
• What are operator obligations to developers
• What are developer obligations to operations
@modethirteen
TL;DR
• Your product is application code, data, services, and servers
• CloudFormation deploys your product to production
• CloudFormation deploys your product for development and testing
• Your developers can make better decisions
• Your operators can make better decisions
• Your customers / users are happy
The End. Q?

Weitere ähnliche Inhalte

Was ist angesagt?

ASP.NET Core Demos
ASP.NET Core DemosASP.NET Core Demos
ASP.NET Core DemosErik Noren
 
ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2Erik Noren
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantFrank van der Linden
 
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)Red Hat Developers
 
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesThreading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesLauren Yew
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2asim78
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsAsher Sterkin
 
From java to scala at crowd mix
From java to scala at crowd mixFrom java to scala at crowd mix
From java to scala at crowd mixStefano Galarraga
 
Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dereBaris Dere
 
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015Lori MacVittie
 
Serverless Code Components
Serverless Code Components Serverless Code Components
Serverless Code Components Shimon Tolts
 
Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0EastBanc Tachnologies
 
IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019Istvan Rath
 
Serverless spark
Serverless sparkServerless spark
Serverless sparkMamathaBusi
 
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
SenchaCon 2016: Oracle Forms Modernisation - Owen PaganSenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
SenchaCon 2016: Oracle Forms Modernisation - Owen PaganSencha
 
Apache Zeppelin & Cluster
Apache Zeppelin & ClusterApache Zeppelin & Cluster
Apache Zeppelin & ClusterJongyoul Lee
 

Was ist angesagt? (20)

ASP.NET Core Demos
ASP.NET Core DemosASP.NET Core Demos
ASP.NET Core Demos
 
Apache flink
Apache flinkApache flink
Apache flink
 
ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2ASP.NET Core Demos Part 2
ASP.NET Core Demos Part 2
 
Apache flink
Apache flinkApache flink
Apache flink
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to Cloudant
 
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
 
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesThreading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
Music streams
Music streamsMusic streams
Music streams
 
From java to scala at crowd mix
From java to scala at crowd mixFrom java to scala at crowd mix
From java to scala at crowd mix
 
Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dere
 
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015
Architectural Patterns for Scaling Microservices and APIs - GlueCon 2015
 
Serverless Code Components
Serverless Code Components Serverless Code Components
Serverless Code Components
 
Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0Developing Cross-Platform Web Apps with ASP.NET Core1.0
Developing Cross-Platform Web Apps with ASP.NET Core1.0
 
IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019IncQuery Server for Teamwork Cloud - Talk at IW2019
IncQuery Server for Teamwork Cloud - Talk at IW2019
 
Serverless spark
Serverless sparkServerless spark
Serverless spark
 
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
SenchaCon 2016: Oracle Forms Modernisation - Owen PaganSenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
 
Apache Zeppelin & Cluster
Apache Zeppelin & ClusterApache Zeppelin & Cluster
Apache Zeppelin & Cluster
 

Andere mochten auch

Configuration manager presentation
Configuration manager presentationConfiguration manager presentation
Configuration manager presentationjeyg
 
Infrastructure as code with Terraform
Infrastructure as code with TerraformInfrastructure as code with Terraform
Infrastructure as code with TerraformSam Bashton
 
Cloud Foundry Deployment Tools: BOSH vs Juju Charms
Cloud Foundry Deployment Tools:  BOSH vs Juju CharmsCloud Foundry Deployment Tools:  BOSH vs Juju Charms
Cloud Foundry Deployment Tools: BOSH vs Juju CharmsAltoros
 
Continuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web ServicesContinuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web ServicesJulien SIMON
 
Infrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web ServicesInfrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web ServicesJulien SIMON
 

Andere mochten auch (6)

Vagrant + ansible vs docker
Vagrant + ansible vs dockerVagrant + ansible vs docker
Vagrant + ansible vs docker
 
Configuration manager presentation
Configuration manager presentationConfiguration manager presentation
Configuration manager presentation
 
Infrastructure as code with Terraform
Infrastructure as code with TerraformInfrastructure as code with Terraform
Infrastructure as code with Terraform
 
Cloud Foundry Deployment Tools: BOSH vs Juju Charms
Cloud Foundry Deployment Tools:  BOSH vs Juju CharmsCloud Foundry Deployment Tools:  BOSH vs Juju Charms
Cloud Foundry Deployment Tools: BOSH vs Juju Charms
 
Continuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web ServicesContinuous Deployment with Amazon Web Services
Continuous Deployment with Amazon Web Services
 
Infrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web ServicesInfrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web Services
 

Ähnlich wie Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation

Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMalcolm Duncanson, CISSP
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudAndrew Coleman
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015WaveMaker, Inc.
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015Amazon Web Services Korea
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsChris Munns
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsSriram Hariharan
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanAmazon Web Services
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
How (and why) to roll your own Docker SaaS
How (and why) to roll your own Docker SaaSHow (and why) to roll your own Docker SaaS
How (and why) to roll your own Docker SaaSRyan Crawford
 
RightScale Webinar: Best Practices: Software Development Strategies Using Win...
RightScale Webinar: Best Practices: Software Development Strategies Using Win...RightScale Webinar: Best Practices: Software Development Strategies Using Win...
RightScale Webinar: Best Practices: Software Development Strategies Using Win...RightScale
 
9 - Making Sense of Containers in the Microsoft Cloud
9 - Making Sense of Containers in the Microsoft Cloud9 - Making Sense of Containers in the Microsoft Cloud
9 - Making Sense of Containers in the Microsoft CloudKangaroot
 
Cloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayCloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayNilesh Satpute
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayOkko Oulasvirta
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB plc
 

Ähnlich wie Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation (20)

Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the Cloud
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless Applications
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
How (and why) to roll your own Docker SaaS
How (and why) to roll your own Docker SaaSHow (and why) to roll your own Docker SaaS
How (and why) to roll your own Docker SaaS
 
RightScale Webinar: Best Practices: Software Development Strategies Using Win...
RightScale Webinar: Best Practices: Software Development Strategies Using Win...RightScale Webinar: Best Practices: Software Development Strategies Using Win...
RightScale Webinar: Best Practices: Software Development Strategies Using Win...
 
9 - Making Sense of Containers in the Microsoft Cloud
9 - Making Sense of Containers in the Microsoft Cloud9 - Making Sense of Containers in the Microsoft Cloud
9 - Making Sense of Containers in the Microsoft Cloud
 
Cloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayCloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombay
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
 
PaaSVSContainerization
PaaSVSContainerizationPaaSVSContainerization
PaaSVSContainerization
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 

Kürzlich hochgeladen

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 

Kürzlich hochgeladen (20)

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 

Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation

  • 1. James Andrew Vaughn (Andy) @MindTouch Tear It Down, Build It Back Up: Empowering Developers with Amazon CloudFormation
  • 2. James Andrew Vaughn (Andy) • Software Architect at MindTouch • @modethirteen on Twitter & GitHub • Interests • Software Build and Testing Automation • Frontend Web Performance • Web Components & Polymer • SSO and Identity Management
  • 3. @modethirteen Agenda • What is Amazon CloudFormation? Why use it? • Managing your release testing and production infrastructure code • Give developers the power (`cause knowledge is power!)
  • 6. @modethirteen All of our customers host their brand on our common, hosted infrastructure. One mistake and all customer brands look bad #yousuck
  • 7. @modethirteen Before CloudFormation • Infrastructure had grown organically over years • Hand rolled scripts with boto.py to create different EC2 instance types, and manual Puppet runs to configure them • Non EC2 AWS Resources managed by hand • No infrastructure in different zones or fast, programatic disaster recovery for entire infrastructure • Developers were ignorant of production infrastructure
  • 8. @modethirteen Weekly releases must be simple, repeatable, non events
  • 9. @modethirteen Developers cannot be isolated from the infrastructure where their code will ultimately run
  • 10. @modethirteen Code gives context to problems solved and provides audit trail for infrastructure design
  • 11. @modethirteen Infrastructure code and server configuration code is versioned with application code
  • 12. @modethirteen CloudFormation: Define creation of AWS resources (EC2 as well as Security Groups, SQS, RDS, etc) Puppet, Chef, SaltStack, Ansible: Define actions that occur within EC2 instances once they’ve been provisioned
  • 13. @modethirteen CloudFormation vs Terraform • Access to nearly every AWS resource. Better support for VPC, Security Groups, IAM, Cloudfront, SQS • Stable and mature • JSON infrastructure templates can be generated by Troposphere (with Python logic) • Vendor neutrality: AWS, OpenStack, Heroku, etc • Can execute infrastructure plans as a dry run • DSL for generating infrastructure templates (HCL) • If one resource fails to build, subsequent rebuild will only build tainted resource and those dependent on it • Open source so AWS API coverage can be improved by community Google Docs: Terraform AWS Coverage
  • 14. @modethirteen CloudFormation Stacks Main Stack Sub Stacks A stack is a collection of AWS resources that can be configured
  • 16. @modethirteen CloudFormation Stacks Resources are things that can be queried, configured in the AWS API (including CloudFormation sub stacks). Examples: Listing S3 buckets, Adding Route 53 DNS entries, Taking DB snapshots
  • 17. @modethirteen Database Stack ElasticSearch Stack App Server Pool Stack Main Stack • AutoScaling::AutoScalingGroup • AutoScaling::LaunchConfiguration • IAM::InstanceProfile • IAM::User • AutoScaling::AutoScalingGroup • AutoScaling::LaunchConfiguration • CloudFormation::WaitCondition • IAM::InstanceProfile • IAM::User • RDS::DBInstance • IAM::InstanceProfile • IAM::User
  • 18. @modethirteen Custom Resources • CloudFormation::CustomResource • Sends custom HTTP message (Service Token) to any of your endpoints, and continues stack execution after response • AWS SNS • AWS Lambda • Node.JS • Your choice!
  • 19. @modethirteen CloudFormation Stacks Stack parameters come from API input, version controlled JSON templates, or from the output of other stacks
  • 20. @modethirteen • MySQL Storage Engine App Server Pool Stack Database Stack ElasticSearch Stack App Server Pool Stack Main Stack • ElasticSearch Version • App Server Pool EC2 Group Name • ElasticSearch EC2 Group Name • RDS MySQL IP & Port
  • 21. @modethirteen CloudFormation Stacks Parameters of stack can be outputted to dependent stacks. Example: IP’s, Security Policies, Custom Values, etc.
  • 22. @modethirteen Template: {…} App Server Pool Stack Database Stack ElasticSearch Stack App Server Pool Stack Main Stack • MySQL Storage Engine • ElasticSearch EC2 Group Name • RDS MySQL IP & Port • ElasticSearch Version • App Server Pool EC2 Group Name Template: {…}
  • 23. @modethirteen Stack Policy: Stack Update Resource Access Control
  • 26. @modethirteen Puppet / Chef / SaltStack / Ansible • Stack includes an EC2 Instance or AutoScaling Group Resource • Resource includes a “UserData” metadata section, for bootstrapping an instance or group of instances • Include data that cloud-init uses to install instance configuration tool of choice • curl http://169.254.169.254/latest/user-data • Example: • cloud-init installs puppet from UserData commands • cloud-init runs puppet (configures instance and installs cfn-signal) • cfn-signal notifies CloudFormation that puppet was success or failure
  • 28. @modethirteen Lessons Learned • Goal was to put entire existing AWS infrastructure into CloudFormation, no immediate value was attained • Difficult getting buy in for incremental improvements to infrastructure management • Existing resources cannot be migrated to CloudFormation • Know the caveats of deleting AWS Resources, they can fail a stack tear down • AWS Resources missing from CloudFormation API can be mitigated with Custom Resources • Must understand what a resource does when it updates
  • 30.
  • 31. @modethirteen Approach #1 : Build your own web console for launching test and dev stacks
  • 32. @modethirteen Approach #2 : Every developer has their own AWS account billed to main AWS account
  • 33. @modethirteen Approach #3 : One developer AWS account billed to main account
  • 34. @modethirteen The Teams • Are developer teams responsible for their own container / infrastructure templates, are operators part of these teams • Are developers just as responsible for troubleshooting when infrastructure goes down • What are operator obligations to developers • What are developer obligations to operations
  • 35. @modethirteen TL;DR • Your product is application code, data, services, and servers • CloudFormation deploys your product to production • CloudFormation deploys your product for development and testing • Your developers can make better decisions • Your operators can make better decisions • Your customers / users are happy

Hinweis der Redaktion

  1. devs have control over app knowledge, ops control production with free flow of ideas between teams there may be biz blockers to free flow, not technical ones
  2. What’s wrong with run scripts or just using puppet or ansible?
  3. saas platform for hosting customer support sites for other companies and brands. Our customers feed the engine with support knowledgeable articles, product information, howto’s and they get this nice branded support site with all sorts of algorithms to rank content by usefulness, and guide their users to the most successful articles. so their users become more knowledgable about their products and become smarter, and more successful with their products. * product manager speak aside, our product is code, customer data, servers and services
  4. our product exists to turn unhappy people into happy ones weekly oppty to make the company look bad Downtime affects other brands, SLA’s, lawsuits
  5. Love sam ramji’s vision for cloud foundry, early advisor to mind touch when it was a purely open source product, but We committed to AWS, specializing on a platform to take advantage of all the features that AWS has, not hedging our bets with the common functionality openstack and aws share no one has ever considered aws a bad decision developers could not explore AWS features, devs had Virtual Machines with “production-like” AWS resources (mocks)
  6. * audit trail is AWS billing record? wth?
  7. code revs
  8. stacks are like sep of concerns (modules) stacks have parameter and resource limits group stacks with resources that should move together, common lifecycle, common security separate app from state
  9. WaitCondition: we don’t have the same insights into when things are done A is done then B (dependency management, and order enforcement)
  10. Atom: Template JSON Atom: Troposphere
  11. Maintained by Canonical Available on AMI or any dist
  12. S3 bucket will need to be secured for cloudformation
  13. something needs to drive biz decision (disaster recovery) CloudFormation can automate the creation of an S3 bucket, cannot automate the deletion of an S3 bucket with objects (Stack delete will fail!) CloudFormation cannot handle the configuration of the Cloudfront CDN OriginAccessIdentityUser (User that can talk to a private S3 bucket)
  14. Remember another goal was to empower developers, to get them working closely with operators, using cloudformation as a mechanism to strengthen this relationship
  15. not saying this is going to happen, but you may want to consider your team and that their creativness may lead to unintended consequences. operators need to be hands off from the stack creation process, so that continuous innovation isn’t blocked, so i have some approaches to mitigating risk
  16. Turn off AWS Console access for developers Turn on API access for a developer portal Pro’s: all things that work in the production env should work in test/dev (same level of internal access to resources) Con’s: build, walled off
  17. Consolidated billing checkout app & infra code, run from cmd Probably built CFN in God Mode Some resources may not be accessible by dev accts, refactor
  18. Pro and Con: Developers can mess with other developer’s stacks - practical jokes Security when team member leaves
  19. * the intent here is once dev’s and ops are working together, a number of new questions arise, which is good. manage docker container, cfn templates for the services required by the things in that container my feeling on the last bit is operators provide working infra templates to devs, dev’s understand what the reprucussions of their decisions on infra — hammering a service, does their code make an ec2 process get cpu bound