SlideShare a Scribd company logo
Local development with Vagrant 
Andriy Podanenko 
Software Architect, DevOp 
Propeople 
@podarok
Plan 
● What is Vagrant? 
● Provisioning, puppet, ansible 
● Generating configs with puphpet.com 
● How puphpet.com works internally
What is Vagrant 
● Layer on top ov virtual machine providers 
− Virtualbox 
− Vmware 
● Command line tool 
● Text file to control the settings 
● Plenty of boxes available on internet
Vagrant commands 
● vagrant up 
● vagrant ssh 
● vagrant provision 
● vagrant halt 
● vagrant destroy 
● vagrant reload --provision
Vagrant up workflow 
-> vagrant up 
● Obtaining vagrant box (vm image) - once 
● Starting virtualbox (vm provider) 
● Starting provisioners stack - first time and with 
--provision or when -> vagrant provision 
-> vm box up and running 
-> vagrant ssh
Vagrant configuration 
● Ruby syntax 
● Box, ram, cpu 
Vagrant.configure("2") do |config| 
config.vm.box = 'ubuntu-1404' 
config.vm.box_url = 'http://.../ubuntu-1404-x64.box' 
config.vm.provider :virtualbox do |vb| 
vb.customize ["modifyvm", :id, "--memory", "2048"] 
vb.customize ["modifyvm", :id, "--cpus", "2"] 
end 
end
Vagrant boxes 
● https://vagrantcloud.com 
● http://www.vagrantbox.es
Vagrant configuration 
● Network 
Vagrant.configure("2") do |config| 
config.vm.network "private_network", ip: "192.168.50.4" 
end 
● Sync folders 
Vagrant.configure("2") do |config| 
config.vm.synced_folder "project/", "/var/www/project" 
end 
● Nfs is faster than native. Try latest vagrant with rsync
Vagrant provisioning 
● Shell 
● Puppet (model driven) 
● Chef (procedural) 
● Ansible 
● Salt 
● Docker 
● ...
Combining provisioners 
# Shell provision 
config.vm.provision "shell" do |s| 
s.path = "puphpet/shell/initial-setup.sh" 
s.args = "/vagrant/puphpet" 
end 
# Ansible provision 
config.vm.provision "ansible" do |ansible| 
ansible.playbook = "playbook.yml" 
end 
# Puppet provision 
config.vm.provision :puppet do |puppet| 
ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" 
puppet.facter = { 
"ssh_username" => "#{ssh_username}", 
"provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'], 
} 
puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}" 
puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}" 
end
puppet -> manifest.pp
- hosts: demovmbox ansible -> playbook.yml 
connection: local 
gather_facts: no 
vars: 
drupal_user: drupalcamplviv 
drupal_pass: ilovelviv 
installation_profile_name: presentation 
mysql_user: drupal 
mysql_pass: drupal 
mysql_db: drupal 
tasks: 
- name: Droping drupal database 
mysql_db: name={{ mysql_db }} state=absent 
- name: Creating drupal database 
mysql_db: name={{ mysql_db }} state=present 
- name: Installing drupal 
sudo: yes 
shell: "drush -y si {{ installation_profile_name }} --db-url=mysql://{{ 
mysql_user }}:{{ mysql_pass }}@127.0.0.1:/{{ mysql_db }} --account-name={{ 
drupal_user }} --account-pass={{ drupal_pass }}"
PuPHPet.com 
Demo
vagrant up demo 
Demo
PuPHPet.com
PuPHPet.com 
● All configs in puphpet/config.yaml 
● Uses puppet librarian (Puppetfile)
Extending configs 
● Use another puppet module 
− Add it to the Puppetfile 
− Modify manifest.pp 
● Add another provisioner 
− Add it to Vagrantfile 
− insert provisioner’s needed files to vagrant tree
Contributing to puphpet.com 
● Symfony app 
● Each config element is a separate bundle that 
provides UI and manifest.pp part 
● Remember about all OS (debian + centos)
PS. Drupal related tree/workflow
Usefull links 
● http://puphpet.drupal.ua/ 
● http://puphpet.com 
●● 
http://www.puppetcookbook.com/ 
● https://docs.vagrantup.com/v2/provisioning 
● http://docs.ansible.com/playbooks.html 
●● 
https://github.com/podarok/ansible-vagrant-examples 
●● 
https://www.drupal.org/project/vdd
Local development with Vagrant 
Questions? 
Andriy Podanenko 
Software Architect 
Propeople 
@podarok
Ad

More Related Content

What's hot (19)

Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
Bangladesh Network Operators Group
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
George Shuklin
 
Automation and Ansible
Automation and AnsibleAutomation and Ansible
Automation and Ansible
jtyr
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
Greg DeKoenigsberg
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
bcoca
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
bcoca
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
Michele Orselli
 
Ubic
UbicUbic
Ubic
Vyacheslav Matyukhin
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
Arthur Freyman
 
V2 and beyond
V2 and beyondV2 and beyond
V2 and beyond
jimi-c
 
Ansible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaAnsible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy Mykhailiuta
Tetiana Saputo
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricks
bcoca
 
EC2
EC2EC2
EC2
Igor Kapkov
 
Ansible for beginners ...?
Ansible for beginners ...?Ansible for beginners ...?
Ansible for beginners ...?
shirou wakayama
 
Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014
blndrt
 
Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015
Ryan Brown
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Yros
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
Simon McCartney
 
Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
Jude A. Goonawardena
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
George Shuklin
 
Automation and Ansible
Automation and AnsibleAutomation and Ansible
Automation and Ansible
jtyr
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
Greg DeKoenigsberg
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
bcoca
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
bcoca
 
V2 and beyond
V2 and beyondV2 and beyond
V2 and beyond
jimi-c
 
Ansible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaAnsible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy Mykhailiuta
Tetiana Saputo
 
More tips n tricks
More tips n tricksMore tips n tricks
More tips n tricks
bcoca
 
Ansible for beginners ...?
Ansible for beginners ...?Ansible for beginners ...?
Ansible for beginners ...?
shirou wakayama
 
Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014Rapid dev env DevOps Warsaw July 2014
Rapid dev env DevOps Warsaw July 2014
blndrt
 
Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015
Ryan Brown
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Yros
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
Simon McCartney
 
Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
Jude A. Goonawardena
 

Viewers also liked (20)

Do + ldo for developers(full)
Do + ldo for developers(full)Do + ldo for developers(full)
Do + ldo for developers(full)
Andrii Podanenko
 
Drupal contrib module maintaining
Drupal contrib module maintainingDrupal contrib module maintaining
Drupal contrib module maintaining
Andrii Podanenko
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
Andrii Podanenko
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
Andrii Podanenko
 
DrupalCamp Kyiv 2009 Official Report
DrupalCamp Kyiv 2009 Official ReportDrupalCamp Kyiv 2009 Official Report
DrupalCamp Kyiv 2009 Official Report
Drupal Camp Kyiv
 
Drupal Optimization
Drupal OptimizationDrupal Optimization
Drupal Optimization
Andrii Podanenko
 
Feeds drupal cafe
Feeds drupal cafeFeeds drupal cafe
Feeds drupal cafe
Andrii Podanenko
 
Drupal 8 configuration development flow
Drupal 8 configuration development flowDrupal 8 configuration development flow
Drupal 8 configuration development flow
Andrii Podanenko
 
Ubercart7 views catalog ru
Ubercart7 views catalog ruUbercart7 views catalog ru
Ubercart7 views catalog ru
Andrii Podanenko
 
Drupal codesprint kyiv drupal cafe 07.02.2013
Drupal codesprint   kyiv drupal cafe 07.02.2013Drupal codesprint   kyiv drupal cafe 07.02.2013
Drupal codesprint kyiv drupal cafe 07.02.2013
Andrii Podanenko
 
Docker SQL Continuous Integration Flow
Docker SQL Continuous Integration FlowDocker SQL Continuous Integration Flow
Docker SQL Continuous Integration Flow
Andrii Podanenko
 
CIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterCIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops better
Andrii Podanenko
 
Drupal 8 what to wait from
Drupal 8   what to wait fromDrupal 8   what to wait from
Drupal 8 what to wait from
Andrii Podanenko
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Lviv 2013 d7 vs d8
Lviv 2013   d7 vs d8Lviv 2013   d7 vs d8
Lviv 2013 d7 vs d8
Andy Postnikov
 
Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.
Alex S
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
Alex S
 
Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systems
Alex S
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Do + ldo for developers(full)
Do + ldo for developers(full)Do + ldo for developers(full)
Do + ldo for developers(full)
Andrii Podanenko
 
Drupal contrib module maintaining
Drupal contrib module maintainingDrupal contrib module maintaining
Drupal contrib module maintaining
Andrii Podanenko
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
Andrii Podanenko
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
Andrii Podanenko
 
DrupalCamp Kyiv 2009 Official Report
DrupalCamp Kyiv 2009 Official ReportDrupalCamp Kyiv 2009 Official Report
DrupalCamp Kyiv 2009 Official Report
Drupal Camp Kyiv
 
Drupal 8 configuration development flow
Drupal 8 configuration development flowDrupal 8 configuration development flow
Drupal 8 configuration development flow
Andrii Podanenko
 
Ubercart7 views catalog ru
Ubercart7 views catalog ruUbercart7 views catalog ru
Ubercart7 views catalog ru
Andrii Podanenko
 
Drupal codesprint kyiv drupal cafe 07.02.2013
Drupal codesprint   kyiv drupal cafe 07.02.2013Drupal codesprint   kyiv drupal cafe 07.02.2013
Drupal codesprint kyiv drupal cafe 07.02.2013
Andrii Podanenko
 
Docker SQL Continuous Integration Flow
Docker SQL Continuous Integration FlowDocker SQL Continuous Integration Flow
Docker SQL Continuous Integration Flow
Andrii Podanenko
 
CIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterCIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops better
Andrii Podanenko
 
Drupal 8 what to wait from
Drupal 8   what to wait fromDrupal 8   what to wait from
Drupal 8 what to wait from
Andrii Podanenko
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.
Alex S
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
Alex S
 
Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systems
Alex S
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Ad

Similar to Start using vagrant now! (20)

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
Brian Hogan
 
Puppet and the HashiCorp Suite
Puppet and the HashiCorp SuitePuppet and the HashiCorp Suite
Puppet and the HashiCorp Suite
Bram Vogelaar
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101
jelrikvh
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
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
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
Joe Ferguson
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
Jan Collijs
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
Leandro Nunes
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
Bram Vogelaar
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
Codemotion
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
Michele Orselli
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
Mantas Klasavicius
 
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
Carlos Sanchez
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
frastel
 
vagrant-php
vagrant-phpvagrant-php
vagrant-php
dominikzogg
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
Kris Buytaert
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
Puppet
 
Tech Talk - Vagrant
Tech Talk - VagrantTech Talk - Vagrant
Tech Talk - Vagrant
Thomas Krille
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
Alessandro Franceschi
 
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
Brian Hogan
 
Puppet and the HashiCorp Suite
Puppet and the HashiCorp SuitePuppet and the HashiCorp Suite
Puppet and the HashiCorp Suite
Bram Vogelaar
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101
jelrikvh
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
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
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
Joe Ferguson
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
Jan Collijs
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
Leandro Nunes
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
Bram Vogelaar
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
Codemotion
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
Michele Orselli
 
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
Carlos Sanchez
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
frastel
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
Kris Buytaert
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
Puppet
 
Ad

More from Andrii Podanenko (17)

Глобальні навчальні дні друпал
Глобальні навчальні дні друпалГлобальні навчальні дні друпал
Глобальні навчальні дні друпал
Andrii Podanenko
 
природна і економна дорожня карта для переходу команди розробки на тест центр...
природна і економна дорожня карта для переходу команди розробки на тест центр...природна і економна дорожня карта для переходу команди розробки на тест центр...
природна і економна дорожня карта для переходу команди розробки на тест центр...
Andrii Podanenko
 
Головні Принципи Автоматизації
Головні Принципи АвтоматизаціїГоловні Принципи Автоматизації
Головні Принципи Автоматизації
Andrii Podanenko
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
Drupal Continuous Integration Workflow
Drupal Continuous Integration WorkflowDrupal Continuous Integration Workflow
Drupal Continuous Integration Workflow
Andrii Podanenko
 
Сейчас самое время...ЖИТЬ!
Сейчас самое время...ЖИТЬ!Сейчас самое время...ЖИТЬ!
Сейчас самое время...ЖИТЬ!
Andrii Podanenko
 
Диалоговый интенсив 2012 карпаты
Диалоговый интенсив 2012 карпатыДиалоговый интенсив 2012 карпаты
Диалоговый интенсив 2012 карпаты
Andrii Podanenko
 
психолог в социальных медиа
психолог в социальных медиапсихолог в социальных медиа
психолог в социальных медиа
Andrii Podanenko
 
Ubercart7 Dynamic properties ru
Ubercart7 Dynamic properties ruUbercart7 Dynamic properties ru
Ubercart7 Dynamic properties ru
Andrii Podanenko
 
Drupal 7 database api
Drupal 7 database api Drupal 7 database api
Drupal 7 database api
Andrii Podanenko
 
Yaremchuk - Drupal CodeLobster
Yaremchuk - Drupal CodeLobsterYaremchuk - Drupal CodeLobster
Yaremchuk - Drupal CodeLobster
Andrii Podanenko
 
Yaremchuk - Корпоративные сайты
Yaremchuk - Корпоративные сайтыYaremchuk - Корпоративные сайты
Yaremchuk - Корпоративные сайты
Andrii Podanenko
 
управление проектами отношение к клиенту
управление проектами   отношение к клиентууправление проектами   отношение к клиенту
управление проектами отношение к клиенту
Andrii Podanenko
 
Друпал - стандартні модулі
Друпал - стандартні модуліДрупал - стандартні модулі
Друпал - стандартні модулі
Andrii Podanenko
 
Drupal Migrate
Drupal MigrateDrupal Migrate
Drupal Migrate
Andrii Podanenko
 
Глобальні навчальні дні друпал
Глобальні навчальні дні друпалГлобальні навчальні дні друпал
Глобальні навчальні дні друпал
Andrii Podanenko
 
природна і економна дорожня карта для переходу команди розробки на тест центр...
природна і економна дорожня карта для переходу команди розробки на тест центр...природна і економна дорожня карта для переходу команди розробки на тест центр...
природна і економна дорожня карта для переходу команди розробки на тест центр...
Andrii Podanenko
 
Головні Принципи Автоматизації
Головні Принципи АвтоматизаціїГоловні Принципи Автоматизації
Головні Принципи Автоматизації
Andrii Podanenko
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
Drupal Continuous Integration Workflow
Drupal Continuous Integration WorkflowDrupal Continuous Integration Workflow
Drupal Continuous Integration Workflow
Andrii Podanenko
 
Сейчас самое время...ЖИТЬ!
Сейчас самое время...ЖИТЬ!Сейчас самое время...ЖИТЬ!
Сейчас самое время...ЖИТЬ!
Andrii Podanenko
 
Диалоговый интенсив 2012 карпаты
Диалоговый интенсив 2012 карпатыДиалоговый интенсив 2012 карпаты
Диалоговый интенсив 2012 карпаты
Andrii Podanenko
 
психолог в социальных медиа
психолог в социальных медиапсихолог в социальных медиа
психолог в социальных медиа
Andrii Podanenko
 
Ubercart7 Dynamic properties ru
Ubercart7 Dynamic properties ruUbercart7 Dynamic properties ru
Ubercart7 Dynamic properties ru
Andrii Podanenko
 
Yaremchuk - Drupal CodeLobster
Yaremchuk - Drupal CodeLobsterYaremchuk - Drupal CodeLobster
Yaremchuk - Drupal CodeLobster
Andrii Podanenko
 
Yaremchuk - Корпоративные сайты
Yaremchuk - Корпоративные сайтыYaremchuk - Корпоративные сайты
Yaremchuk - Корпоративные сайты
Andrii Podanenko
 
управление проектами отношение к клиенту
управление проектами   отношение к клиентууправление проектами   отношение к клиенту
управление проектами отношение к клиенту
Andrii Podanenko
 
Друпал - стандартні модулі
Друпал - стандартні модуліДрупал - стандартні модулі
Друпал - стандартні модулі
Andrii Podanenko
 

Recently uploaded (19)

Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 

Start using vagrant now!

  • 1. Local development with Vagrant Andriy Podanenko Software Architect, DevOp Propeople @podarok
  • 2. Plan ● What is Vagrant? ● Provisioning, puppet, ansible ● Generating configs with puphpet.com ● How puphpet.com works internally
  • 3. What is Vagrant ● Layer on top ov virtual machine providers − Virtualbox − Vmware ● Command line tool ● Text file to control the settings ● Plenty of boxes available on internet
  • 4. Vagrant commands ● vagrant up ● vagrant ssh ● vagrant provision ● vagrant halt ● vagrant destroy ● vagrant reload --provision
  • 5. Vagrant up workflow -> vagrant up ● Obtaining vagrant box (vm image) - once ● Starting virtualbox (vm provider) ● Starting provisioners stack - first time and with --provision or when -> vagrant provision -> vm box up and running -> vagrant ssh
  • 6. Vagrant configuration ● Ruby syntax ● Box, ram, cpu Vagrant.configure("2") do |config| config.vm.box = 'ubuntu-1404' config.vm.box_url = 'http://.../ubuntu-1404-x64.box' config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--memory", "2048"] vb.customize ["modifyvm", :id, "--cpus", "2"] end end
  • 7. Vagrant boxes ● https://vagrantcloud.com ● http://www.vagrantbox.es
  • 8. Vagrant configuration ● Network Vagrant.configure("2") do |config| config.vm.network "private_network", ip: "192.168.50.4" end ● Sync folders Vagrant.configure("2") do |config| config.vm.synced_folder "project/", "/var/www/project" end ● Nfs is faster than native. Try latest vagrant with rsync
  • 9. Vagrant provisioning ● Shell ● Puppet (model driven) ● Chef (procedural) ● Ansible ● Salt ● Docker ● ...
  • 10. Combining provisioners # Shell provision config.vm.provision "shell" do |s| s.path = "puphpet/shell/initial-setup.sh" s.args = "/vagrant/puphpet" end # Ansible provision config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" end # Puppet provision config.vm.provision :puppet do |puppet| ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" puppet.facter = { "ssh_username" => "#{ssh_username}", "provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'], } puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}" puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}" end
  • 12. - hosts: demovmbox ansible -> playbook.yml connection: local gather_facts: no vars: drupal_user: drupalcamplviv drupal_pass: ilovelviv installation_profile_name: presentation mysql_user: drupal mysql_pass: drupal mysql_db: drupal tasks: - name: Droping drupal database mysql_db: name={{ mysql_db }} state=absent - name: Creating drupal database mysql_db: name={{ mysql_db }} state=present - name: Installing drupal sudo: yes shell: "drush -y si {{ installation_profile_name }} --db-url=mysql://{{ mysql_user }}:{{ mysql_pass }}@127.0.0.1:/{{ mysql_db }} --account-name={{ drupal_user }} --account-pass={{ drupal_pass }}"
  • 16. PuPHPet.com ● All configs in puphpet/config.yaml ● Uses puppet librarian (Puppetfile)
  • 17. Extending configs ● Use another puppet module − Add it to the Puppetfile − Modify manifest.pp ● Add another provisioner − Add it to Vagrantfile − insert provisioner’s needed files to vagrant tree
  • 18. Contributing to puphpet.com ● Symfony app ● Each config element is a separate bundle that provides UI and manifest.pp part ● Remember about all OS (debian + centos)
  • 19. PS. Drupal related tree/workflow
  • 20. Usefull links ● http://puphpet.drupal.ua/ ● http://puphpet.com ●● http://www.puppetcookbook.com/ ● https://docs.vagrantup.com/v2/provisioning ● http://docs.ansible.com/playbooks.html ●● https://github.com/podarok/ansible-vagrant-examples ●● https://www.drupal.org/project/vdd
  • 21. Local development with Vagrant Questions? Andriy Podanenko Software Architect Propeople @podarok