SlideShare a Scribd company logo
Development environments
made easy
Why?!
Gianluca - @GianArb – GianArb – gianarb.github.io
Vagrant
Command Line Tool
Gianluca - @GianArb – GianArb – gianarb.github.io
Box
vagrant box add <name> <url> <*provider>
Vagrant box list
Vagrant box remove <name> <*provider>
Gianluca - @GianArb – GianArb – gianarb.github.io
$. Vagrant box add precise32 <url>
$. Vagrant init precise32
$. Vagrant up
Goooo!!!
Gianluca - @GianArb – GianArb – gianarb.github.io
Providers
Virtualbox, VmWare“
Gianluca - @GianArb – GianArb – gianarb.github.io
Plugins
$. Vagrant plugin install <name>
$. Vagrant plugin uninstall <name>
$. Vagrant plugin list
Gianluca - @GianArb – GianArb – gianarb.github.io
Provisioning
How can i install my services?
Chef Solo - Chef Client
Shell – ansiable
Puppet apply – puppet Agent
Gianluca - @GianArb – GianArb – gianarb.github.io
That’s all?!
Where are my other commands?!
up – halt –suspend – provisioning
Reload – destroy - ssh -status
Gianluca - @GianArb – GianArb – gianarb.github.io
Sharing & Conf
This stuff is beautiful
Gianluca - @GianArb – GianArb – gianarb.github.io
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.box_url = http://“./precise32.box
end
mode: ruby
Gianluca - @GianArb – GianArb – gianarb.github.io
Network
config.vm.forwardind_port(80, 8080)“
config.vm.network :private_network,
IP: ‚192.168.33.111‛ **
Config.VM.Network :public_network *
Gianluca - @GianArb – GianArb – gianarb.github.io
Network
**
Config.VM.Network :public_network,
:bridge => ‘en1:Wi-Fi (AirPort)’’
Gianluca - @GianArb – GianArb – gianarb.github.io
Provider
config.vm.provider :virtualbox do |vb|
vb.customize [
"modifyvm", :id,
"--cpus", 2,
"--memory", "1224"]
““..
end
Gianluca - @GianArb – GianArb – gianarb.github.io
Share Folders
config.vm.synced_folder "~/Sites", "/var/www‛
:owner=> "www-data", :group=> "www-data"
Nfs => true **
+
+
Gianluca - @GianArb – GianArb – gianarb.github.io
Share Folders
config.vm.synced_folder "~/Sites", "/var/www‛
:owner=> "www-data", :group=> "www-data"
Nfs => true **
+
+
Gianluca - @GianArb – GianArb – gianarb.github.io
My Skeleton
**
Gianluca - @GianArb – GianArb – gianarb.github.io
**
/cookbooks
This is my vendor
$. git submodule add
https://github.com/GianArb/opsworks-cookbooks
cookbooks
But““
Gianluca - @GianArb – GianArb – gianarb.github.io
Who is my Vendor?
http://github.com/opscode-cookbooks
Gianluca - @GianArb – GianArb – gianarb.github.io
Where is my Conf?!
config.vm.provision :chef_solo do |chef|
Chef.cookbooks_path=[‘my_cookbooks’,‘cookbooks’
chef.add_recipe ‚apt‛
chef.add_recipe ‚apache2‛
chef.Add_recipe ‚apache2::mod_rewrite‛
chef.add_recipe ‚php‛
chef.add_recipe ‚MYSQL‛
....
end
Gianluca - @GianArb – GianArb – gianarb.github.io
How can I configure
my conf? 0.o
config.vm.provision :chef_solo do |chef|
“.
chef.add_recipe ‚MYSQL‛
chef.json = {
:mysql=> {
:server_root_password => ’root’,
:server_debian_password => ’root’,
:server_Repl_password => ‘replica’,
:bind_address => ‘127.0.0.1’
}
}
end
Gianluca - @GianArb – GianArb – gianarb.github.io
config.vm.provision :chef_solo do |chef|
“.
chef.add_recipe ‚MYSQL‛
chef.json = {
:mysql=> {
:server_root_password => ’root’,
:server_debian_password => ’root’,
:server_Repl_password => ‘replica’,
:bind_address => ‘127.0.0.1’
}
}
end
Gianluca - @GianArb – GianArb – gianarb.github.io
Shell Provisioning
config.vm.provision :shell,
:inline => ‚echo ‘hello ciao!’‛
OR
config.vm.provision :shell,
:path=> ‚/path/to/script.sh’‛
Gianluca - @GianArb – GianArb – gianarb.github.io
What happen if
You can run this
Configuration of VM
Now?
Gianluca - @GianArb – GianArb – gianarb.github.io
Where is my
virtualhost?
Is the moment,
Now We are Beginning to
Create a custom
cookbook for this
application
Gianluca - @GianArb – GianArb – gianarb.github.io
App cookbooks
Gianluca - @GianArb – GianArb – gianarb.github.io
My_cookbooks/app/attributes/default.rb
My_cookbooks/app/recipes/virtualhost.rb
My_cookbooks/app/template/default/app.conf.erb
My_cookbooks/app/attributes/defau
lt.rb
Gianluca - @GianArb – GianArb – gianarb.github.io
In this file are setting all
nodes of recipe
configuration
default['app']['server_name'] = 'testapp.local'
default['app_test']['docroot'] = ‚/vagrant/src‚
My_cookbooks/app/recipes/virtualho
st.rb
Gianluca - @GianArb – GianArb – gianarb.github.io
#
# Cookbook Name:: app
# Recipe:: default
#
app_name = 'app'
app_config = node[app_name]
include_recipe "apt"
include_recipe "apache2"
include_recipe "apache2::mod_php5"
# Set up the Apache virtual host
web_app app_name do
server_name app_config['server_name']
docroot app_config['docroot']
template "#{app_name}.conf.erb"
log_dir node['apache']['log_dir']
end
…./template/default/app.conf.erb
Gianluca - @GianArb – GianArb – gianarb.github.io
<VirtualHost *:80>
ServerName <%= @params[:server_name] %>
ServerAlias <% @params[:server_aliases] && @params[:server_aliases].each do |a|
%><%= "#{a}" %> <% end %>
DocumentRoot <%= @params[:docroot] %>
<Directory <%= @params[:docroot] %>>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Vagrant-omnibus
$. Vagrant plugin install vagrant-
omnibus
Gianluca - @GianArb – GianArb – gianarb.github.io
Vagrant.configure("2") do |config|
config.omnibus.chef_version = :latest
OR
config.omnibus.chef_version = ‚11.4.0‛
“
end
Bento
Create your custom .box
Gianluca - @GianArb – GianArb – gianarb.github.io
$. git clone git://github.com/opscode/bento.git
$. cd bento
$. bundle install
$. bundle exec veewee vbox list
$. bundle exec veewee vbox build ubuntu-12.04
Try now!
Gianluca - @GianArb – GianArb – gianarb.github.io
$. git clone
http://github.com/GianArb/pugMi2013-vagrant
$. cd pugMi2013-vagrant
$. git submodule init
$. git submodule update
$. cd cookbooks
$. git submodule init
$. git submodule update
Gianluca - @GianArb – GianArb – gianarb.github.io
http://vagrantup.com
http://github.com/opscode-cookbooks
http://www.vagrantbox.es
Irc.freenode.net/#vagrant
Irc.freenode.net/#chef
https://github.com/opscode/bento
https://github.com/schisamo/vagrant-omnibus
https://github.com/PUGTorino/application_zf
Gianluca
Arbezzano
me@gianarb.it

More Related Content

What's hot

REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)
Simon Courtois
 
Code reviews vs Pull requests
Code reviews vs Pull requestsCode reviews vs Pull requests
Code reviews vs Pull requests
Tim Pettersen
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
Brian Hogan
 
Modern Perl Toolchain
Modern Perl ToolchainModern Perl Toolchain
Modern Perl Toolchain
Alex Muntada Duran
 
Tracking large game assets with Git LFS
Tracking large game assets with Git LFSTracking large game assets with Git LFS
Tracking large game assets with Git LFS
Tim Pettersen
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)
Tim Pettersen
 
Master the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and SilexMaster the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and Silex
Ryan Weaver
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
Antons Kranga
 
Etsy chef-workflow
Etsy chef-workflowEtsy chef-workflow
Etsy chef-workflow
Daniel Schauenberg
 
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Lemi Orhan Ergin
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
Antons Kranga
 
Adding Source Control to Your Life
Adding Source Control to Your LifeAdding Source Control to Your Life
Adding Source Control to Your Life
Mark Kelnar
 
Baremetal deployment scale
Baremetal deployment scaleBaremetal deployment scale
Baremetal deployment scale
baremetal
 
Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]
Adam Englander
 
Baremetal deployment
Baremetal deploymentBaremetal deployment
Baremetal deployment
baremetal
 
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhoneNMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
NMX Events
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Lemi Orhan Ergin
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
Chef Software, Inc.
 

What's hot (20)

REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)
 
Code reviews vs Pull requests
Code reviews vs Pull requestsCode reviews vs Pull requests
Code reviews vs Pull requests
 
Creating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
 
Modern Perl Toolchain
Modern Perl ToolchainModern Perl Toolchain
Modern Perl Toolchain
 
Tracking large game assets with Git LFS
Tracking large game assets with Git LFSTracking large game assets with Git LFS
Tracking large game assets with Git LFS
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
 
Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)
 
Master the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and SilexMaster the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and Silex
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Etsy chef-workflow
Etsy chef-workflowEtsy chef-workflow
Etsy chef-workflow
 
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
Git Anti-Patterns - Extended Version With 28 Common Anti-Patterns) - SCTurkey...
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
Adding Source Control to Your Life
Adding Source Control to Your LifeAdding Source Control to Your Life
Adding Source Control to Your Life
 
Baremetal deployment scale
Baremetal deployment scaleBaremetal deployment scale
Baremetal deployment scale
 
Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]
 
Baremetal deployment
Baremetal deploymentBaremetal deployment
Baremetal deployment
 
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhoneNMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
NMX 2014 - Podcasting - How To Audio Podcast 100% from an iPad or iPhone
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
Git Anti-Patterns: How To Mess Up With Git and Love it Again - DevoxxPL 2017
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
 

Viewers also liked

Silex, iniziamo
Silex, iniziamoSilex, iniziamo
Silex, iniziamo
Gianluca Arbezzano
 
Software architectural pattern - MVC
Software architectural pattern - MVCSoftware architectural pattern - MVC
Software architectural pattern - MVC
Abdul Malik Ikhsan
 
Codeigniter : The Introduction
Codeigniter  : The IntroductionCodeigniter  : The Introduction
Codeigniter : The Introduction
Abdul Malik Ikhsan
 
Pengenalan Konsep Open Source
Pengenalan Konsep Open SourcePengenalan Konsep Open Source
Pengenalan Konsep Open Source
The Budiman
 
Pemanfaatan Aplikasi Open Source
Pemanfaatan Aplikasi Open SourcePemanfaatan Aplikasi Open Source
Pemanfaatan Aplikasi Open Source
The Budiman
 
Queue System and Zend\Queue implementation
Queue System and Zend\Queue implementationQueue System and Zend\Queue implementation
Queue System and Zend\Queue implementation
Gianluca Arbezzano
 
DockerDublin Meetup - News about Docker 1.13
DockerDublin Meetup -  News about Docker 1.13DockerDublin Meetup -  News about Docker 1.13
DockerDublin Meetup - News about Docker 1.13
Gianluca Arbezzano
 
Zend Framework 2 : Dependency Injection
Zend Framework 2 : Dependency InjectionZend Framework 2 : Dependency Injection
Zend Framework 2 : Dependency Injection
Abdul Malik Ikhsan
 
Docker 1.12 and SwarmKit
Docker 1.12 and SwarmKitDocker 1.12 and SwarmKit
Docker 1.12 and SwarmKit
Gianluca Arbezzano
 
Time Series Database and Tick Stack
Time Series Database and Tick StackTime Series Database and Tick Stack
Time Series Database and Tick Stack
Gianluca Arbezzano
 
Stime e preventivi in un contesto di sviluppo agile
Stime e preventivi in un contesto di sviluppo agileStime e preventivi in un contesto di sviluppo agile
Stime e preventivi in un contesto di sviluppo agile
Stefano Valle
 
NoSQL Containers get Rich
NoSQL Containers get RichNoSQL Containers get Rich
NoSQL Containers get Rich
Stefano Valle
 
Moduli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarliModuli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarli
Stefano Valle
 
Introduzione a Git
Introduzione a GitIntroduzione a Git
Introduzione a Git
Stefano Valle
 
Asset management with Zend Framework 2
Asset management with Zend Framework 2Asset management with Zend Framework 2
Asset management with Zend Framework 2
Stefano Valle
 
Instant ACLs with Zend Framework 2
Instant ACLs with Zend Framework 2Instant ACLs with Zend Framework 2
Instant ACLs with Zend Framework 2
Stefano Valle
 
Introduzione alle metodologie di sviluppo agile
Introduzione alle metodologie di sviluppo agileIntroduzione alle metodologie di sviluppo agile
Introduzione alle metodologie di sviluppo agile
Stefano Valle
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
SlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
SlideShare
 

Viewers also liked (20)

Silex, iniziamo
Silex, iniziamoSilex, iniziamo
Silex, iniziamo
 
Software architectural pattern - MVC
Software architectural pattern - MVCSoftware architectural pattern - MVC
Software architectural pattern - MVC
 
Codeigniter : The Introduction
Codeigniter  : The IntroductionCodeigniter  : The Introduction
Codeigniter : The Introduction
 
Pengenalan Konsep Open Source
Pengenalan Konsep Open SourcePengenalan Konsep Open Source
Pengenalan Konsep Open Source
 
Pemanfaatan Aplikasi Open Source
Pemanfaatan Aplikasi Open SourcePemanfaatan Aplikasi Open Source
Pemanfaatan Aplikasi Open Source
 
Queue System and Zend\Queue implementation
Queue System and Zend\Queue implementationQueue System and Zend\Queue implementation
Queue System and Zend\Queue implementation
 
DockerDublin Meetup - News about Docker 1.13
DockerDublin Meetup -  News about Docker 1.13DockerDublin Meetup -  News about Docker 1.13
DockerDublin Meetup - News about Docker 1.13
 
Zend Framework 2 : Dependency Injection
Zend Framework 2 : Dependency InjectionZend Framework 2 : Dependency Injection
Zend Framework 2 : Dependency Injection
 
Docker 1.12 and SwarmKit
Docker 1.12 and SwarmKitDocker 1.12 and SwarmKit
Docker 1.12 and SwarmKit
 
Time Series Database and Tick Stack
Time Series Database and Tick StackTime Series Database and Tick Stack
Time Series Database and Tick Stack
 
Stime e preventivi in un contesto di sviluppo agile
Stime e preventivi in un contesto di sviluppo agileStime e preventivi in un contesto di sviluppo agile
Stime e preventivi in un contesto di sviluppo agile
 
NoSQL Containers get Rich
NoSQL Containers get RichNoSQL Containers get Rich
NoSQL Containers get Rich
 
Moduli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarliModuli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarli
 
Introduzione a Git
Introduzione a GitIntroduzione a Git
Introduzione a Git
 
Asset management with Zend Framework 2
Asset management with Zend Framework 2Asset management with Zend Framework 2
Asset management with Zend Framework 2
 
Instant ACLs with Zend Framework 2
Instant ACLs with Zend Framework 2Instant ACLs with Zend Framework 2
Instant ACLs with Zend Framework 2
 
Introduzione alle metodologie di sviluppo agile
Introduzione alle metodologie di sviluppo agileIntroduzione alle metodologie di sviluppo agile
Introduzione alle metodologie di sviluppo agile
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 

Similar to Vagrant - PugMI

Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
Pablo Godel
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
Sri Ram
 
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
SV Ruby on Rails Meetup
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
Marcus Ramberg
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 
Welcome to Jenkins
Welcome to JenkinsWelcome to Jenkins
Welcome to Jenkins
Somkiat Puisungnoen
 
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and BerkshelfChef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Jun Sakata
 
How to install squid proxy on server or how to install squid proxy on centos o
How to install squid proxy on server  or how to install squid proxy on centos oHow to install squid proxy on server  or how to install squid proxy on centos o
How to install squid proxy on server or how to install squid proxy on centos o
Proxiesforrent
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)
Julian Dunn
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
andrefsantos
 
Crafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in RubyCrafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in Ruby
Nikhil Mungel
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
Antons Kranga
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
Itamar Hassin
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
Javier López
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application framework
techmemo
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
tomcopeland
 
Ubic-public
Ubic-publicUbic-public
Ubic
UbicUbic
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Frank Rousseau
 

Similar to Vagrant - PugMI (20)

Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
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
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Welcome to Jenkins
Welcome to JenkinsWelcome to Jenkins
Welcome to Jenkins
 
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and BerkshelfChef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
 
How to install squid proxy on server or how to install squid proxy on centos o
How to install squid proxy on server  or how to install squid proxy on centos oHow to install squid proxy on server  or how to install squid proxy on centos o
How to install squid proxy on server or how to install squid proxy on centos o
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
 
Crafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in RubyCrafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in Ruby
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 
How to develop modern web application framework
How to develop modern web application frameworkHow to develop modern web application framework
How to develop modern web application framework
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Ubic-public
Ubic-publicUbic-public
Ubic-public
 
Ubic
UbicUbic
Ubic
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
 

More from Gianluca Arbezzano

Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
Gianluca Arbezzano
 
OSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoringOSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoring
Gianluca Arbezzano
 
Value of your metrics: goodbye monitoring, welcome observability
Value of your metrics: goodbye monitoring, welcome observabilityValue of your metrics: goodbye monitoring, welcome observability
Value of your metrics: goodbye monitoring, welcome observability
Gianluca Arbezzano
 
InfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestratorInfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestrator
Gianluca Arbezzano
 
Orbiter and how to extend Docker Swarm
Orbiter and how to extend Docker SwarmOrbiter and how to extend Docker Swarm
Orbiter and how to extend Docker Swarm
Gianluca Arbezzano
 
Overview and Opentracing in theory by Gianluca Arbezzano
Overview and Opentracing in theory by Gianluca ArbezzanoOverview and Opentracing in theory by Gianluca Arbezzano
Overview and Opentracing in theory by Gianluca Arbezzano
Gianluca Arbezzano
 
Monitoring Pull vs Push, InfluxDB and Prometheus
Monitoring Pull vs Push, InfluxDB and PrometheusMonitoring Pull vs Push, InfluxDB and Prometheus
Monitoring Pull vs Push, InfluxDB and Prometheus
Gianluca Arbezzano
 
Open Tracing, to order and understand your mess. - ApiConf 2017
Open Tracing, to order and understand your mess. - ApiConf 2017Open Tracing, to order and understand your mess. - ApiConf 2017
Open Tracing, to order and understand your mess. - ApiConf 2017
Gianluca Arbezzano
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in Production
Gianluca Arbezzano
 
Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017
Gianluca Arbezzano
 
Monitor your application and sleep
Monitor your application and sleepMonitor your application and sleep
Monitor your application and sleep
Gianluca Arbezzano
 
Tick Stack - Listen your infrastructure and please sleep
Tick Stack - Listen your infrastructure and please sleepTick Stack - Listen your infrastructure and please sleep
Tick Stack - Listen your infrastructure and please sleep
Gianluca Arbezzano
 
Docker Novosibirsk Meetup #3 - Docker in Production
Docker Novosibirsk Meetup #3 - Docker in ProductionDocker Novosibirsk Meetup #3 - Docker in Production
Docker Novosibirsk Meetup #3 - Docker in Production
Gianluca Arbezzano
 

More from Gianluca Arbezzano (13)

Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
 
OSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoringOSDC 2018 - Distributed monitoring
OSDC 2018 - Distributed monitoring
 
Value of your metrics: goodbye monitoring, welcome observability
Value of your metrics: goodbye monitoring, welcome observabilityValue of your metrics: goodbye monitoring, welcome observability
Value of your metrics: goodbye monitoring, welcome observability
 
InfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestratorInfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestrator
 
Orbiter and how to extend Docker Swarm
Orbiter and how to extend Docker SwarmOrbiter and how to extend Docker Swarm
Orbiter and how to extend Docker Swarm
 
Overview and Opentracing in theory by Gianluca Arbezzano
Overview and Opentracing in theory by Gianluca ArbezzanoOverview and Opentracing in theory by Gianluca Arbezzano
Overview and Opentracing in theory by Gianluca Arbezzano
 
Monitoring Pull vs Push, InfluxDB and Prometheus
Monitoring Pull vs Push, InfluxDB and PrometheusMonitoring Pull vs Push, InfluxDB and Prometheus
Monitoring Pull vs Push, InfluxDB and Prometheus
 
Open Tracing, to order and understand your mess. - ApiConf 2017
Open Tracing, to order and understand your mess. - ApiConf 2017Open Tracing, to order and understand your mess. - ApiConf 2017
Open Tracing, to order and understand your mess. - ApiConf 2017
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in Production
 
Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017
 
Monitor your application and sleep
Monitor your application and sleepMonitor your application and sleep
Monitor your application and sleep
 
Tick Stack - Listen your infrastructure and please sleep
Tick Stack - Listen your infrastructure and please sleepTick Stack - Listen your infrastructure and please sleep
Tick Stack - Listen your infrastructure and please sleep
 
Docker Novosibirsk Meetup #3 - Docker in Production
Docker Novosibirsk Meetup #3 - Docker in ProductionDocker Novosibirsk Meetup #3 - Docker in Production
Docker Novosibirsk Meetup #3 - Docker in Production
 

Recently uploaded

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 

Recently uploaded (20)

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 

Vagrant - PugMI

  • 2. Why?! Gianluca - @GianArb – GianArb – gianarb.github.io
  • 3. Vagrant Command Line Tool Gianluca - @GianArb – GianArb – gianarb.github.io
  • 4. Box vagrant box add <name> <url> <*provider> Vagrant box list Vagrant box remove <name> <*provider> Gianluca - @GianArb – GianArb – gianarb.github.io
  • 5. $. Vagrant box add precise32 <url> $. Vagrant init precise32 $. Vagrant up Goooo!!! Gianluca - @GianArb – GianArb – gianarb.github.io
  • 6. Providers Virtualbox, VmWare“ Gianluca - @GianArb – GianArb – gianarb.github.io
  • 7. Plugins $. Vagrant plugin install <name> $. Vagrant plugin uninstall <name> $. Vagrant plugin list Gianluca - @GianArb – GianArb – gianarb.github.io
  • 8. Provisioning How can i install my services? Chef Solo - Chef Client Shell – ansiable Puppet apply – puppet Agent Gianluca - @GianArb – GianArb – gianarb.github.io
  • 9. That’s all?! Where are my other commands?! up – halt –suspend – provisioning Reload – destroy - ssh -status Gianluca - @GianArb – GianArb – gianarb.github.io
  • 10. Sharing & Conf This stuff is beautiful Gianluca - @GianArb – GianArb – gianarb.github.io
  • 11. # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant::Config.run do |config| config.vm.box = "precise32" config.vm.box_url = http://“./precise32.box end mode: ruby Gianluca - @GianArb – GianArb – gianarb.github.io
  • 12. Network config.vm.forwardind_port(80, 8080)“ config.vm.network :private_network, IP: ‚192.168.33.111‛ ** Config.VM.Network :public_network * Gianluca - @GianArb – GianArb – gianarb.github.io
  • 13. Network ** Config.VM.Network :public_network, :bridge => ‘en1:Wi-Fi (AirPort)’’ Gianluca - @GianArb – GianArb – gianarb.github.io
  • 14. Provider config.vm.provider :virtualbox do |vb| vb.customize [ "modifyvm", :id, "--cpus", 2, "--memory", "1224"] ““.. end Gianluca - @GianArb – GianArb – gianarb.github.io
  • 15. Share Folders config.vm.synced_folder "~/Sites", "/var/www‛ :owner=> "www-data", :group=> "www-data" Nfs => true ** + + Gianluca - @GianArb – GianArb – gianarb.github.io
  • 16. Share Folders config.vm.synced_folder "~/Sites", "/var/www‛ :owner=> "www-data", :group=> "www-data" Nfs => true ** + + Gianluca - @GianArb – GianArb – gianarb.github.io
  • 17. My Skeleton ** Gianluca - @GianArb – GianArb – gianarb.github.io
  • 18. ** /cookbooks This is my vendor $. git submodule add https://github.com/GianArb/opsworks-cookbooks cookbooks But““ Gianluca - @GianArb – GianArb – gianarb.github.io
  • 19. Who is my Vendor? http://github.com/opscode-cookbooks Gianluca - @GianArb – GianArb – gianarb.github.io
  • 20. Where is my Conf?! config.vm.provision :chef_solo do |chef| Chef.cookbooks_path=[‘my_cookbooks’,‘cookbooks’ chef.add_recipe ‚apt‛ chef.add_recipe ‚apache2‛ chef.Add_recipe ‚apache2::mod_rewrite‛ chef.add_recipe ‚php‛ chef.add_recipe ‚MYSQL‛ .... end Gianluca - @GianArb – GianArb – gianarb.github.io
  • 21. How can I configure my conf? 0.o config.vm.provision :chef_solo do |chef| “. chef.add_recipe ‚MYSQL‛ chef.json = { :mysql=> { :server_root_password => ’root’, :server_debian_password => ’root’, :server_Repl_password => ‘replica’, :bind_address => ‘127.0.0.1’ } } end Gianluca - @GianArb – GianArb – gianarb.github.io
  • 22. config.vm.provision :chef_solo do |chef| “. chef.add_recipe ‚MYSQL‛ chef.json = { :mysql=> { :server_root_password => ’root’, :server_debian_password => ’root’, :server_Repl_password => ‘replica’, :bind_address => ‘127.0.0.1’ } } end Gianluca - @GianArb – GianArb – gianarb.github.io
  • 23. Shell Provisioning config.vm.provision :shell, :inline => ‚echo ‘hello ciao!’‛ OR config.vm.provision :shell, :path=> ‚/path/to/script.sh’‛ Gianluca - @GianArb – GianArb – gianarb.github.io
  • 24. What happen if You can run this Configuration of VM Now? Gianluca - @GianArb – GianArb – gianarb.github.io
  • 25. Where is my virtualhost? Is the moment, Now We are Beginning to Create a custom cookbook for this application Gianluca - @GianArb – GianArb – gianarb.github.io
  • 26. App cookbooks Gianluca - @GianArb – GianArb – gianarb.github.io My_cookbooks/app/attributes/default.rb My_cookbooks/app/recipes/virtualhost.rb My_cookbooks/app/template/default/app.conf.erb
  • 27. My_cookbooks/app/attributes/defau lt.rb Gianluca - @GianArb – GianArb – gianarb.github.io In this file are setting all nodes of recipe configuration default['app']['server_name'] = 'testapp.local' default['app_test']['docroot'] = ‚/vagrant/src‚
  • 28. My_cookbooks/app/recipes/virtualho st.rb Gianluca - @GianArb – GianArb – gianarb.github.io # # Cookbook Name:: app # Recipe:: default # app_name = 'app' app_config = node[app_name] include_recipe "apt" include_recipe "apache2" include_recipe "apache2::mod_php5" # Set up the Apache virtual host web_app app_name do server_name app_config['server_name'] docroot app_config['docroot'] template "#{app_name}.conf.erb" log_dir node['apache']['log_dir'] end
  • 29. …./template/default/app.conf.erb Gianluca - @GianArb – GianArb – gianarb.github.io <VirtualHost *:80> ServerName <%= @params[:server_name] %> ServerAlias <% @params[:server_aliases] && @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %> DocumentRoot <%= @params[:docroot] %> <Directory <%= @params[:docroot] %>> Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
  • 30. Vagrant-omnibus $. Vagrant plugin install vagrant- omnibus Gianluca - @GianArb – GianArb – gianarb.github.io Vagrant.configure("2") do |config| config.omnibus.chef_version = :latest OR config.omnibus.chef_version = ‚11.4.0‛ “ end
  • 31. Bento Create your custom .box Gianluca - @GianArb – GianArb – gianarb.github.io $. git clone git://github.com/opscode/bento.git $. cd bento $. bundle install $. bundle exec veewee vbox list $. bundle exec veewee vbox build ubuntu-12.04
  • 32. Try now! Gianluca - @GianArb – GianArb – gianarb.github.io $. git clone http://github.com/GianArb/pugMi2013-vagrant $. cd pugMi2013-vagrant $. git submodule init $. git submodule update $. cd cookbooks $. git submodule init $. git submodule update
  • 33. Gianluca - @GianArb – GianArb – gianarb.github.io http://vagrantup.com http://github.com/opscode-cookbooks http://www.vagrantbox.es Irc.freenode.net/#vagrant Irc.freenode.net/#chef https://github.com/opscode/bento https://github.com/schisamo/vagrant-omnibus https://github.com/PUGTorino/application_zf Gianluca Arbezzano me@gianarb.it