SlideShare a Scribd company logo
The Future of the PHP
    Development
    Environment
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 Comic Relief on their scalable
  fundraising platform.


• Follow me on twitter @jeremyquinton
Red Nose Day is back 15th March 2013 so look out
                      for it
          http://www.rednoseday.com
The Future of the PHP
    Development
    Environment
This talk contains Ruby
The Past
NO PLACE LIKE

  127.0.0.1
How does a newbie install php?

http://www.php.net/manual/en/install.php
Some solutions


                         Homebrew




Package Manager on
Linux APT, YUM ETC
EcoSystem around the Lamp Stack has changed
                 drastically
                            Linux/Windows/Mac OSX

                                          Apache

                                          MySQL

                                             PHP




                                  PHP has over 150 extensions


    Cassandra           Varnish                       Memcache                 Redis

            Nginx                  ZeroMQ                          CouchDB

                    RabbitMQ                                                 MongoDB
                                                         Gearman



                               This is not a exhaustive list
The concept of a production snowflake in many ways can be applied to our
development environments - http://martinfowler.com/bliki/SnowflakeServer.html
Spot the difference
Spot the difference is similar to
        Dev/Prod Parity Concept




“Keep development, staging, and production
          as similar as possible”
           - http://12factor.net/
Summary of Past and Present problems

  Setting up the modern dev environment,
  which has many moving, parts isn't straightforward

  Uniqueness

  Switching between projects with different
  dependancies is difficult

  Local dev environments differ significantly from
  production
The Present: A solution to these problems

                 $ vagrant up




    @mitchellh creator and maintainer of vagrant


         http://www.vagrantup.com/
What is the Vagrant Idea/Concept?
“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.” - http:/.vagrantup.com




                               Provider -
   Vagrant                                                  Provisioner
                             virtualisation
Basic Vagrant Workflow
    How vagrant works
Once Configured one command to bring up your development environment.

   $ vagrant up
To access the virtual machine via ssh

   $ vagrant ssh
When you finished work for the day

  $ vagrant halt
When you done with the dev environment

  $ vagrant destroy [vn-name]
Provision the virtual environment

  $ vagrant provision
Vagrant command line options
Open source project written in Ruby, a command line tool. Supported on most major
operating systems.
How vagrant works
Vagrant instance is managed with Vagrantfile which is Ruby syntax.

28 configuration options.
Three methods to create a box file
  Three methods create a box file


Download a box file from http://www.vagrant.es

Using the instructions off http://vagrantup.com

VeeWee https://github.com/jedi4ever/veewee
The future of the php development environment
Vagrant config file continued...
Chef - a provisioner
Basic Chef Solo configuration
Quick Recap



                        Provider -
                      virtualisation

Vagrantfile




                      Provisioner
Visualisation of a vagrant workflow

                      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
       tool        Staging                 Production
Multi VM Environments
Multi VM Environments
 Accurately modeling a separate web and database
 server within the same development environment.

 Modeling a cluster of machines, and how they behave
 together.

 Testing a load balancer configuration, or the effects of
 “unplugging” a machine.
The Future
The future of the php development environment
New Vagrant Providers
 Vagrant 1.1 - Released end of Feb




                 $ vagrant up --provider=aws
Collaboration is
  everything
Vagrant 1.1
plugin system is completely re-written
Demo
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
Feedback
  https://joind.in/8049
Questions?
Technical resources
 •   http://www.vagrantup.com

 •   http://www.virtualbox.org

 •   http://www.opscode.com/chef/

 •   https://github.com/jedi4ever/veewee

 •   https://github.com/mitchellh/vagrant
Image Sources
http://www.photosinbox.com/download/warning-sign.jpg

http://d36cz9buwru1tt.cloudfront.net/Powered-by-Amazon-Web-Services.jpg

http://aws.amazon.com/trademark-guidelines/

http://cdn.hdwallpaperspics.com/uploads/2012/12/Future_City_from_Above.jpg

http://www.canvascreekteambuilding.com/uploads/8/0/1/7/8017325/997680_orig.jpg

http://forbenefitenterprise.com/wp-content/uploads/2010/03/collaboration1.jpg

http://hd.wallpaperswide.com/thumbs/snowflake-t2.jpg
http://blog.azculinary.edu//wp-content/uploads/2010/08/Chef-Meyer_7659.jpg
http://farm7.staticflickr.com/6087/6144237169_e5f225f2d0_o.jpg

http://farm8.staticflickr.com/7078/7006904747_5c746375e9_b.jpg

More Related Content

The future of the php development environment