SlideShare a Scribd company logo
1 of 28
Download to read offline
AWS Provisioning with Chef
Creating an AMI Factory
George Miranda
Partner Integration Engineer
AWS Pop-up Loft
June 23, 2014
Introductions
• George Miranda
!
• Partner Integration Engineer
• Consultant
• Infrastructure guy
!
• gmiranda@getchef.com
• gmiranda23
Twitter | GitHub | IRC | *:*
Deploying to AWS EC2
• A pretty BIG topic
• FAQ: where does Chef fit?
• Here’s what we’ll cover
• Brief intro to Chef
• Basic intro to provisioning options
• AWS specific challenge: auto-scaling
• Focus on AMI management
• Live Demo
• Next Steps
Chef Basics
In 90 seconds or less
• Configuration Management & Automation Framework
• Scalable, Extensible, Testable
• Infrastructure as Code
• Data Driven Cookbooks
• Run the same code: Dev/Stg/Prod, On-Prem or AWS
• “Recipes” are a collection of “resources”
• “Cookbooks” are a collection of “recipes”
• 1,400+ Community Cookbooks Available
• “Roles” are an ordered list of recipes to apply
• “Nodes” can have one or more “roles”
• “Knife” is a Chef’s go-to tool
Provisioning a node with knife-ec2
!
knife	
  ec2	
  server	
  create	
  -­‐r	
  "role[webserver]"	
  -­‐I	
  ami-­‐2d4aa444	
  	
  
	
  	
  	
  -­‐-­‐flavor	
  m1.small	
  -­‐S	
  aws_ssh_key	
  -­‐Z	
  us-­‐east-­‐1b	
  -­‐N	
  my_webserver1
• Provisions a new m1.small in us-east-1b
• Waits for instance-id & network settings from AWS
• Waits for ssh or winrm
• Issues remote commands
• Install Chef
• Configure Chef
• Run chef-client
Provisioning with chef-metal
require	
  'chef_metal_fog'	
  
!
with_machine_options	
  :bootstrap_options	
  =>	
  {	
  
	
  	
  :key_name	
  =>	
  'aws_ssh_key',	
  
	
  	
  :image_id	
  =>	
  'ami-­‐2d4aa444',	
  
	
  	
  :flavor_id	
  =>	
  'm1.small',	
  
	
  	
  :region	
  =>	
  'us-­‐east-­‐1b'	
  
}	
  
!
machine	
  'my_database1'	
  do	
  
	
  	
  role	
  'database'	
  
	
  	
  tag	
  'mysql_master'	
  
end	
  
!
num_webservers	
  =	
  5	
  
!
1.upto(num_webservers)	
  do	
  |i|	
  
	
  	
  machine	
  "my_webserver#{i}"	
  do	
  
	
  	
  	
  	
  role	
  'webserver'	
  
	
  end	
  
end
• Declare infrastructure topology in a
recipe
• Configure multiple VM "drivers"
• Ensure my_database1 is present
• Then ensure 5 web servers are
present
• Self-healing (convergent)
• Version your infrastructure
• Almost 1.0.0
{	
  
	
  	
  	
  ~500	
  lines	
  of	
  JSON	
  
!
	
  	
  	
  "UserData"	
  :	
  {	
  "Fn::Base64"	
  :	
  {	
  "Fn::Join"	
  :	
  ["",	
  [	
  	
  
	
  	
  	
  	
  	
  	
  "#!/bin/bash	
  -­‐vn",	
  	
  
	
  	
  	
  	
  	
  	
  "function	
  error_exitn",	
  	
  
	
  	
  	
  	
  	
  	
  "{n",	
  	
  
	
  	
  	
  	
  	
  	
  "	
  cfn-­‐signal	
  -­‐e	
  1	
  -­‐r	
  "$1"	
  '",	
  {	
  "Ref"	
  :	
  
"ChefClientWaitHandle"	
  },	
  "'n",	
  	
  
	
  	
  	
  	
  	
  	
  "exit	
  1n",	
  	
  
	
  	
  	
  	
  	
  	
  "}n",	
  	
  
!
	
  	
  	
  	
  	
  	
  #{Bunch	
  of	
  stuff	
  to	
  get	
  Chef	
  installed/configured}	
  
!
	
  	
  	
  	
  	
  	
  "#	
  If	
  all	
  went	
  well,	
  signal	
  successn",	
  	
  
	
  	
  	
  	
  	
  	
  "cfn-­‐signal	
  -­‐e	
  $?	
  -­‐r	
  'Chef	
  Server	
  configuration'	
  
'",	
  {	
  "Ref"	
  :	
  "ChefClientWaitHandle"	
  },	
  "'n"	
  	
  
	
  	
  	
  	
  ]]}},	
  
!
	
  	
  	
  ~500	
  more	
  lines	
  of	
  JSON	
  
}
Provisioning with CloudFormation
Why CloudFormation?
JSON All The Things!
• Create new Security Groups
• Provision EC2 stack topology
• Elastic Load Balancers
• Elastic IPs
• Provision AWS PaaS connections
• RDS
• SQS
• S3 Buckets
• etc
• Create EC2 Auto-Scaling Groups
The Auto-Scaling Challenge

Meeting Demand Fast
• Typically triggered by utilization alerts
• You are already falling behind by the
time your infrastructure responds
• You need capacity… FAST!
• You already lose response time during
instantiation
• 3-5 minutes is an eternity when your
application is choking
• Flexibility
• Managing Configuration Drift
• Rapid incremental change
• Avoid golden image sprawl
• Systems are not always disposable
• Avoid asynchronous VM configuration
• Infrastructure as Code
Deploying fully-baked AMIs

Why Would You Still Use Configuration Management?
Pre-Loaded AMIs

Flexibility and Performance
• Bake in the most expensive
components
• Minimal Configuration occurs after
initialization (e.g. systems integration
tasks)
• Manage your pre-loaded AMI
creation in a Chef Recipe
• Chef Recipes are idempotent
• Include those same recipes in your
node’s run_list
Today’s Demo

A Live Demo? SRSLY?
• Creating an AMI Factory with Chef
• Chef Recipe
• Packer
• Berkshelf
!
• For today’s Demo, we’ll pre-bake a
simple Nginx Web Server*
!
* (you would probably never bake in something that inexpensive in “the real world”)
Packer
• Packer is a tool for creating
identical machine images for
multiple platforms from a single
source configuration
• A HashiCorp Project
• http://www.packer.io
Berkshelf
• Berkshelf is a bundler-like dependency
manager for Chef cookbooks
• Encourages treating your cookbooks as
Libraries or Applications
• Makes it very easy to automatically
download and use Chef Community
Cookbooks
• Started at Riot Games
• http://berkshelf.com
Live Demo
Creating a Pre-Loaded AMI
Instance-Store AMI & EBS-Backed AMI: building in parallel
A Tour of Today’s Demo

The Recipe
include_recipe	
  'apt'	
  
include_recipe	
  'nginx'	
  
!
directory	
  '/var/www/nginx-­‐default'	
  do	
  
	
  	
  owner	
  'www-­‐data'	
  
	
  	
  group	
  'www-­‐data'	
  
	
  	
  mode	
  '0755'	
  
	
  	
  recursive	
  true	
  
	
  	
  action	
  :create	
  
end	
  
!
file	
  '/var/www/nginx-­‐default/index.html'	
  do	
  
	
  	
  owner	
  'www-­‐data'	
  
	
  	
  group	
  'www-­‐data'	
  
	
  	
  mode	
  '0755'	
  
	
  	
  content	
  'Hello	
  World	
  from	
  the	
  AWS	
  Pop-­‐up	
  Loft!'	
  
	
  	
  action	
  :create	
  
end
A Tour of Today’s Demo

The Berksfile
site	
  :opscode	
  
!
cookbook	
  'apt'	
  
cookbook	
  'nginx'	
  
!
metadata
A Tour of Today’s Demo

The packer.json file — building Instance-Store AMIs
	
  	
  "builders":	
  [	
  
	
  	
  	
  	
  {	
  "type":	
  "amazon-­‐instance",	
  
	
  	
  	
  	
  	
  	
  "access_key":	
  "{{user	
  `aws_access_key_id`}}",	
  
	
  	
  	
  	
  	
  	
  "secret_key":	
  "{{user	
  `aws_secret_key`}}",	
  
	
  	
  	
  	
  	
  	
  "region":	
  "us-­‐east-­‐1",	
  
	
  	
  	
  	
  	
  	
  "source_ami":	
  "ami-­‐6f969506",	
  
	
  	
  	
  	
  	
  	
  "instance_type":	
  "m1.xlarge",	
  
	
  	
  	
  	
  	
  	
  "ssh_username":	
  "ubuntu",	
  
	
  	
  	
  	
  	
  	
  "ami_name":	
  "packer-­‐instance_store_nginx_{{timestamp}}",	
  
!
	
  	
  	
  	
  	
  	
  "bundle_vol_command":	
  "sudo	
  -­‐n	
  #{very	
  long	
  ami	
  tool	
  e2-­‐bundle-­‐vol	
  command}”,	
  
	
  	
  	
  	
  	
  	
  "bundle_upload_command":	
  "sudo	
  -­‐n	
  #{very	
  long	
  ami	
  tool	
  e2-­‐upload-­‐bundle	
  command}”,	
  
!
	
  	
  	
  	
  	
  	
  "account_id":	
  "{{user	
  `account_id`}}",	
  
	
  	
  	
  	
  	
  	
  "s3_bucket":	
  "{{user	
  `s3_bucket`}}",	
  
	
  	
  	
  	
  	
  	
  "x509_cert_path":	
  "{{user	
  `x509_cert_path`}}",	
  
	
  	
  	
  	
  	
  	
  "x509_key_path":	
  "{{user	
  `x509_key_path`}}"	
  
	
  	
  	
  	
  },
A Tour of Today’s Demo

The packer.json file — building EBS-backed AMIs
builders	
  (continued)	
  
!
	
  	
  	
  	
  {	
  "type":	
  "amazon-­‐ebs",	
  
	
  	
  	
  	
  	
  	
  "access_key":	
  "{{user	
  `aws_access_key_id`}}",	
  
	
  	
  	
  	
  	
  	
  "secret_key":	
  "{{user	
  `aws_secret_key`}}",	
  
	
  	
  	
  	
  	
  	
  "region":	
  "us-­‐east-­‐1",	
  
	
  	
  	
  	
  	
  	
  "source_ami":	
  "ami-­‐2b0b1442",	
  
	
  	
  	
  	
  	
  	
  "instance_type":	
  "m1.xlarge",	
  
	
  	
  	
  	
  	
  	
  "ssh_username":	
  "ubuntu",	
  
	
  	
  	
  	
  	
  	
  "ami_name":	
  "packer-­‐ebs_nginx_{{timestamp}}"	
  
	
  	
  	
  	
  }	
  
	
  	
  ],
A Tour of Today’s Demo

The packer.json file — provisioners
	
  	
  "provisioners"	
  :	
  [	
  
	
  	
  	
  	
  {	
  "type":	
  "chef-­‐solo",	
  
	
  	
  	
  	
  	
  	
  "cookbook_paths":	
  [	
  "../vendor/cookbooks"	
  ],	
  
	
  	
  	
  	
  	
  	
  "run_list":	
  [	
  "packer::default"	
  ]	
  
	
  	
  	
  	
  },	
  
!
	
  	
  	
  	
  {	
  "type":	
  "shell",	
  
	
  	
  	
  	
  	
  	
  "inline":	
  [	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sudo	
  apt-­‐get	
  install	
  -­‐y	
  ruby	
  unzip	
  kpartx",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "wget	
  http://s3.amazonaws.com/ec2-­‐downloads/ec2-­‐ami-­‐tools.zip",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sudo	
  mkdir	
  -­‐p	
  /usr/local/ec2",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sudo	
  unzip	
  ec2-­‐ami-­‐tools.zip	
  -­‐d	
  /usr/local/ec2",	
  
	
  	
  	
  	
  	
  	
  	
  	
  "sudo	
  mv	
  /usr/local/ec2/ec2-­‐ami-­‐tools-­‐*	
  /usr/local/ec2/ec2-­‐ami-­‐tools/"	
  
	
  	
  	
  	
  	
  	
  ],	
  
	
  	
  	
  	
  	
  	
  "only":	
  [	
  "amazon-­‐instance"	
  ]	
  
	
  	
  	
  	
  }	
  
	
  ]
A Tour of Today’s Demo

The packer command (script)
#!/bin/bash	
  
rm	
  -­‐r	
  ../vendor/cookbooks	
  
berks	
  install	
  -­‐-­‐path	
  ../vendor/cookbooks	
  
packer	
  build	
  	
  
	
  	
  -­‐var	
  "account_id=$AWS_ACCOUNT_ID"	
  	
  
	
  	
  -­‐var	
  "aws_access_key_id=$AWS_ACCESS_KEY_ID"	
  	
  
	
  	
  -­‐var	
  "aws_secret_key=$AWS_SECRET_ACCESS_KEY"	
  	
  
	
  	
  -­‐var	
  "x509_cert_path=$AWS_X509_CERT_PATH"	
  	
  
	
  	
  -­‐var	
  "x509_key_path=$AWS_X509_KEY_PATH"	
  	
  
	
  	
  -­‐var	
  "s3_bucket=chef-­‐packer-­‐bucket"	
  	
  
	
  	
  packer.json
Live Demo Checkpoint
Creating a Pre-Loaded AMI
Instance-Store AMI & EBS-Backed AMI: building in parallel
Ready to Use Our AMIs

Run it the best way for your environment
• Use these AMIs in your CloudFormation
Templates
• Define UserData to run
"chef-client -j run_list.json"
• Example run_list.json
{ "run_list": [ "role[webserver]" ] }
!
• Leave integration tasks to Chef
• Recommended: run chef-client periodically
Pitfalls

Or How I Learned to Stop Worrying and Not Rage Against Pre-Baked AMIs
• Beware Image Sprawl
• Pre-Load AMIs only for critical
Autoscaling Instances
• Just Enough OS everywhere else
• Generate AMIs with a CI Pipeline
• Purge previous AMIs methodically
• Cycle running instances methodically
!
• Note: I am NOT suggesting everyone
start making pre-loaded AMIs
Further Reading
Next Steps From here
• https://github.com/gmiranda23/chef-ami-factory
• Unit testing your AMIs (e.g. serverspec)
• AWS Chef Cookbook
• ebs_volume
• ebs_raid
• elastic_ip
• elastic_lb
• resource_tag
• http://packer.io
• http://community.opscode.com/cookbooks
• http://learnchef.com/
Thank You!
George Miranda
!
gmiranda@getchef.com
@gmiranda23
!
Demo Repo — https://github.com/gmiranda23/chef-ami-factory
!
Packer Demo primer found at — http://engineering.cotap.com
EC2 AMI Factory with Chef, Berkshelf, and Packer

More Related Content

What's hot

Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps beginsJeff Hung
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemHubSpot Product Team
 
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'rmcleay
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleOrestes Carracedo
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudIsaac Christoffersen
 
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupAnsible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupOrestes Carracedo
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash courseMarcus Deglos
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to AnsibleDan Vaida
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPressAlan Lok
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with AnsibleAhmed AbouZaid
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development SystemPaul Bearne
 

What's hot (20)

Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps begins
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
Ansible Case Studies
Ansible Case StudiesAnsible Case Studies
Ansible Case Studies
 
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupAnsible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User Group
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Packer
Packer Packer
Packer
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash course
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPress
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Packer
PackerPacker
Packer
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development System
 

Viewers also liked

It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentCarlos Perez
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksICF CIRCUIT
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an IntroductionSanjeev Sharma
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure StandardizationAmazon Web Services
 
Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data storesTomas Doran
 
AWS Meetup - Sydney - February
AWS Meetup - Sydney - February AWS Meetup - Sydney - February
AWS Meetup - Sydney - February markghiasy
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSPavel Gabriel
 
Jsonnet, terraform & packer
Jsonnet, terraform & packerJsonnet, terraform & packer
Jsonnet, terraform & packerDavid Cunningham
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Owain Perry
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraFormWesley Charles Blake
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet
 
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopPuppet
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development WorkflowJeffery Smith
 

Viewers also liked (19)

Learning chef
Learning chefLearning chef
Learning chef
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
 
Empowering developers to deploy their own data stores
Empowering developers to deploy their own data storesEmpowering developers to deploy their own data stores
Empowering developers to deploy their own data stores
 
AWS Meetup - Sydney - February
AWS Meetup - Sydney - February AWS Meetup - Sydney - February
AWS Meetup - Sydney - February
 
SFScon15 - Thomas Lamprecht: "Proxmox Virtual Environment 4.0"
SFScon15 - Thomas Lamprecht: "Proxmox Virtual Environment 4.0"SFScon15 - Thomas Lamprecht: "Proxmox Virtual Environment 4.0"
SFScon15 - Thomas Lamprecht: "Proxmox Virtual Environment 4.0"
 
Proxmox for DevOps
Proxmox for DevOpsProxmox for DevOps
Proxmox for DevOps
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWS
 
Jsonnet, terraform & packer
Jsonnet, terraform & packerJsonnet, terraform & packer
Jsonnet, terraform & packer
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
 
London Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in ProductionLondon Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in Production
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
 
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development Workflow
 

Similar to EC2 AMI Factory with Chef, Berkshelf, and Packer

DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeMario IC
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chefkevsmith
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefMichael Lihs
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsManish Pandit
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Chef
 
20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnwgarrett honeycutt
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)Julien SIMON
 
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Miguel Zuniga
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefChef Software, Inc.
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefNathen Harvey
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivAmazon Web Services
 

Similar to EC2 AMI Factory with Chef, Berkshelf, and Packer (20)

DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As Code
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Amazon EC2 Container Service
Amazon EC2 Container ServiceAmazon EC2 Container Service
Amazon EC2 Container Service
 
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
Configuration Management in the Cloud - Cloud Phoenix Meetup Feb 2014
 
Vagrant For DevOps
Vagrant For DevOpsVagrant For DevOps
Vagrant For DevOps
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

EC2 AMI Factory with Chef, Berkshelf, and Packer

  • 1. AWS Provisioning with Chef Creating an AMI Factory George Miranda Partner Integration Engineer AWS Pop-up Loft June 23, 2014
  • 2. Introductions • George Miranda ! • Partner Integration Engineer • Consultant • Infrastructure guy ! • gmiranda@getchef.com • gmiranda23 Twitter | GitHub | IRC | *:*
  • 3. Deploying to AWS EC2 • A pretty BIG topic • FAQ: where does Chef fit? • Here’s what we’ll cover • Brief intro to Chef • Basic intro to provisioning options • AWS specific challenge: auto-scaling • Focus on AMI management • Live Demo • Next Steps
  • 4. Chef Basics In 90 seconds or less • Configuration Management & Automation Framework • Scalable, Extensible, Testable • Infrastructure as Code • Data Driven Cookbooks • Run the same code: Dev/Stg/Prod, On-Prem or AWS • “Recipes” are a collection of “resources” • “Cookbooks” are a collection of “recipes” • 1,400+ Community Cookbooks Available • “Roles” are an ordered list of recipes to apply • “Nodes” can have one or more “roles” • “Knife” is a Chef’s go-to tool
  • 5. Provisioning a node with knife-ec2 ! knife  ec2  server  create  -­‐r  "role[webserver]"  -­‐I  ami-­‐2d4aa444          -­‐-­‐flavor  m1.small  -­‐S  aws_ssh_key  -­‐Z  us-­‐east-­‐1b  -­‐N  my_webserver1 • Provisions a new m1.small in us-east-1b • Waits for instance-id & network settings from AWS • Waits for ssh or winrm • Issues remote commands • Install Chef • Configure Chef • Run chef-client
  • 6. Provisioning with chef-metal require  'chef_metal_fog'   ! with_machine_options  :bootstrap_options  =>  {      :key_name  =>  'aws_ssh_key',      :image_id  =>  'ami-­‐2d4aa444',      :flavor_id  =>  'm1.small',      :region  =>  'us-­‐east-­‐1b'   }   ! machine  'my_database1'  do      role  'database'      tag  'mysql_master'   end   ! num_webservers  =  5   ! 1.upto(num_webservers)  do  |i|      machine  "my_webserver#{i}"  do          role  'webserver'    end   end • Declare infrastructure topology in a recipe • Configure multiple VM "drivers" • Ensure my_database1 is present • Then ensure 5 web servers are present • Self-healing (convergent) • Version your infrastructure • Almost 1.0.0
  • 7. {        ~500  lines  of  JSON   !      "UserData"  :  {  "Fn::Base64"  :  {  "Fn::Join"  :  ["",  [                "#!/bin/bash  -­‐vn",                "function  error_exitn",                "{n",                "  cfn-­‐signal  -­‐e  1  -­‐r  "$1"  '",  {  "Ref"  :   "ChefClientWaitHandle"  },  "'n",                "exit  1n",                "}n",     !            #{Bunch  of  stuff  to  get  Chef  installed/configured}   !            "#  If  all  went  well,  signal  successn",                "cfn-­‐signal  -­‐e  $?  -­‐r  'Chef  Server  configuration'   '",  {  "Ref"  :  "ChefClientWaitHandle"  },  "'n"            ]]}},   !      ~500  more  lines  of  JSON   } Provisioning with CloudFormation
  • 8. Why CloudFormation? JSON All The Things! • Create new Security Groups • Provision EC2 stack topology • Elastic Load Balancers • Elastic IPs • Provision AWS PaaS connections • RDS • SQS • S3 Buckets • etc • Create EC2 Auto-Scaling Groups
  • 9. The Auto-Scaling Challenge
 Meeting Demand Fast • Typically triggered by utilization alerts • You are already falling behind by the time your infrastructure responds • You need capacity… FAST! • You already lose response time during instantiation • 3-5 minutes is an eternity when your application is choking
  • 10. • Flexibility • Managing Configuration Drift • Rapid incremental change • Avoid golden image sprawl • Systems are not always disposable • Avoid asynchronous VM configuration • Infrastructure as Code Deploying fully-baked AMIs
 Why Would You Still Use Configuration Management?
  • 11. Pre-Loaded AMIs
 Flexibility and Performance • Bake in the most expensive components • Minimal Configuration occurs after initialization (e.g. systems integration tasks) • Manage your pre-loaded AMI creation in a Chef Recipe • Chef Recipes are idempotent • Include those same recipes in your node’s run_list
  • 12. Today’s Demo
 A Live Demo? SRSLY? • Creating an AMI Factory with Chef • Chef Recipe • Packer • Berkshelf ! • For today’s Demo, we’ll pre-bake a simple Nginx Web Server* ! * (you would probably never bake in something that inexpensive in “the real world”)
  • 13. Packer • Packer is a tool for creating identical machine images for multiple platforms from a single source configuration • A HashiCorp Project • http://www.packer.io
  • 14. Berkshelf • Berkshelf is a bundler-like dependency manager for Chef cookbooks • Encourages treating your cookbooks as Libraries or Applications • Makes it very easy to automatically download and use Chef Community Cookbooks • Started at Riot Games • http://berkshelf.com
  • 15. Live Demo Creating a Pre-Loaded AMI Instance-Store AMI & EBS-Backed AMI: building in parallel
  • 16. A Tour of Today’s Demo
 The Recipe include_recipe  'apt'   include_recipe  'nginx'   ! directory  '/var/www/nginx-­‐default'  do      owner  'www-­‐data'      group  'www-­‐data'      mode  '0755'      recursive  true      action  :create   end   ! file  '/var/www/nginx-­‐default/index.html'  do      owner  'www-­‐data'      group  'www-­‐data'      mode  '0755'      content  'Hello  World  from  the  AWS  Pop-­‐up  Loft!'      action  :create   end
  • 17. A Tour of Today’s Demo
 The Berksfile site  :opscode   ! cookbook  'apt'   cookbook  'nginx'   ! metadata
  • 18. A Tour of Today’s Demo
 The packer.json file — building Instance-Store AMIs    "builders":  [          {  "type":  "amazon-­‐instance",              "access_key":  "{{user  `aws_access_key_id`}}",              "secret_key":  "{{user  `aws_secret_key`}}",              "region":  "us-­‐east-­‐1",              "source_ami":  "ami-­‐6f969506",              "instance_type":  "m1.xlarge",              "ssh_username":  "ubuntu",              "ami_name":  "packer-­‐instance_store_nginx_{{timestamp}}",   !            "bundle_vol_command":  "sudo  -­‐n  #{very  long  ami  tool  e2-­‐bundle-­‐vol  command}”,              "bundle_upload_command":  "sudo  -­‐n  #{very  long  ami  tool  e2-­‐upload-­‐bundle  command}”,   !            "account_id":  "{{user  `account_id`}}",              "s3_bucket":  "{{user  `s3_bucket`}}",              "x509_cert_path":  "{{user  `x509_cert_path`}}",              "x509_key_path":  "{{user  `x509_key_path`}}"          },
  • 19. A Tour of Today’s Demo
 The packer.json file — building EBS-backed AMIs builders  (continued)   !        {  "type":  "amazon-­‐ebs",              "access_key":  "{{user  `aws_access_key_id`}}",              "secret_key":  "{{user  `aws_secret_key`}}",              "region":  "us-­‐east-­‐1",              "source_ami":  "ami-­‐2b0b1442",              "instance_type":  "m1.xlarge",              "ssh_username":  "ubuntu",              "ami_name":  "packer-­‐ebs_nginx_{{timestamp}}"          }      ],
  • 20. A Tour of Today’s Demo
 The packer.json file — provisioners    "provisioners"  :  [          {  "type":  "chef-­‐solo",              "cookbook_paths":  [  "../vendor/cookbooks"  ],              "run_list":  [  "packer::default"  ]          },   !        {  "type":  "shell",              "inline":  [                  "sudo  apt-­‐get  install  -­‐y  ruby  unzip  kpartx",                  "wget  http://s3.amazonaws.com/ec2-­‐downloads/ec2-­‐ami-­‐tools.zip",                  "sudo  mkdir  -­‐p  /usr/local/ec2",                  "sudo  unzip  ec2-­‐ami-­‐tools.zip  -­‐d  /usr/local/ec2",                  "sudo  mv  /usr/local/ec2/ec2-­‐ami-­‐tools-­‐*  /usr/local/ec2/ec2-­‐ami-­‐tools/"              ],              "only":  [  "amazon-­‐instance"  ]          }    ]
  • 21. A Tour of Today’s Demo
 The packer command (script) #!/bin/bash   rm  -­‐r  ../vendor/cookbooks   berks  install  -­‐-­‐path  ../vendor/cookbooks   packer  build        -­‐var  "account_id=$AWS_ACCOUNT_ID"        -­‐var  "aws_access_key_id=$AWS_ACCESS_KEY_ID"        -­‐var  "aws_secret_key=$AWS_SECRET_ACCESS_KEY"        -­‐var  "x509_cert_path=$AWS_X509_CERT_PATH"        -­‐var  "x509_key_path=$AWS_X509_KEY_PATH"        -­‐var  "s3_bucket=chef-­‐packer-­‐bucket"        packer.json
  • 22. Live Demo Checkpoint Creating a Pre-Loaded AMI Instance-Store AMI & EBS-Backed AMI: building in parallel
  • 23.
  • 24. Ready to Use Our AMIs
 Run it the best way for your environment • Use these AMIs in your CloudFormation Templates • Define UserData to run "chef-client -j run_list.json" • Example run_list.json { "run_list": [ "role[webserver]" ] } ! • Leave integration tasks to Chef • Recommended: run chef-client periodically
  • 25. Pitfalls
 Or How I Learned to Stop Worrying and Not Rage Against Pre-Baked AMIs • Beware Image Sprawl • Pre-Load AMIs only for critical Autoscaling Instances • Just Enough OS everywhere else • Generate AMIs with a CI Pipeline • Purge previous AMIs methodically • Cycle running instances methodically ! • Note: I am NOT suggesting everyone start making pre-loaded AMIs
  • 26. Further Reading Next Steps From here • https://github.com/gmiranda23/chef-ami-factory • Unit testing your AMIs (e.g. serverspec) • AWS Chef Cookbook • ebs_volume • ebs_raid • elastic_ip • elastic_lb • resource_tag • http://packer.io • http://community.opscode.com/cookbooks • http://learnchef.com/
  • 27. Thank You! George Miranda ! gmiranda@getchef.com @gmiranda23 ! Demo Repo — https://github.com/gmiranda23/chef-ami-factory ! Packer Demo primer found at — http://engineering.cotap.com