SlideShare a Scribd company logo
1 of 67
Download to read offline
Create your very own Development
Environment with Vagrant and Packer
… and a little bit of Puppet
Frank Stelzer https://www.flickr.com/photos/eiriknewth/238681391
Créateur de
Agenda
• Motivation
• Vagrant Introduction
• Base Boxes
• Creating an own Base Box with Packer
• Demo
• Fat vs. Thin Boxes
• Provisioning with Puppet
Créateur de
Vagrant
Puppet
Packer
Agenda
Sorry, nothing about Docker in this talk!
Créateur de
Who's speaking?
Frank Stelzer
Software Architect at
SensioLabs Deutschland GmbH
@frastel
Créateur de
Motivation
http://www.flickr.com/photos/mrmoaks/8199740598/
Créateur de
Development Environments
Créateur de
I don't know my dev env, it's just working!
Créateur de
Development Environments
Shared Development Server
XAMPP/MAMP
Vagrant
Golden Image
some undefined VM/local system
Vagrant with Provisioning
Créateur de
Criteria for good development
environments
• Isolated
Créateur de
Development Environments
Shared Development Server
XAMPP/MAMP
Vagrant
Golden Image
some undefined VM/local system
Vagrant with Provisioning
Créateur de
Criteria for good development
environments
• Isolated
• Same tools for production
Créateur de
Development Environments
XAMPP/MAMP
Vagrant
Golden Image
some undefined VM/local system
Vagrant with Provisioning
Créateur de
Criteria for good development
environments
• Isolated
• Same tools for production
• Reproducible
Créateur de
Development Environments
Vagrant
Golden Image
some undefined VM/local system
Vagrant with Provisioning
Créateur de
Criteria for good development
environments
• Isolated
• Same tools for production
• Reproducible
• EASY!
Créateur de
Development Environments
Golden Image
Vagrant with Provisioning
Créateur de
VAGRANT
http://www.hashicorp.com/ http://www.vagrantup.com/
Créateur de
Vagrant
VirtualBox
VM

!
dev.smoov.io
Vagrant
Vagrantfile



"name =
dev.smoov.io"
project $ vagrant up
Base Box
21
Créateur de
!
Vagrantfile
Vagrant.configure("2") do |config|
!
config.vm.box = "precise64"
config.vm.network "private_network", ip: "192.168.56.10"
config.vm.hostname = "dev.smoov.io"
!
config.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--name", "dev.smoov.io"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
end
!
config.ssh.keep_alive = true
config.ssh.forward_agent = true
!
end
assign provider specific configs
keep this in mind!
Créateur de
vagrant destroy is your friend!
Créateur de
Available Base Boxes
• Ubuntu Lucid 32 Bit (10.04)
• Ubuntu Lucid 64 Bit (10.04)
• Ubuntu Precise 32 Bit (12.04)
• Ubuntu Precise 64 Bit (12.04)
• https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-
Boxes
• https://cloud-images.ubuntu.com/vagrant/
• other inofficial userland boxes: vagrantboxes.es, puphpet.com …
What is in there!?
Créateur de
Native supported base boxes are not up-
to-date in the most cases
PHP 5.3
nginx 0.9
Apache 1
not node compatible
http://www.flickr.com/photos/yoshimov/13909857/
PPAs :(
Créateur de
Can I haz the new things please?
PHP 5.5.9
nginx 1.6
Apache 2
node!
http://www.flickr.com/photos/chaosandcreations/2325239486/
PPAs not needed
Créateur de
Can I? Pleeeease!
Créateur de
Sure!
Créateur de
Wait until new base boxes
will be supported!
http://www.flickr.com/photos/bogenfreund/556656621/
Créateur de
Not really!
Créateur de
Just build your own base box
if you need to!
Créateur de
… and that's now!
Créateur de
Packer!
http://www.hashicorp.com/ http://www.packer.io/
Créateur de
Follow @mitchellh for updates!
Créateur de
!
Base Box defined with simple JSON configuration
        "builders":  [  
                {  
                        "guest_os_type":  "Ubuntu_64",  
                        "iso_url":  "http://releases.ubuntu.com/14.04/ubuntu-­‐14.04-­‐server-­‐amd64.iso",  
                        "shutdown_command":  "echo  'vagrant'  |  sudo  -­‐S  shutdown  -­‐P  now",  
                        "type":  "virtualbox-­‐iso"  
                }  
        ],  
        "post-­‐processors":  [  
                {  
                        "only":  ["virtualbox-­‐iso"],  
                        "type":  "vagrant",  
                        "output":  "build/packer_ubuntu-­‐14.04_{{.Provider}}.box"
Créateur de
Provisioning - with plain shell scripts
"provisioners":  [  
        {  […]    
                "script":  "scripts/install.sh",  
                "type":  "shell"  
        […]  }  
]
# scripts/install.sh
apt-get -y update
apt-get -y -q install linux-headers-$(uname -r) build-essential dkms nfs-common
!
# ... install VBoxGuestAdditions, prepare Vagrant user etc.
!
# install everything for Puppet3+Hiera
apt-get install -y puppet
Créateur de
Provisioning - with Puppet
"provisioners":  [  
        {  […]    
                "type":  "puppet-­‐masterless",  
                "manifest_file":  "puppet/manifests/lamp.pp",  
                "module_paths":  ["puppet/modules"]  
        […]  }  
]
• Provisioning types could be mixed
• Puppet has to be installed within Shell Provisioning first
Créateur de
Resulting VM could be converted to a
Vagrant box or whatever
"builders":  […],  
"post-­‐processors":  [  
        {  
                "only":  ["virtualbox-­‐iso"],  
                "type":  "vagrant",  
                "output":  "buildpacker_ubuntu-­‐14.04_{{.Provider}}.box"  
        }  
]
Créateur de
… and it comes with cool magic!
Créateur de
"builders": [
{
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic preseed/url=http://
{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"debian-installer=en_US auto locale=en_US kbd-
chooser/method=us <wait>",
"hostname={{ .Name }} <wait>",
"fb=false debconf/frontend=noninteractive <wait>",
"keyboard-configuration/modelcode=SKIP keyboard-
configuration/layout=USA keyboard-configuration/variant=USA
console-setup/ask_detect=false <wait>",
"initrd=/install/initrd.gz -- <enter><wait>"
],
Créateur de
Demo: 

Generating a Base Box for
Vagrant with Packer in 3min
Créateur de
http://youtu.be/wgt9jUyuXVI
Créateur de
Base Box is generated! What's next?
Créateur de
Integrate it to your Vagrant setup!
vagrant  box  add  packer_ubuntu-­‐14.04_virtualbox  file://…
Créateur de
!
Vagrantfile
Vagrant.configure("2") do |config|
!
config.vm.box =
config.vm.network "private_network", ip: "192.168.56.10"
config.vm.hostname = "dev.smoov.io"
!
config.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--name", "dev.smoov.io"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
end
!
config.ssh.keep_alive = true
config.ssh.forward_agent = true
!
end
"precise64""packer_ubuntu-14.04_virtualbox"
Créateur de
Packer + Vagrant
VirtualBox
VM

!
dev.smoov.io
Vagrant
Base BoxVagrantfile



"name =
dev.smoov.io"
project $
Packer
Base BoxVM
1
2 3
vagrant up
Créateur de
What to put in Base Boxes?
Créateur de
Everything?
Créateur de
Fat Base Box
Fat Base Box



included:

PHP 5

MySQL

Redis

nginx
Créateur de
Fat Base Box
• advantages:
• vagrant up -> ultrafast
• no internet connection needed during VM creation
• disadvantages:
• out-of-date very fast
• heavy maintenance needed
• one fat base box for every server type (webserver, database server,
search server etc.)
• … or do you want PHP to be installed on a DB node?
Créateur de
Fat vs. Slim Base Box
Fat Base Box



ISO

VBoxGuestAdditions



PHP 5

MySQL

Redis

nginx
Slim Base Box



ISO

VBoxGuestAdditions


+ Provisioning (Puppet)
Créateur de
Choose wisely according to your needs!
Créateur de
… but …
Créateur de
Slim Base Boxes should be preferred
when infrastructure changes often!
Créateur de
Usage
Fat Base Box

!
• no changes
• System is well known
• Golden Image way
• Admins are defining the system
Slim Base Box
• frequent changes
• System is not yet
defined
• Developers are
defining the system
Créateur de
Slim Base Boxes need additional
provisioning after Virtual Machine has
been installed!
Créateur de
Provisioning with Puppet
VM
Box

!
dev.smoov.io
Vagrant
Base BoxVagrantfile



"name =
dev.smoov.io"
project $
Packer
Base BoxVM
1
2
4Puppet
3
vagrant up
Créateur de
Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION)  do  |config|  
    config.vm.box  =  "packer_ubuntu-­‐14.04_virtualbox"  
      
    #  …  
!
    config.vm.provision  :puppet  do  |puppet|  
        puppet.manifest_file  =  "lamp.pp"  
        puppet.manifests_path  =  "puppet/manifests"  
        puppet.module_path  =  "puppet/modules"  
        puppet.options  =  ["-­‐-­‐verbose"]  
    end  
end  
our generated Base Box from Packer
Provisioning with Puppet
Créateur de
Why Puppet?
Créateur de
Why Not?
Créateur de
Go for Chef or Ansible if you
want!
Créateur de
Puppet <3
Créateur de
Puppet (2) - DSL Overview
Variables
Conditionals
Facts
Modules
Classes
Templates
Defined Types
Créateur de
Puppet – DSL - Modules
puppet/
|-- manifests
| `-- lamp.pp
`-- modules
|-- apache2
| |-- files
| | `-- staticfile.conf
| |-- manifests
| | |-- init.pp
| | |-- mod.pp
| | `-- vhost.pp
| `-- templates
| `-- vhost.erb
|-- composer
| `-- manifests
| `-- init.pp
puppet/
|…
`-- modules
|…
`-- php5
`-- manifests
`-- init.pp
Créateur de
Puppet DSL - Class
Definition:  
class  composer(  
    $dir    =  '/usr/local/bin'  
)  {  
    exec  {  'composer_install':  
        name        =>  'curl  -­‐s  getcomposer.org/installer  |  php',  
        cwd          =>  $dir,  
        creates  =>  '/usr/local/bin/composer.phar',  
        path        =>  '/usr/bin'  
    }  
    #  ...  
}
Usage:  
class  {  'composer':  
    dir  =>  $composer_dir  
}
Créateur de
Puppet DSL - Defined Type
Definition:  
define  apache2::vhost(  
        $server_name      =  $name,  
        $priority            =  '50',  
        $document_root  =  '/var/www',  
        $index_file        =  'index.php',  
        $service              =  apache2:params:service  
)  {  
    #  ...  
}  
Usage:  
apache2::vhost  {  'dev.smoov.io':  
    priority            =>  20,  
    document_root  =>  '/var/www/smoovio/web',  
    index_file        =>  'app_dev.php'  
}  
Créateur de
Puppet DSL - Manifest
#  manifests/dev.pp  
    #  ...  
    class  {  'apache2':  }  
    -­‐>  
    apache2::vhost  {  'dev.smoov.io':  
        priority            =>  20,  
        document_root  =>  '/var/www/smoovio/web',  
        index_file        =>  'app_dev.php'  
    }  
    -­‐>class  {  'php5':  }

    -­‐>class  {  'composer':  }  
    #  ...  
Créateur de
Infrastructure as Code
Créateur de
To sum up
• with Vagrant you can create Virtual Machines bases on
Base Boxes very easy
• Packer adds the possibility to create your own Base
Box for those VMs
• It's up to you if you create a Fat or a Thin Base Box
• After creation a Virtual Machine could be provisioned
with Puppet (or place your preferred provisioning tool
here)
Créateur de
Need more Information or Help!?
http://sensiolabs.de/workshops/vagrant/
packer build <your own base box>.json … now!
Frank Stelzer

@frastel

More Related Content

What's hot

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
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash courseMarcus Deglos
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environmentSoshi Nemoto
 
DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)Soshi Nemoto
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...Sebastian Neubauer
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deploymentNicholas McClay
 
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
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013Tomas Doran
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps beginsJeff Hung
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundHendrik Ebbers
 
Azure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantAzure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantBas Meijer
 

What's hot (20)

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
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash course
 
Vagrant
Vagrant Vagrant
Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
 
DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
 
Cialug August 2021
Cialug August 2021Cialug August 2021
Cialug August 2021
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
 
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
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps begins
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
 
Azure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantAzure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and Vagrant
 

Viewers also liked

Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Matthew Skelton
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with PackerMatt Wrock
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development EnvironmentsOscar Merida
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleDmytro Slupytskyi
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of PackerFreyr Lin
 
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 Chefbridgetkromhout
 

Viewers also liked (7)

Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014Death to the DevOps team - Agile Yorkshire 2014
Death to the DevOps team - Agile Yorkshire 2014
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with Packer
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development Environments
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of Packer
 
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
 
Meet the-other-elephant
Meet the-other-elephantMeet the-other-elephant
Meet the-other-elephant
 

Similar to Create your very own Development Environment with Vagrant and Packer

Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easyMarco Silva
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopOlinData
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopPuppet
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...Atlassian
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerJohn Rofrano
 
Puppet - Instant Data Center
Puppet  - Instant Data CenterPuppet  - Instant Data Center
Puppet - Instant Data CenterBryan Belanger
 
Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Dmitry Guyvoronsky
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de VagrantLeandro Nunes
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 

Similar to Create your very own Development Environment with Vagrant and Packer (20)

Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easy
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...
Taking the Friction Out of Ticket Investigation (Standardized Debugging Envir...
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
 
Puppet - Instant Data Center
Puppet  - Instant Data CenterPuppet  - Instant Data Center
Puppet - Instant Data Center
 
Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 

Recently uploaded

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Create your very own Development Environment with Vagrant and Packer

  • 1. Create your very own Development Environment with Vagrant and Packer … and a little bit of Puppet Frank Stelzer https://www.flickr.com/photos/eiriknewth/238681391
  • 2. Créateur de Agenda • Motivation • Vagrant Introduction • Base Boxes • Creating an own Base Box with Packer • Demo • Fat vs. Thin Boxes • Provisioning with Puppet
  • 4. Créateur de Who's speaking? Frank Stelzer Software Architect at SensioLabs Deutschland GmbH @frastel
  • 7. Créateur de I don't know my dev env, it's just working!
  • 8. Créateur de Development Environments Shared Development Server XAMPP/MAMP Vagrant Golden Image some undefined VM/local system Vagrant with Provisioning
  • 9. Créateur de Criteria for good development environments • Isolated
  • 10. Créateur de Development Environments Shared Development Server XAMPP/MAMP Vagrant Golden Image some undefined VM/local system Vagrant with Provisioning
  • 11. Créateur de Criteria for good development environments • Isolated • Same tools for production
  • 12. Créateur de Development Environments XAMPP/MAMP Vagrant Golden Image some undefined VM/local system Vagrant with Provisioning
  • 13. Créateur de Criteria for good development environments • Isolated • Same tools for production • Reproducible
  • 14. Créateur de Development Environments Vagrant Golden Image some undefined VM/local system Vagrant with Provisioning
  • 15. Créateur de Criteria for good development environments • Isolated • Same tools for production • Reproducible • EASY!
  • 16. Créateur de Development Environments Golden Image Vagrant with Provisioning
  • 19. Créateur de ! Vagrantfile Vagrant.configure("2") do |config| ! config.vm.box = "precise64" config.vm.network "private_network", ip: "192.168.56.10" config.vm.hostname = "dev.smoov.io" ! config.vm.provider :virtualbox do |virtualbox| virtualbox.customize ["modifyvm", :id, "--name", "dev.smoov.io"] virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] virtualbox.customize ["modifyvm", :id, "--memory", "1024"] end ! config.ssh.keep_alive = true config.ssh.forward_agent = true ! end assign provider specific configs keep this in mind!
  • 20. Créateur de vagrant destroy is your friend!
  • 21. Créateur de Available Base Boxes • Ubuntu Lucid 32 Bit (10.04) • Ubuntu Lucid 64 Bit (10.04) • Ubuntu Precise 32 Bit (12.04) • Ubuntu Precise 64 Bit (12.04) • https://github.com/mitchellh/vagrant/wiki/Available-Vagrant- Boxes • https://cloud-images.ubuntu.com/vagrant/ • other inofficial userland boxes: vagrantboxes.es, puphpet.com … What is in there!?
  • 22. Créateur de Native supported base boxes are not up- to-date in the most cases PHP 5.3 nginx 0.9 Apache 1 not node compatible http://www.flickr.com/photos/yoshimov/13909857/ PPAs :(
  • 23. Créateur de Can I haz the new things please? PHP 5.5.9 nginx 1.6 Apache 2 node! http://www.flickr.com/photos/chaosandcreations/2325239486/ PPAs not needed
  • 24. Créateur de Can I? Pleeeease!
  • 26. Créateur de Wait until new base boxes will be supported! http://www.flickr.com/photos/bogenfreund/556656621/
  • 28. Créateur de Just build your own base box if you need to!
  • 29. Créateur de … and that's now!
  • 32. Créateur de ! Base Box defined with simple JSON configuration        "builders":  [                  {                          "guest_os_type":  "Ubuntu_64",                          "iso_url":  "http://releases.ubuntu.com/14.04/ubuntu-­‐14.04-­‐server-­‐amd64.iso",                          "shutdown_command":  "echo  'vagrant'  |  sudo  -­‐S  shutdown  -­‐P  now",                          "type":  "virtualbox-­‐iso"                  }          ],          "post-­‐processors":  [                  {                          "only":  ["virtualbox-­‐iso"],                          "type":  "vagrant",                          "output":  "build/packer_ubuntu-­‐14.04_{{.Provider}}.box"
  • 33. Créateur de Provisioning - with plain shell scripts "provisioners":  [          {  […]                    "script":  "scripts/install.sh",                  "type":  "shell"          […]  }   ] # scripts/install.sh apt-get -y update apt-get -y -q install linux-headers-$(uname -r) build-essential dkms nfs-common ! # ... install VBoxGuestAdditions, prepare Vagrant user etc. ! # install everything for Puppet3+Hiera apt-get install -y puppet
  • 34. Créateur de Provisioning - with Puppet "provisioners":  [          {  […]                    "type":  "puppet-­‐masterless",                  "manifest_file":  "puppet/manifests/lamp.pp",                  "module_paths":  ["puppet/modules"]          […]  }   ] • Provisioning types could be mixed • Puppet has to be installed within Shell Provisioning first
  • 35. Créateur de Resulting VM could be converted to a Vagrant box or whatever "builders":  […],   "post-­‐processors":  [          {                  "only":  ["virtualbox-­‐iso"],                  "type":  "vagrant",                  "output":  "buildpacker_ubuntu-­‐14.04_{{.Provider}}.box"          }   ]
  • 36. Créateur de … and it comes with cool magic!
  • 37. Créateur de "builders": [ { "boot_command": [ "<esc><esc><enter><wait>", "/install/vmlinuz noapic preseed/url=http:// {{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>", "debian-installer=en_US auto locale=en_US kbd- chooser/method=us <wait>", "hostname={{ .Name }} <wait>", "fb=false debconf/frontend=noninteractive <wait>", "keyboard-configuration/modelcode=SKIP keyboard- configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false <wait>", "initrd=/install/initrd.gz -- <enter><wait>" ],
  • 38. Créateur de Demo: 
 Generating a Base Box for Vagrant with Packer in 3min
  • 40. Créateur de Base Box is generated! What's next?
  • 41. Créateur de Integrate it to your Vagrant setup! vagrant  box  add  packer_ubuntu-­‐14.04_virtualbox  file://…
  • 42. Créateur de ! Vagrantfile Vagrant.configure("2") do |config| ! config.vm.box = config.vm.network "private_network", ip: "192.168.56.10" config.vm.hostname = "dev.smoov.io" ! config.vm.provider :virtualbox do |virtualbox| virtualbox.customize ["modifyvm", :id, "--name", "dev.smoov.io"] virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] virtualbox.customize ["modifyvm", :id, "--memory", "1024"] end ! config.ssh.keep_alive = true config.ssh.forward_agent = true ! end "precise64""packer_ubuntu-14.04_virtualbox"
  • 43. Créateur de Packer + Vagrant VirtualBox VM
 ! dev.smoov.io Vagrant Base BoxVagrantfile
 
 "name = dev.smoov.io" project $ Packer Base BoxVM 1 2 3 vagrant up
  • 44. Créateur de What to put in Base Boxes?
  • 46. Créateur de Fat Base Box Fat Base Box
 
 included:
 PHP 5
 MySQL
 Redis
 nginx
  • 47. Créateur de Fat Base Box • advantages: • vagrant up -> ultrafast • no internet connection needed during VM creation • disadvantages: • out-of-date very fast • heavy maintenance needed • one fat base box for every server type (webserver, database server, search server etc.) • … or do you want PHP to be installed on a DB node?
  • 48. Créateur de Fat vs. Slim Base Box Fat Base Box
 
 ISO
 VBoxGuestAdditions
 
 PHP 5
 MySQL
 Redis
 nginx Slim Base Box
 
 ISO
 VBoxGuestAdditions 
 + Provisioning (Puppet)
  • 49. Créateur de Choose wisely according to your needs!
  • 51. Créateur de Slim Base Boxes should be preferred when infrastructure changes often!
  • 52. Créateur de Usage Fat Base Box
 ! • no changes • System is well known • Golden Image way • Admins are defining the system Slim Base Box • frequent changes • System is not yet defined • Developers are defining the system
  • 53. Créateur de Slim Base Boxes need additional provisioning after Virtual Machine has been installed!
  • 54. Créateur de Provisioning with Puppet VM Box
 ! dev.smoov.io Vagrant Base BoxVagrantfile
 
 "name = dev.smoov.io" project $ Packer Base BoxVM 1 2 4Puppet 3 vagrant up
  • 55. Créateur de Vagrantfile Vagrant.configure(VAGRANTFILE_API_VERSION)  do  |config|      config.vm.box  =  "packer_ubuntu-­‐14.04_virtualbox"            #  …   !    config.vm.provision  :puppet  do  |puppet|          puppet.manifest_file  =  "lamp.pp"          puppet.manifests_path  =  "puppet/manifests"          puppet.module_path  =  "puppet/modules"          puppet.options  =  ["-­‐-­‐verbose"]      end   end   our generated Base Box from Packer Provisioning with Puppet
  • 58. Créateur de Go for Chef or Ansible if you want!
  • 60. Créateur de Puppet (2) - DSL Overview Variables Conditionals Facts Modules Classes Templates Defined Types
  • 61. Créateur de Puppet – DSL - Modules puppet/ |-- manifests | `-- lamp.pp `-- modules |-- apache2 | |-- files | | `-- staticfile.conf | |-- manifests | | |-- init.pp | | |-- mod.pp | | `-- vhost.pp | `-- templates | `-- vhost.erb |-- composer | `-- manifests | `-- init.pp puppet/ |… `-- modules |… `-- php5 `-- manifests `-- init.pp
  • 62. Créateur de Puppet DSL - Class Definition:   class  composer(      $dir    =  '/usr/local/bin'   )  {      exec  {  'composer_install':          name        =>  'curl  -­‐s  getcomposer.org/installer  |  php',          cwd          =>  $dir,          creates  =>  '/usr/local/bin/composer.phar',          path        =>  '/usr/bin'      }      #  ...   } Usage:   class  {  'composer':      dir  =>  $composer_dir   }
  • 63. Créateur de Puppet DSL - Defined Type Definition:   define  apache2::vhost(          $server_name      =  $name,          $priority            =  '50',          $document_root  =  '/var/www',          $index_file        =  'index.php',          $service              =  apache2:params:service   )  {      #  ...   }   Usage:   apache2::vhost  {  'dev.smoov.io':      priority            =>  20,      document_root  =>  '/var/www/smoovio/web',      index_file        =>  'app_dev.php'   }  
  • 64. Créateur de Puppet DSL - Manifest #  manifests/dev.pp      #  ...      class  {  'apache2':  }      -­‐>      apache2::vhost  {  'dev.smoov.io':          priority            =>  20,          document_root  =>  '/var/www/smoovio/web',          index_file        =>  'app_dev.php'      }      -­‐>class  {  'php5':  }
    -­‐>class  {  'composer':  }      #  ...  
  • 66. Créateur de To sum up • with Vagrant you can create Virtual Machines bases on Base Boxes very easy • Packer adds the possibility to create your own Base Box for those VMs • It's up to you if you create a Fat or a Thin Base Box • After creation a Virtual Machine could be provisioned with Puppet (or place your preferred provisioning tool here)
  • 67. Créateur de Need more Information or Help!? http://sensiolabs.de/workshops/vagrant/ packer build <your own base box>.json … now! Frank Stelzer
 @frastel