SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Downloaden Sie, um offline zu lesen
Building(a(Service(Delivery(
Assembly(Line(with(Vagrant,(
Packer,(and(Ansible( (
(
(
(
@ichristo(
ichristoffersen@vizuri.com(
My new app is
going to be the
next big thing!
Linux, IaaS, AWS,
Rackspace, VMWare,
oVirt, Spacewalk,
Cobbler, Puppet, Ansible,
Chef, Kickstart, Seed
Linux Administrators
SAN Engineers
Network Engineers
DevOps
ITOps
Service Level Agreements
Budgets
Staffing Guidance
Procurement Process
Authority to Operate
Auditing & Compliance
Infrastructure
My new app is
going to be the
next big thing!
Service Delivery :
Provisioning the right set of resources
required to support a set of activities in a
timely manner
Service Delivery :
Provisioning the right set of resources
required to support a set of activities in a
timely manner yesterday
Week$1$ Week$2$ Week$3$ Week$4$ Week$6$ Week$6$ Week$7$ Week$8$
Assembly line :
a manufacturing process in which work
moves from station to station until a final
product is produced
Order
Assemble
Ship Get0Rich
But what about quality? Can
we scale to meet demand?
Code Smell:
A symptom in the source code that could
indicate potential problems or weakness
in the overall design
Example Code Smells:
Duplicate Code
Long Methods
Large, Multi-line Classes
Long Class Parameter Lists
Infrastructure Smell:
A symptom in the system architecture
that could indicate potential problems or
fragility in the overall system
Infrastructure Smells:
Gold Images
Teetering Stacks
Configuration Drift
Infrastructure Atrophy
SMELL :: GOLD IMAGE
PRESCRIPTION :: Use Packer
Automatically create
machine images for
multiple platforms from a
single blueprint
AWS: AMI
VMware: VMX + disks
VirtualBox: OVF + disks
DigitalOcean: Snapshots
and many more …
http://www.packer.io/docs/templates/builders.html
Wait? Didn’t you say
that ”gold” images
were bad.
Packer brings all the
benefits of ”gold”
images without the
baggage.
Automation
No human interaction. Great for
Continuous Integration / Deployment
Standardization
Use Puppet, Chef, Ansible, Bash to
configure the image
Repeatability
Template goes into version control
Image creation knowledge is now in code
Anyone can build / rebuild the base images
EXAMPLE
CentOS Image in both AWS &
Digital Ocean
{
"builders": [
{
"type" : "amazon-ebs",
"access_key" : "{{user `aws_access_key`}}",
"secret_key" : "{{user `aws_secret_key`}}",
"region" : "us-east-1",
"source_ami" : "ami-8997afe0",
"security_group_id" : "sg-8f7e24e4",
"instance_type" : "t1.micro",
"ssh_username" : "ec2-user",
"ssh_timeout" : "5m",
"ami_name" : "centos-baseline {{timestamp}}"
},
…
…
{
"type" : "digitalocean",
"api_key" : "{{user `do_api_key`}}",
"client_id" : "{{user `do_client_id`}}",
"image_id" : "562354",
"snapshot_name" : "centos-baseline {{timestamp}}"
}
]
…
}
$ packer validate base-image.json
Template validated successfully.
$ packer build base-image.json
amazon-ebs output will be in this color.
digitalocean output will be in this color.
…
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' finished.
==> digitalocean: Destroying droplet...
==> digitalocean: Deleting temporary ssh key...
Build 'digitalocean' finished.
==> Builds finished. The artifacts of successful builds are:
--> digitalocean: A snapshot was created: 'centos-baseline
1396457723' in region 'New York 1'
SMELL :: Teetering Stacks
+
PRESCRIPTION
Mature, stable, proven. Development
since Jan 2010. Used by thousands of
companies.
Deploy to Multiple
Providers
AWS, DigitalOcean, HP Cloud,
Joyent, KVM, libvirt, lxc,
OpenStack, Rackspace, Vmware,
VirtualBox
vagrant up --provider=foo
•  Simplifies the provisioning
process for servers.
•  Easier to have an instance per
systems component.
•  Copy files to new images. (i.e.
Keys, Scripts, RPMs)
Workflow
www.vagrantbox.es
Leverage Your own
Packer Images 
•  Base Image as starting point.
•  Integrates with multiple
“provisioners” – Puppet, Chef,
Ansible, Bash
Automation
No human interaction. Great for
Continuous Delivery
Standardization
Can also use Puppet, Chef, Ansible, Bash
Use Packer images as base images
Repeatability
Template goes into version control
Image creation knowledge is now in code
Anyone can build / rebuild the environment
EXAMPLE
Multiple CentOS Images
created in AWS from base AMI
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.box_url = "https://github.com/mitchellh/
vagrant-aws/raw/master/dummy.box"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "YOUR KEY"
aws.secret_access_key = "YOUR SECRET KEY"
aws.keypair_name = "KEYPAIR NAME”
aws.ami = ”ami-9baa9cf2”
override.ssh.username = "ec2-user"
override.ssh.forward_agent = true
override.ssh.private_key_path = "PATH TO YOUR
PRIVATE KEY"
end
end
Vagrantfile
$ vagrant up --provider=aws
Use `vagrant plugin` commands to manage plugins. This warning
will be removed in the next version of Vagrant.
Bringing machine 'test-broker' up with 'aws' provider...
Bringing machine 'test-node-01' up with 'aws' provider...
Bringing machine 'test-node-02' up with 'aws' provider…
Running Vagrant
SMELL :: Configuration Drift
PRESCRIPTION
•  Configuration Management tool
like Puppet, Chef, CFEngine
•  Quick to get started
•  Builds on familiar tools
•  Run commands over SSH. No
additional agents required
EXAMPLE
Configure NTP on Multiple
CentOS AWS Images
…
config.vm.provision :ansible do |ansible|
ansible.sudo = true
ansible.playbook = "provisioning/ansible/playbook.yml”
ansible.verbose = true
end
- hosts: all
tasks:
- name: ensure ntpd is at the latest version
yum: pkg=ntp state=latest
notify:
- restart ntpd
handlers:
- name: restart ntpd
service: name=ntpd state=restarted
$ vagrant provision
Use `vagrant plugin` commands to manage plugins. This warning
will be removed in the next version of Vagrant.
Bringing machine 'test-broker' up with 'aws' provider...
Bringing machine 'test-node-01' up with 'aws' provider...
Bringing machine 'test-node-02' up with 'aws' provider...
WARNING: Nokogiri was built against LibXML version 2.8.0, but
has dynamically loaded 2.9.1
Installing a LAMP Stack on CentOS
EXAMPLE
Provision a CentOS LAMP
Stack in AWS
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
boxes.each do |box|
config.vm.define box[:name], primary: box[:primary] do |config|
config.vm.box = "aws-centos"
config.vm.box_url =
https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
…
config.vm.provision :shell, :privileged => false, :inline => "sudo
yum -y install screen"
config.vm.provision :ansible do |ansible|
ansible.sudo = true
ansible.playbook = "provisioning/ansible/playbook-
lamp.yml"
ansible.verbose = true
end
…
- name : Install LAMP Stack
user: ec2-user
hosts: all
tasks:
- name: Install mysql
yum: name=mysql-server state=latest
- name: install httpd
yum: name=httpd
- name: Install php for mysql
yum: name=$item
with_items:
- php
- php-mysql
- mysql-server
$ vagrant up --provider=aws
Use `vagrant plugin` commands to manage plugins. This warning
will be removed in the next version of Vagrant.
Bringing machine 'test-broker' up with 'aws' provider...
Bringing machine 'test-node-01' up with 'aws' provider...
Bringing machine 'test-node-02' up with 'aws' provider...
WARNING: Nokogiri was built against LibXML version 2.8.0, but
has dynamically loaded 2.9.1
$ vagrant provision
vagrantup.com packer.io ansible.com
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Packer
PackerPacker
Packer
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with Packer
 
Packer
Packer Packer
Packer
 
(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
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'
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleLocal Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
 
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
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
Automating aws infrastructure and code deployments using Ansible @WebEngage
Automating aws infrastructure and code deployments using Ansible @WebEngageAutomating aws infrastructure and code deployments using Ansible @WebEngage
Automating aws infrastructure and code deployments using Ansible @WebEngage
 
Build automated Machine Images using Packer
Build automated Machine Images using PackerBuild automated Machine Images using Packer
Build automated Machine Images using Packer
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
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
 
Learn you some Ansible for great good!
Learn you some Ansible for great good!Learn you some Ansible for great good!
Learn you some Ansible for great good!
 
ILM - Pipeline in the cloud
ILM - Pipeline in the cloudILM - Pipeline in the cloud
ILM - Pipeline in the cloud
 

Andere mochten auch

NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
Ontico
 

Andere mochten auch (16)

Plan, Deploy & Manage Modern Applications Leveraging vCloud Automation Center...
Plan, Deploy & Manage Modern Applications Leveraging vCloud Automation Center...Plan, Deploy & Manage Modern Applications Leveraging vCloud Automation Center...
Plan, Deploy & Manage Modern Applications Leveraging vCloud Automation Center...
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for Beginners
 
Vagrant vs docker? Melhor vagrant + docker
Vagrant vs docker? Melhor vagrant + dockerVagrant vs docker? Melhor vagrant + docker
Vagrant vs docker? Melhor vagrant + docker
 
Provisioning & DevOps at Amis25
Provisioning & DevOps at Amis25Provisioning & DevOps at Amis25
Provisioning & DevOps at Amis25
 
Jsonnet, terraform & packer
Jsonnet, terraform & packerJsonnet, terraform & packer
Jsonnet, terraform & packer
 
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
 
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and ChefScaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
Scaling Next-Generation Internet TV on AWS With Docker, Packer, and Chef
 
Introduction to Vagrant
Introduction to VagrantIntroduction to Vagrant
Introduction to Vagrant
 
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
 
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
SEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerSEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - Packer
 
Ppt on unemployment
Ppt on unemploymentPpt on unemployment
Ppt on unemployment
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 

Ähnlich wie Service Delivery Assembly Line with Vagrant, Packer, and Ansible

Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
ke4qqq
 
Configuration management and deployment with ansible
Configuration management and deployment with ansibleConfiguration management and deployment with ansible
Configuration management and deployment with ansible
Ivan Dimitrov
 
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as CodePuppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
Puppet
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
ke4qqq
 

Ähnlich wie Service Delivery Assembly Line with Vagrant, Packer, and Ansible (20)

Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
 
CI and CD
CI and CDCI and CD
CI and CD
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
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
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
CI and CD
CI and CDCI and CD
CI and CD
 
Cutting through the fog of cloud
Cutting through the fog of cloudCutting through the fog of cloud
Cutting through the fog of cloud
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
Kube-AWS
Kube-AWSKube-AWS
Kube-AWS
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
Configuration management and deployment with ansible
Configuration management and deployment with ansibleConfiguration management and deployment with ansible
Configuration management and deployment with ansible
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as CodePuppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
Puppet Camp Seattle 2014: Puppet: Cloud Infrastructure as Code
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
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
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 

Mehr von Isaac Christoffersen

How to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation SavingsHow to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation Savings
Isaac Christoffersen
 
Vizuri Exadata East Coast Users Conference
Vizuri Exadata East Coast Users ConferenceVizuri Exadata East Coast Users Conference
Vizuri Exadata East Coast Users Conference
Isaac Christoffersen
 

Mehr von Isaac Christoffersen (10)

PaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of Choice
PaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of ChoicePaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of Choice
PaaS Anywhere - Deploying an OpenShift PaaS into your Cloud Provider of Choice
 
The CIO's alternative
The CIO's alternativeThe CIO's alternative
The CIO's alternative
 
JBoss Community vs Enterprise
JBoss Community vs EnterpriseJBoss Community vs Enterprise
JBoss Community vs Enterprise
 
Manage Java Applications in an Open Hybrid Cloud
Manage Java Applications in an Open Hybrid CloudManage Java Applications in an Open Hybrid Cloud
Manage Java Applications in an Open Hybrid Cloud
 
Liberate Your Files with a Private Cloud Storage Solution powered by Open Source
Liberate Your Files with a Private Cloud Storage Solution powered by Open SourceLiberate Your Files with a Private Cloud Storage Solution powered by Open Source
Liberate Your Files with a Private Cloud Storage Solution powered by Open Source
 
Brms road map_10-17-12
Brms road map_10-17-12Brms road map_10-17-12
Brms road map_10-17-12
 
How to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation SavingsHow to Modernize Your Database Platform to Realize Consolidation Savings
How to Modernize Your Database Platform to Realize Consolidation Savings
 
Destination Marketing Open Source and Cloud Presentation
Destination Marketing Open Source and Cloud PresentationDestination Marketing Open Source and Cloud Presentation
Destination Marketing Open Source and Cloud Presentation
 
Seam CMJUG Presentation
Seam CMJUG PresentationSeam CMJUG Presentation
Seam CMJUG Presentation
 
Vizuri Exadata East Coast Users Conference
Vizuri Exadata East Coast Users ConferenceVizuri Exadata East Coast Users Conference
Vizuri Exadata East Coast Users Conference
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 

Service Delivery Assembly Line with Vagrant, Packer, and Ansible

  • 2. My new app is going to be the next big thing!
  • 3. Linux, IaaS, AWS, Rackspace, VMWare, oVirt, Spacewalk, Cobbler, Puppet, Ansible, Chef, Kickstart, Seed Linux Administrators SAN Engineers Network Engineers DevOps ITOps Service Level Agreements Budgets Staffing Guidance Procurement Process Authority to Operate Auditing & Compliance Infrastructure My new app is going to be the next big thing!
  • 4. Service Delivery : Provisioning the right set of resources required to support a set of activities in a timely manner
  • 5. Service Delivery : Provisioning the right set of resources required to support a set of activities in a timely manner yesterday
  • 6.
  • 7. Week$1$ Week$2$ Week$3$ Week$4$ Week$6$ Week$6$ Week$7$ Week$8$
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Assembly line : a manufacturing process in which work moves from station to station until a final product is produced
  • 15. But what about quality? Can we scale to meet demand?
  • 16.
  • 17. Code Smell: A symptom in the source code that could indicate potential problems or weakness in the overall design
  • 18. Example Code Smells: Duplicate Code Long Methods Large, Multi-line Classes Long Class Parameter Lists
  • 19. Infrastructure Smell: A symptom in the system architecture that could indicate potential problems or fragility in the overall system
  • 20. Infrastructure Smells: Gold Images Teetering Stacks Configuration Drift Infrastructure Atrophy
  • 21. SMELL :: GOLD IMAGE
  • 23. Automatically create machine images for multiple platforms from a single blueprint
  • 24.
  • 25. AWS: AMI VMware: VMX + disks VirtualBox: OVF + disks DigitalOcean: Snapshots and many more … http://www.packer.io/docs/templates/builders.html
  • 26. Wait? Didn’t you say that ”gold” images were bad.
  • 27. Packer brings all the benefits of ”gold” images without the baggage.
  • 28. Automation No human interaction. Great for Continuous Integration / Deployment Standardization Use Puppet, Chef, Ansible, Bash to configure the image Repeatability Template goes into version control Image creation knowledge is now in code Anyone can build / rebuild the base images
  • 29. EXAMPLE CentOS Image in both AWS & Digital Ocean
  • 30. { "builders": [ { "type" : "amazon-ebs", "access_key" : "{{user `aws_access_key`}}", "secret_key" : "{{user `aws_secret_key`}}", "region" : "us-east-1", "source_ami" : "ami-8997afe0", "security_group_id" : "sg-8f7e24e4", "instance_type" : "t1.micro", "ssh_username" : "ec2-user", "ssh_timeout" : "5m", "ami_name" : "centos-baseline {{timestamp}}" }, …
  • 31. … { "type" : "digitalocean", "api_key" : "{{user `do_api_key`}}", "client_id" : "{{user `do_client_id`}}", "image_id" : "562354", "snapshot_name" : "centos-baseline {{timestamp}}" } ] … }
  • 32. $ packer validate base-image.json Template validated successfully. $ packer build base-image.json amazon-ebs output will be in this color. digitalocean output will be in this color. … ==> amazon-ebs: Deleting temporary keypair... Build 'amazon-ebs' finished. ==> digitalocean: Destroying droplet... ==> digitalocean: Deleting temporary ssh key... Build 'digitalocean' finished. ==> Builds finished. The artifacts of successful builds are: --> digitalocean: A snapshot was created: 'centos-baseline 1396457723' in region 'New York 1'
  • 35. Mature, stable, proven. Development since Jan 2010. Used by thousands of companies.
  • 36. Deploy to Multiple Providers AWS, DigitalOcean, HP Cloud, Joyent, KVM, libvirt, lxc, OpenStack, Rackspace, Vmware, VirtualBox vagrant up --provider=foo
  • 37. •  Simplifies the provisioning process for servers. •  Easier to have an instance per systems component. •  Copy files to new images. (i.e. Keys, Scripts, RPMs) Workflow
  • 39. Leverage Your own Packer Images •  Base Image as starting point. •  Integrates with multiple “provisioners” – Puppet, Chef, Ansible, Bash
  • 40. Automation No human interaction. Great for Continuous Delivery Standardization Can also use Puppet, Chef, Ansible, Bash Use Packer images as base images Repeatability Template goes into version control Image creation knowledge is now in code Anyone can build / rebuild the environment
  • 42. Vagrant.configure("2") do |config| config.vm.box = "dummy" config.vm.box_url = "https://github.com/mitchellh/ vagrant-aws/raw/master/dummy.box" config.vm.provider :aws do |aws, override| aws.access_key_id = "YOUR KEY" aws.secret_access_key = "YOUR SECRET KEY" aws.keypair_name = "KEYPAIR NAME” aws.ami = ”ami-9baa9cf2” override.ssh.username = "ec2-user" override.ssh.forward_agent = true override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY" end end Vagrantfile
  • 43. $ vagrant up --provider=aws Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider… Running Vagrant
  • 46. •  Configuration Management tool like Puppet, Chef, CFEngine •  Quick to get started •  Builds on familiar tools •  Run commands over SSH. No additional agents required
  • 47. EXAMPLE Configure NTP on Multiple CentOS AWS Images
  • 48. … config.vm.provision :ansible do |ansible| ansible.sudo = true ansible.playbook = "provisioning/ansible/playbook.yml” ansible.verbose = true end - hosts: all tasks: - name: ensure ntpd is at the latest version yum: pkg=ntp state=latest notify: - restart ntpd handlers: - name: restart ntpd service: name=ntpd state=restarted
  • 49. $ vagrant provision Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider... WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 Installing a LAMP Stack on CentOS
  • 50. EXAMPLE Provision a CentOS LAMP Stack in AWS
  • 51. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| boxes.each do |box| config.vm.define box[:name], primary: box[:primary] do |config| config.vm.box = "aws-centos" config.vm.box_url = https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box … config.vm.provision :shell, :privileged => false, :inline => "sudo yum -y install screen" config.vm.provision :ansible do |ansible| ansible.sudo = true ansible.playbook = "provisioning/ansible/playbook- lamp.yml" ansible.verbose = true end …
  • 52. - name : Install LAMP Stack user: ec2-user hosts: all tasks: - name: Install mysql yum: name=mysql-server state=latest - name: install httpd yum: name=httpd - name: Install php for mysql yum: name=$item with_items: - php - php-mysql - mysql-server
  • 53. $ vagrant up --provider=aws Use `vagrant plugin` commands to manage plugins. This warning will be removed in the next version of Vagrant. Bringing machine 'test-broker' up with 'aws' provider... Bringing machine 'test-node-01' up with 'aws' provider... Bringing machine 'test-node-02' up with 'aws' provider... WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1 $ vagrant provision