SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
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
Using Vagrant, Virtual Box
    and Chef in your
Development Environment
The future of Development


@mitchellh creator and maintainer of vagrant
WHY?

“Vagrant lowers development environment
setup time, maximize dev/prod parity, and
makes the „works on my machine‟ excuse a
relic of the past.”
-http://vagrantup.com


    http://www.12factor.net
PHP London Meetup December 2012
Components of a virtualised
 development environment


•   Virtualbox - virtualisation layer.
•   Vagrant
•   Provisioning tool like chef or puppet.
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
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.
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.
Windows Developer




     VCS
                         Mac Osx Developer




  VagrantFile

                           Linux Developer


Chef Solo Scripts
                      1. vagrant add box box_name package.box
                      2. vagrant up
                      3. vagrant provision




Deployment
                    Staging                      Production
   tool
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.
Basic VagrantFile




•   Vagrant box file can be obtained from 3 places
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,Powerful
https://github.com/jedi4ever/vee   - Templates for most server
                                     operating systems
wee
Vagrant file options
Chef configuration
•   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
• 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

Weitere ähnliche Inhalte

Empfohlen

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Empfohlen (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

PHP London Meetup December 2012

  • 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. Using Vagrant, Virtual Box and Chef in your Development Environment
  • 3. The future of Development @mitchellh creator and maintainer of vagrant
  • 4. WHY? “Vagrant lowers development environment setup time, maximize dev/prod parity, and makes the „works on my machine‟ excuse a relic of the past.” -http://vagrantup.com http://www.12factor.net
  • 6. Components of a virtualised development environment • Virtualbox - virtualisation layer. • Vagrant • Provisioning tool like chef or puppet.
  • 7. 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
  • 8. 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.
  • 9. 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.
  • 10. Windows Developer VCS Mac Osx Developer VagrantFile Linux Developer Chef Solo Scripts 1. vagrant add box box_name package.box 2. vagrant up 3. vagrant provision Deployment Staging Production tool
  • 11. 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.
  • 12. Basic VagrantFile • Vagrant box file can be obtained from 3 places
  • 13. 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,Powerful https://github.com/jedi4ever/vee - Templates for most server operating systems wee
  • 16. 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
  • 17. • 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