SlideShare a Scribd company logo
1 of 15
Clean development
environment for Drupal
with Vagrant & Puppet
Drupal Meetup Cebu, Philippines. 26/06/13.
Luc Bezier | luc@webizat.com
Who?
- Luc Bézier
- Freelance web developer from France,
then England ... and since few weeks Cebu.
- I’m available for work!
Contact me: luc@webizat.com
- Find me on Twitter @Luukyb
(warning, I’m tweeting about cheese)
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
What?
Virtual machine
Vagrant
Puppet
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
}Clean development
environment
Why?
- (M/W/L)amp stack to install on top of your
computer’s OS
- Creates a high dependency between your
system and you development environment
-You development environment will never be
like production.
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Puppet
- Configuration management tool
- Apply a manifest (.pp)
- Contrib modules or do a custom module ...
sounds familiar
- Puppet command available in yourVM
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Vagrant
- On top ofVirtual Box
- Configuration using a Vagrantfile
- Uses a shared folder between your
computer and yourVM
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Vagrant
- vagrant up
- vagrant halt
- vagrant ssh
… and sometimes vagrant destroy
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
The 3 main commands you will use:
How to?
- InstallVirtualBox &Vagrant
- Add a box :
vagrant box add base [box url]
- Setup your /etc/hosts (or equivalent)
- Place your drupal files into the vagrant
folder
- And ... vagrant up !
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Vagrantfile
- Tell vagrant about your box
config.vm.box
-Your network configuration & share folder
config.vm.network
config.vm.share_folder
- I want to use puppet!
config.vm.provision :puppet
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Puppet apache
- Using the contrib module from puppetlabs
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
class { 'apache':
default_mods => true,
mpm_module => 'prefork',
}
include apache::mod::php
apache::vhost { 'vagrant.local':
port => '80',
docroot => '/var/www/drupal-project',
}
- Module: github.com/puppetlabs/puppetlabs-apache
Puppet symlink
- Symlink in your “www” directory to target
your shared folder, where your drupal is.
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
file { '/var/www/drupal-project':
ensure => 'link',
target => '/vagrant/drupal-project',
}
Puppet mysql
- Using the contrib module from puppetlabs
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
class { 'mysql::server':
config_hash => { 'root_password' => 'root' }
}
mysql::db { 'drupal’:
user => 'drupal',
password => 'drupal',
host => 'localhost', grant => ['all'],
}
- Change the passwords ;)
- Module: github.com/puppetlabs/puppetlabs-mysql
Puppet php
- Using a very simple custom module
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
package { "php5”:
ensure => present,
}
package { "drush”:
ensure => present,
}
}
Repeat this code for
every php extension you need,
php5-mysql, php5-gd ...
- Drush is included in the php packages for lucid.
Full version of the code:
github.com/Luukyb/drupal-puppet
Do try this at home
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Give a try to my simple puppet-drupal project:
github.com/Luukyb/drupal-puppet
Try the drupal project for vagrant:
drupal.org/project/vagrant
Project Oscar (by
@manarth):github.com/manarth/oscar
Thanks!
Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
Any questions ?
Special thanks to Promet Source (@prometsource) & Jonathan Himbing
(@nathanjo) for organizing the Drupal meetup Cebu, Philippines.
Drupal Pilipinas (@DrupalPilipinas)

More Related Content

Viewers also liked (15)

Capitulo 07
Capitulo 07Capitulo 07
Capitulo 07
 
Capitulo 17
Capitulo 17Capitulo 17
Capitulo 17
 
La dictadura de stalin
La dictadura de stalinLa dictadura de stalin
La dictadura de stalin
 
INVESTIGACIÓN POLITICA
INVESTIGACIÓN POLITICAINVESTIGACIÓN POLITICA
INVESTIGACIÓN POLITICA
 
Kabakulak
KabakulakKabakulak
Kabakulak
 
Interdisciplinary collaboration in the Veterans health care sector - Final
Interdisciplinary collaboration in the Veterans health care sector - FinalInterdisciplinary collaboration in the Veterans health care sector - Final
Interdisciplinary collaboration in the Veterans health care sector - Final
 
Peradaban suku maya
Peradaban suku  mayaPeradaban suku  maya
Peradaban suku maya
 
General embryology
General embryologyGeneral embryology
General embryology
 
In line or out of control?
In line or out of control?In line or out of control?
In line or out of control?
 
Solidos platonicos (1)
Solidos platonicos (1)Solidos platonicos (1)
Solidos platonicos (1)
 
Revolucion rusa
Revolucion rusa Revolucion rusa
Revolucion rusa
 
Sólidos platónicos
Sólidos platónicosSólidos platónicos
Sólidos platónicos
 
First Aid
First AidFirst Aid
First Aid
 
Impresionismo y post impresionismo
Impresionismo y post impresionismo Impresionismo y post impresionismo
Impresionismo y post impresionismo
 
Aulas de filosofia platão
Aulas de filosofia platãoAulas de filosofia platão
Aulas de filosofia platão
 

More from Luc Bézier

More from Luc Bézier (10)

Quick guide to Freedom and travels for developers
Quick guide to Freedom and travels for developersQuick guide to Freedom and travels for developers
Quick guide to Freedom and travels for developers
 
Guide to freedom and travels for developers
Guide to freedom and travels for developersGuide to freedom and travels for developers
Guide to freedom and travels for developers
 
The Future of Offices
The Future of OfficesThe Future of Offices
The Future of Offices
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your team
 
Introduction to Composer for Drupal
Introduction to Composer for DrupalIntroduction to Composer for Drupal
Introduction to Composer for Drupal
 
Drupal for beginners - Global Training Days - Cebu 2016
Drupal for beginners - Global Training Days - Cebu 2016Drupal for beginners - Global Training Days - Cebu 2016
Drupal for beginners - Global Training Days - Cebu 2016
 
Made with drupal 8
Made with drupal 8Made with drupal 8
Made with drupal 8
 
Open Source Software, community matters
Open Source Software, community mattersOpen Source Software, community matters
Open Source Software, community matters
 
Data migration to Drupal using the migrate module
Data migration to Drupal using the migrate moduleData migration to Drupal using the migrate module
Data migration to Drupal using the migrate module
 
Drupal ladder Cebu : Learn to contribute | November 2013
Drupal ladder Cebu : Learn to contribute | November 2013Drupal ladder Cebu : Learn to contribute | November 2013
Drupal ladder Cebu : Learn to contribute | November 2013
 

Recently uploaded

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

Recently uploaded (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Clean development environment for Drupal

  • 1. Clean development environment for Drupal with Vagrant & Puppet Drupal Meetup Cebu, Philippines. 26/06/13. Luc Bezier | luc@webizat.com
  • 2. Who? - Luc Bézier - Freelance web developer from France, then England ... and since few weeks Cebu. - I’m available for work! Contact me: luc@webizat.com - Find me on Twitter @Luukyb (warning, I’m tweeting about cheese) Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 3. What? Virtual machine Vagrant Puppet Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb }Clean development environment
  • 4. Why? - (M/W/L)amp stack to install on top of your computer’s OS - Creates a high dependency between your system and you development environment -You development environment will never be like production. Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 5. Puppet - Configuration management tool - Apply a manifest (.pp) - Contrib modules or do a custom module ... sounds familiar - Puppet command available in yourVM Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 6. Vagrant - On top ofVirtual Box - Configuration using a Vagrantfile - Uses a shared folder between your computer and yourVM Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 7. Vagrant - vagrant up - vagrant halt - vagrant ssh … and sometimes vagrant destroy Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb The 3 main commands you will use:
  • 8. How to? - InstallVirtualBox &Vagrant - Add a box : vagrant box add base [box url] - Setup your /etc/hosts (or equivalent) - Place your drupal files into the vagrant folder - And ... vagrant up ! Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 9. Vagrantfile - Tell vagrant about your box config.vm.box -Your network configuration & share folder config.vm.network config.vm.share_folder - I want to use puppet! config.vm.provision :puppet Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb
  • 10. Puppet apache - Using the contrib module from puppetlabs Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb class { 'apache': default_mods => true, mpm_module => 'prefork', } include apache::mod::php apache::vhost { 'vagrant.local': port => '80', docroot => '/var/www/drupal-project', } - Module: github.com/puppetlabs/puppetlabs-apache
  • 11. Puppet symlink - Symlink in your “www” directory to target your shared folder, where your drupal is. Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb file { '/var/www/drupal-project': ensure => 'link', target => '/vagrant/drupal-project', }
  • 12. Puppet mysql - Using the contrib module from puppetlabs Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb class { 'mysql::server': config_hash => { 'root_password' => 'root' } } mysql::db { 'drupal’: user => 'drupal', password => 'drupal', host => 'localhost', grant => ['all'], } - Change the passwords ;) - Module: github.com/puppetlabs/puppetlabs-mysql
  • 13. Puppet php - Using a very simple custom module Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb package { "php5”: ensure => present, } package { "drush”: ensure => present, } } Repeat this code for every php extension you need, php5-mysql, php5-gd ... - Drush is included in the php packages for lucid. Full version of the code: github.com/Luukyb/drupal-puppet
  • 14. Do try this at home Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb Give a try to my simple puppet-drupal project: github.com/Luukyb/drupal-puppet Try the drupal project for vagrant: drupal.org/project/vagrant Project Oscar (by @manarth):github.com/manarth/oscar
  • 15. Thanks! Drupal, Vagrant & Puppet luc@webizat.com | @Luukyb Any questions ? Special thanks to Promet Source (@prometsource) & Jonathan Himbing (@nathanjo) for organizing the Drupal meetup Cebu, Philippines. Drupal Pilipinas (@DrupalPilipinas)