SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Infrastructure as code
with
AWS CloudFormation
PyMunich 2016
Justyna Janczyszyn (JJ)
@JJanczyszyn
software engineer at 10Clouds
CHALLENGES
4 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
5 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
6 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
7 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
8 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
9 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Image taken from: Infrastructure as Code by Kief Morris
10 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
11 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as code principles
and practices to the rescue!
12 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Any element of infrastructure
should be easily reproducible
13 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Systems should be
consistent
14 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Processes should be
repeatable
15 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Design is always changing
16 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Infrastructure as Code by Kief Morris
Practices
17 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• Use Definition files
• Self-documented systems and processes
• Version all the things
• Continuously test the systems and processes
• Small changes rather than batches
• Services available continuously
Infrastructure as Code by Kief Morris
CloudFormation
18 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
19 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
20 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Image taken from http://fbrnc.net/blog/2016/05/green-blue-deployments-with-aws-lambda-and-cloudformation
Creating a stack
21 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation create-stack
--stack-name demo-iac
--template-body file://Template.yaml
--parameters file://Params.json
--capabilities CAPABILITY_NAMED_IAM
--region eu-west-1;
23 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
24 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
25 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
26 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation describe-stacks --stack-name demo-iac
Describe a stack
Delete a stack
28 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
aws cloudformation delete-stack —stack-name demo-iac
Change Sets
29 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
https://aws.amazon.com/blogs/aws/new-change-sets-for-aws-
cloudformation/
https://aws.amazon.com/blogs/aws/new-change-sets-for-aws-cloudformation/
aws cloudformation estimate-template-cost
--template-body file://Template.yaml
--parameters file://Params.json;
31 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Cost estimation
32 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
33 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Best Practices
34 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Planning and organizing
• organize stacks by lifecycle and ownership
• reuse templetes for various environments
• use nested stacks
35 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Creating templates
• don’t embed credentials in templates
• validate templates before using them
• use parameter constraints
36 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
Managing stacks
• use stack policies
• use change sets
• manage all stack resources through cloudformation
• use code reviews and revision for your templates
Ready to use templates
37 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• https://github.com/awslabs/aws-cloudformation-
templates
• https://github.com/widdix/aws-cf-templates
Library to create AWS
CloudFormation descriptions
38 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• https://github.com/cloudtools/troposphere
Other resources
39 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code
• Infrastructure as Code by Kief Morris
http://infrastructure-as-code.com/
• Martin Fowler’s Infrastructure as Code at YOW! 2016:
https://www.youtube.com/watch?v=ueAef9tNUck
http://martinfowler.com/bliki/InfrastructureAsCode.html
• Great blog on AWS:
https://cloudonaut.io/
Step by step automate all
40 PyMunich 2016@JJanczyszyn
https://github.com/tramwaj29/infrastructure-as-code

Contenu connexe

En vedette

The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
Timothy Fitz
 

En vedette (20)

Scaling Up Continuous Deployment
Scaling Up Continuous DeploymentScaling Up Continuous Deployment
Scaling Up Continuous Deployment
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS Cloud
 
Analysis of TLS in SMTP World
Analysis of TLS in SMTP WorldAnalysis of TLS in SMTP World
Analysis of TLS in SMTP World
 
The Hard Problems of Continuous Deployment
The Hard Problems of Continuous DeploymentThe Hard Problems of Continuous Deployment
The Hard Problems of Continuous Deployment
 
Infrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormationInfrastructure Continuous Delivery using CloudFormation
Infrastructure Continuous Delivery using CloudFormation
 
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec ProgramAppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
AppSec++ Take the best of Agile, DevOps and CI/CD into your AppSec Program
 
Keeping your CI/CD pipeline as fast as it needs to be
Keeping your CI/CD pipeline as fast as it needs to beKeeping your CI/CD pipeline as fast as it needs to be
Keeping your CI/CD pipeline as fast as it needs to be
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Continuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous DeliveryContinuous Deployment: Beyond Continuous Delivery
Continuous Deployment: Beyond Continuous Delivery
 
Dod is not done
Dod is not doneDod is not done
Dod is not done
 
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
IBM Innovate - Adoption of Continuous Delivery at Scale at a large telco v0 3
 
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
Jenkins CI + XebiaLabs for Release Orchestration: A Recipe for Continuous Del...
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty Details
 
The Journey of devops and continuous delivery in a Large Financial Institution
The Journey of devops and continuous delivery in a Large Financial InstitutionThe Journey of devops and continuous delivery in a Large Financial Institution
The Journey of devops and continuous delivery in a Large Financial Institution
 
Securing application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environmentsSecuring application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environments
 
A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
 
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
 
RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
RMG207 Introduction to AWS CloudFormation - AWS re: Invent 2012
 

Similaire à Infrastructure as Code with AWS CloudFormation

Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
Chris Fregly
 

Similaire à Infrastructure as Code with AWS CloudFormation (20)

Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
PostCSS - process CSS in a modular way.
PostCSS - process CSS in a modular way.PostCSS - process CSS in a modular way.
PostCSS - process CSS in a modular way.
 
Hadoop und IoT
Hadoop und IoTHadoop und IoT
Hadoop und IoT
 
Aws re invent recap 2016 sm2
Aws re invent recap 2016 sm2Aws re invent recap 2016 sm2
Aws re invent recap 2016 sm2
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applications
 
Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
Deploy Spark ML and Tensorflow AI Models from Notebooks to Microservices - No...
 
QCon Sao Paulo Keynote - Microservices, an Unexpected Journey
QCon Sao Paulo Keynote - Microservices, an Unexpected JourneyQCon Sao Paulo Keynote - Microservices, an Unexpected Journey
QCon Sao Paulo Keynote - Microservices, an Unexpected Journey
 
ECPPM2016 - SimpleBIM: from full ifcOWL graphs to simplified building graphs
ECPPM2016 - SimpleBIM: from full ifcOWL graphs to simplified building graphsECPPM2016 - SimpleBIM: from full ifcOWL graphs to simplified building graphs
ECPPM2016 - SimpleBIM: from full ifcOWL graphs to simplified building graphs
 
Spryker Hackathon Q1 2016
Spryker Hackathon Q1 2016Spryker Hackathon Q1 2016
Spryker Hackathon Q1 2016
 
Automated Reverse-Engineering of a Cloud API
Automated Reverse-Engineering of a Cloud APIAutomated Reverse-Engineering of a Cloud API
Automated Reverse-Engineering of a Cloud API
 
Serverless and the Way Forward
Serverless and the Way ForwardServerless and the Way Forward
Serverless and the Way Forward
 
CompiledMCR
CompiledMCRCompiledMCR
CompiledMCR
 
Practical Examples of Serverless Architecture using AWS Lambda and PyWren as ...
Practical Examples of Serverless Architecture using AWS Lambda and PyWren as ...Practical Examples of Serverless Architecture using AWS Lambda and PyWren as ...
Practical Examples of Serverless Architecture using AWS Lambda and PyWren as ...
 
Continuous Delivery: Playing with Immutable servers @commitporto 2016
Continuous Delivery: Playing with Immutable servers @commitporto 2016Continuous Delivery: Playing with Immutable servers @commitporto 2016
Continuous Delivery: Playing with Immutable servers @commitporto 2016
 
Front-end on Steroids
Front-end on SteroidsFront-end on Steroids
Front-end on Steroids
 
1st RINASim webinar
1st RINASim webinar1st RINASim webinar
1st RINASim webinar
 
Better Code With Python
Better Code With PythonBetter Code With Python
Better Code With Python
 
Building Serverless applications with Python
Building Serverless applications with PythonBuilding Serverless applications with Python
Building Serverless applications with Python
 
Follow your code: Node tracing
Follow your code: Node tracingFollow your code: Node tracing
Follow your code: Node tracing
 
Front-end on Steroids
Front-end on SteroidsFront-end on Steroids
Front-end on Steroids
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Infrastructure as Code with AWS CloudFormation