About the Speaker•   Originally from Cape Town South Africa been living and working in    London for 6 years.•   Developin...
Using Vagrant, Virtual Box    and Chef in yourDevelopment Environment
The future of Development@mitchellh creator and maintainer of vagrant
WHY?“Vagrant lowers development environmentsetup time, maximize dev/prod parity, andmakes the „works on my machine‟ excuse...
Components of a virtualised development environment•   Virtualbox - virtualisation layer.•   Vagrant•   Provisioning tool ...
Virtual Box•   Virutalisation product freely available as Open Source Software under    (GPL) version 2.•   Supports all m...
Vagrant•   “A tool to transparently manage all the complex parts of modern    development within a virtual environment wit...
Chef•   Chef is a open source provisioning tool which was built for automating    the cloud. https://github.com/opscode/ch...
Windows Developer     VCS                         Mac Osx Developer  VagrantFile                           Linux Developer...
How vagrant works•   Vagrant instance is managed with Vagrantfile    which is ruby syntax.•   28 configuration options. Yo...
Basic VagrantFile•   Vagrant box file can be obtained from 3 places
Three methods to create a box file         Method                               Pros                          Cons    Down...
Vagrant file options
Chef configuration
•   Download Virtualbox 4.1.22    http://download.virtualbox.org/virtualbox/4.1.22/•   Download vagrant package or install...
• http://downloads.vagrantup.com/tags/v1  .0.5• http://download.virtualbox.org/virtualbox  /• http://www.opscode.com/chef/...
PHP London Meetup December 2012
Upcoming SlideShare
Loading in …5
×

PHP London Meetup December 2012

1,300 views
1,222 views

Published on

Using Virtual Box,Vagrant,Chef in your development environment

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,300
On SlideShare
0
From Embeds
0
Number of Embeds
288
Actions
Shares
0
Downloads
3
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

PHP London Meetup December 2012

  1. 1. About the Speaker• Originally from Cape Town South Africa been living and working in London for 6 years.• Developing with PHP on the lamp stack since 2002.• Currently work at a well known charity on their scalable fundraising platform.• Follow me on twitter @jeremyquinton
  2. 2. Using Vagrant, Virtual Box and Chef in yourDevelopment Environment
  3. 3. The future of Development@mitchellh creator and maintainer of vagrant
  4. 4. WHY?“Vagrant lowers development environmentsetup time, maximize dev/prod parity, andmakes the „works on my machine‟ excuse arelic of the past.”-http://vagrantup.com http://www.12factor.net
  5. 5. Components of a virtualised development environment• Virtualbox - virtualisation layer.• Vagrant• Provisioning tool like chef or puppet.
  6. 6. Virtual Box• Virutalisation product freely available as Open Source Software under (GPL) version 2.• Supports all major platforms. https://www.virtualbox.org/manual/ch01.html#hostossupport• Community effort backed by a big company.• Grab a copy for your platform at https://www.virtualbox.org/wiki/Downloads
  7. 7. Vagrant• “A tool to transparently manage all the complex parts of modern development within a virtual environment without affecting the everyday workflow of the developer too much.” - vagrantup.com• Opensource project and written in Ruby, a command line tool. Supported on most major operating systems.• Hashicorp - http://www.hashicorp.com/blog/announcing- hashicorp.html• Grab a copy here - http://downloads.vagrantup.com/tags/v1.0.5 for a package or install with ruby gems.
  8. 8. Chef• Chef is a open source provisioning tool which was built for automating the cloud. https://github.com/opscode/chef http://wiki.opscode.com/display/chef/Home• There are hundreds of recipes which are already written so you can simply re-use them. https://github.com/opscode/cookbooks• Can be installed via ruby gems. gem install chef• Different configurations chef solo will be used in the examples.
  9. 9. Windows Developer VCS Mac Osx Developer VagrantFile Linux DeveloperChef Solo Scripts 1. vagrant add box box_name package.box 2. vagrant up 3. vagrant provisionDeployment Staging Production tool
  10. 10. How vagrant works• Vagrant instance is managed with Vagrantfile which is ruby syntax.• 28 configuration options. You don‟t need to use them all I‟ll demo 7 today. Full list on vagrantup.com.
  11. 11. Basic VagrantFile• Vagrant box file can be obtained from 3 places
  12. 12. Three methods to create a box file Method Pros Cons Download a box file from - Simplest - You don‟t know whats on http://www.vagrant.es - Up and running quickly the base box - Time consuming. - Gives understanding of the - Miss a step or do a step Using the instructions off specifics of a vagrant box wrong and you have a vagrantup.com setup vagrant box which has odd behaviour Using the opensource project VeeWee off github - Simpler,Powerfulhttps://github.com/jedi4ever/vee - Templates for most server operating systemswee
  13. 13. Vagrant file options
  14. 14. Chef configuration
  15. 15. • Download Virtualbox 4.1.22 http://download.virtualbox.org/virtualbox/4.1.22/• Download vagrant package or install via ruby gems http://downloads.vagrantup.com/tags/v1.0.5• Add 33.33.33.10 vagrantdemo.com to /etc/hosts• Get the project git clone http://www.github.com/jeremyquinton/vagrant_demo cd vagrant_demo• vagrant up --no-provision• vagrant provision• Browse to vagrantdemo.com
  16. 16. • http://downloads.vagrantup.com/tags/v1 .0.5• http://download.virtualbox.org/virtualbox /• http://www.opscode.com/chef/• https://github.com/jedi4ever/veewee• https://github.com/mitchellh/vagrant

×