• Save
Clean development environment for Drupal
Upcoming SlideShare
Loading in...5
×
 

Clean development environment for Drupal

on

  • 3,886 views

Any Drupal user should be free to use any Operating System he likes, without any impact on his productivity. Whatever you choose to work with Linux, OSX or Windows : virtual machines are here to help ...

Any Drupal user should be free to use any Operating System he likes, without any impact on his productivity. Whatever you choose to work with Linux, OSX or Windows : virtual machines are here to help you. Vagrant will make your virtual machines management easier and Puppet your configuration extremely flexible. You will still be free to code with your favourite OS and tools. They both will help you to setup a professional development environment and more, in an instant.

"Clean development environment for Drupal" is using code examples with Vagrant, a virtual machines management tool, and Puppet, Configuration management tool. In this presentation we use Puppet to configure Apache, PHP, MySQL and Drush on top of Ubuntu lucid.

Full version of the code is available on Github: https://github.com/Luukyb/drupal-puppet
You can also try the drupal project for vagrant:
http://drupal.org/project/vagrant

Project Oscar (by @manarth):
https://github.com/manarth/oscar

Puppet Labs modules:
https://github.com/puppetlabs/puppetlabs-mysql
https://github.com/puppetlabs/puppetlabs-apache

This presentation was showed at the Drupal meet up in Cebu, Philippines.

Statistics

Views

Total Views
3,886
Views on SlideShare
3,105
Embed Views
781

Actions

Likes
4
Downloads
0
Comments
1

8 Embeds 781

http://www.scoop.it 760
https://twitter.com 7
http://www.linkedin.com 6
https://www.linkedin.com 3
http://webcache.googleusercontent.com 2
http://alexamovil.tumblr.com 1
http://translate.googleusercontent.com 1
http://188.125.66.159 1
More...

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Clean development environment for Drupal Clean development environment for Drupal Presentation Transcript

  • 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 View slide
  • 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 View slide
  • 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)