the future of the php development environment

38
The Future of the PHP Development Environment

Upload: jeremy-quinton

Post on 13-May-2015

3.248 views

Category:

Documents


1 download

DESCRIPTION

The future of the php development environment. Talk given at the PHP London UK 2013

TRANSCRIPT

Page 1: The future of the php development environment

The Future of the PHP Development Environment

Page 2: 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

Page 3: The future of the php development environment

Red Nose Day is back 15th March 2013 so look out for it

http://www.rednoseday.com

Page 4: The future of the php development environment

The Future of the PHP Development Environment

Page 5: The future of the php development environment

This talk contains Ruby

Page 6: The future of the php development environment

The Past

Page 7: The future of the php development environment

NO PLACE LIKE

127.0.0.1

Page 8: The future of the php development environment

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

How does a newbie install php?

Page 9: The future of the php development environment

Some solutions

Homebrew

Package Manager on Linux APT, YUM ETC

Page 10: The future of the php development environment

PHP

MySQL

EcoSystem around the Lamp Stack has changed drastically

Linux/Windows/Mac OSX

Apache

Nginx

Varnish RedisMemcache

CouchDB

MongoDB

Cassandra

RabbitMQ

ZeroMQ

Gearman

This is not a exhaustive list

PHP has over 150 extensions

Page 11: The future of the php development environment

The concept of a production snowflake in many ways can be applied to our development environments - http://martinfowler.com/bliki/SnowflakeServer.html

Page 12: The future of the php development environment

Spot the difference

Page 13: The future of the php development environment

“Keep development, staging, and production as similar as possible”

- http://12factor.net/

Spot the difference is similar to Dev/Prod Parity Concept

Page 14: The future of the php development environment

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

Page 15: The future of the php development environment

The Present: A solution to these problems

http://www.vagrantup.com/

@mitchellh creator and maintainer of vagrant

$ vagrant up

Page 16: The future of the php development environment

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

ProvisionerProvider - virtualisationVagrant

Page 17: The future of the php development environment

How vagrant worksBasic Vagrant WorkflowOnce Configured one command to bring up your development environment.

When you finished work for the day

$ vagrant up

$ vagrant haltWhen you done with the dev environment

$ vagrant destroy [vn-name]

Provision the virtual environment

$ vagrant provision

To access the virtual machine via ssh

$ vagrant ssh

Page 18: The future of the php development environment

Open source project written in Ruby, a command line tool. Supported on most major operating systems.

Vagrant command line options

Page 19: The future of the php development environment

How vagrant worksVagrant instance is managed with Vagrantfile which is Ruby syntax.

28 configuration options.

Page 20: The future of the php development environment

Three methods to create a box fileThree methods to 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

Page 21: The future of the php development environment
Page 22: The future of the php development environment

Vagrant config file continued...

Page 23: The future of the php development environment

Chef - a provisioner

Page 24: The future of the php development environment

Basic Chef Solo configuration

Page 25: The future of the php development environment

Quick Recap

Vagrantfile

Provisioner

Provider - virtualisation

Page 26: The future of the php development environment

VCS

Windows Developer

Mac Osx Developer

Linux Developer

ProductionStagingDeployment

tool

VagrantFile

1. vagrant add box box_name package.box2. vagrant up3. vagrant provision

Chef Solo Scripts

Visualisation of a vagrant workflow

Page 27: The future of the php development environment

Multi VM Environments

Page 28: The future of the php development environment

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.

Multi VM Environments

Page 29: The future of the php development environment

The Future

Page 30: The future of the php development environment
Page 31: The future of the php development environment

New Vagrant ProvidersVagrant 1.1 - Released end of Feb

$ vagrant up --provider=aws

Page 32: The future of the php development environment

Collaboration is everything

Page 33: The future of the php development environment

Vagrant 1.1plugin system is completely re-written

Page 34: The future of the php development environment

Download Virtualbox 4.1.22http://download.virtualbox.org/virtualbox/4.1.22/

Download vagrant package or install via ruby gemshttp://downloads.vagrantup.com/tags/v1.0.5

Add 33.33.33.10 vagrantdemo.com to /etc/hosts

Get the projectgit clone http://www.github.com/jeremyquinton/vagrant_democd vagrant_demo

vagrant up --no-provision

vagrant provision

Browse to vagrantdemo.com

Demo

Page 35: The future of the php development environment

Feedbackhttps://joind.in/8049

Page 36: The future of the php development environment

Questions?

Page 38: The future of the php development environment

Image Sourceshttp://www.photosinbox.com/download/warning-sign.jpg

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

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

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

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