SlideShare a Scribd company logo
Laravel 5.1:
From Homestead to the Cloud
https://joind.in/14758
Joe Ferguson
Who Am I?
Joe Ferguson
PHP Developer
Twitter: @JoePFerguson
Organizer of @MemphisPHP
@NomadPHP Lightning Talks
Passionate about Community
Laravel 5.1
What’s New?
PHP 5.5.9+
Laravel 5.1 will receive bug fixes for
2 years and security fixes for 3 years
PSR-2
Event Broadcasting
Middleware Parameters
Testing Overhaul
Encryption
How to get from
Homestead to the Cloud
Step One: Hello World
Create our project
Via Laravel Installer: laravel new hello-world
Via Composer:
composer create-project laravel/laravel hello-world --prefer-dist
Where should our project
live?
I prefer to keep things in ~/PhpstormProjects
MAMP, LAMP, WAMP,
WAT?
Mac/Linux/Windows Apache MySQL PHP
These are all great tools
Is your server running
MAMP?
Why not develop ON
the server?
Do not develop ON
the server
Develop in the same
environment
Servers are expensive
well, they used to be…
Virtual Machines
are cheap
Our Use Case:
Duplicate our server environment
in a local virtual machine
Installing an OS takes
time
Vagrant!
Vagrant allows you to:
• Create a server
• Configure a server
• Delete a server
…over and over and over..
Which Vagrant?
Laravel Homestead
“Laravel Homestead is an official, pre-packaged
Vagrant "box" that provides you a wonderful
development environment without requiring
you to install PHP, HHVM, a web server, and
any other server software on your local machine.”
But I need…
What’s in the box:
• Ubuntu 14.04
• PHP 5.6
• HHVM
• Nginx
• MySQL
• Postgres
• Redis
• NodeJS
• Bower
• Grunt
• Gulp
• Beanstalkd
• Memcached
• Laravel Envoy
Fabric + HipChat Extension + more!
Getting Homestead
Install the box:
vagrant box add laravel/homestead
Clone the Repository:
git clone https://github.com/laravel/homestead.git Homestead
Configure Homestead
Default: Hello World:
Update /etc/hosts
192.168.10.10 hello-world.app
Ready to vagrant up
Our code will be shared from our host machine
And mapped to the vagrant machine
~/PhpstormProjects/hello-world
/home/vagrant/hello-world
How I use Homestead
Install Homestead
http://laravel.com/docs/5.1/homestead#per-project-installation
$ vagrant up
Why do I prefer per-project?
Sharing your Homestead
environment
Do not version control:
Homestead.yml
DO version control:
Vagrantfile
after.sh
aliases
you should instruct potential collaborators to run
the make command for themselves
What now?
How to access
hello-world.app
These are ports forwarded to homestead
Connect to the Database
Connect via a browser
Connect via SSH
You could do this:
But this is easier:
Homestead is awesome!
We now have a local dev environment
we can easily use, break, and restore
without having to reinstall the
entire operating system and developer tools.
Break something?
Staking your own
Homestead
I like to customize homestead
AND
make sure I can easily update from upstream
Fork Homestead
Update your Homestead
Use after.sh for extras
./vendor/bin/homestead make —after
What could after.sh do?
You may not need after.sh
It is important to have a way to easily
reproduce your development environment
so that those one off changes you make
are documented and two months down the
road you don’t destroy & up your environment
to find out you have stuff missing
Step ???
Go make something great
Tests!
You've written tests all along for your app right?
PHPUnit isn’t the only
option!
• Behat
• phpspec
• Codeception
Codeception
• Selenium WebDriver integration
• Elements matched by name, CSS, XPath
• Symfony2, Laravel4, Yii, Phalcon,
• Zend Framework integration
• PageObjects and StepObjects included
• BDD-style readable tests
• Powered by PHPUnit
• API testing: REST,SOAP,XML-RPC
• Facebook API testing
• Data Cleanup
• HTML, XML, TAP, JSON reports
• CodeCoverage and Remote CodeCoverage
• Parallel Execution
Codeception.com
Acceptance Testing
Functional Testing
Unit Testing
• Our methods work
• Our product works
• Our product works
as intended
PhantomJS
PhantomJS is a headless WebKit scriptable
with a JavaScript API. It has fast
and native support for various
web standards: DOM handling,
CSS selector, JSON, Canvas, and SVG.
Codeception + PhantomJS
Basic Acceptance Test
Automate our Testing
Travis-CI
• Great for OSS projects (And free!)
• Easy to set up
• Easily test multiple versions of PHP
• Hosted on Travis Servers
.travis.yml
Jenkins CI
• Easy To Install
• Easy Configuration
• Multiple Languages
• Probably Overkill for PHP
• Hosted on your servers
TeamCity
• Easy To Install
• Easy Configuration
• Multiple Languages
• Nice middle ground
• Hosted on your servers
TeamCity
Build Config
Build Steps
Edit Build Step
Step Three:
Hello Production
Traditional Deployment
Better Deployment
But you still have to…
• Update Dependencies
• Run migrations
• Update Assets
Continuous Delivery
Production can be updated anytime
Continuous Delivery
VS
Continuous Deployment
Continuous Deployment
“Deploy my code every time tests pass”
Continuous Delivery
“We can deploy whenever we want…but we control when”
Magnus Hedemark: http://puppetlabs.com/blog/continuous-delivery-vs-continuous-deployment-whats-diff
Laravel Forge
“A simple way to deploy your laravel applications
onto blazing fast servers”
Forge is Homestead
and more in the cloud
Forge is not a server host
Forge uses your servers
Forge uses any* server
*Any Internet accesible Ubuntu 14.04 x64 Server
Laravel Forge
• Unlimited Servers.
• Unlimited Sites.
• Unlimited Deployments.
• Push To Deploy.
Laravel Forge Plus
• Share Servers With Teammates.
• Unlimited Servers.
• Unlimited Sites.
• Unlimited Deployments.
• Push To Deploy.
$10/Month
$100/Year
$20/Month
$140/Year
Adding Servers To Forge
Adding a site to a server
Adding a ssh key to a server
Adding scheduled (cron)
jobs
Adding daemons
(supervisor)
Creating server networks
Server Monitoring
Update Server Meta Data
Adding our hello-world
site
Install our Git Repository
Configure App
Deployment
Deploy!
Deploy!
Continuous
Delivery!
Deployment Log
Setting Environment
Variables
Queue Workers
Configure / Install SSL
Enable Quick Deploy
Quick Deploy Branch
Quick Deploy Branch
Continuous
Deployment!
Recipes
Recipes a bash scripts that can be
run on any of your Forge servers.
Cooking up Recipes
Think of recipes like our after.sh in Homestead
All the things!
Not All The Things
Some things we were doing in customize.sh
we can do via Forge:
• Queue Workers
• Cron Jobs
Create Recipe
Run Install Bower Recipe
Forge Emails You Recipe
Report
HipChat Notifications
Slack Notifications
Restarting Services
Edit PHP Configuration
Delete the server
Deleting a site
Envoyer.io
Zero Downtime
Deployments with
Envoyer.io
Envoyer
10 Projects - $10/month or $100/year
20 Projects - $20/month or $200/year
Envoyer Plus
Unlimited Projects - $50/month or $500/year
Envoyer Premium
Add a project
Adding a Server
Add the SSH key from
Envoyer
Test Connection Status
Envoyer now connected to our Forge Server
Project Path
Our first Deployment
Deployment Recap
Deploy when code is pushed
Free Video Series at
Laracasts
https://laracasts.com/series/envoyer
https://envoyer.io/docs
Recap
Local Development: Use Homestead
Remote Deployment: Use Forge and Envoyer
Automate built tests and configure
Continuous Deployment
Practice Continuous Delivery if not Continuous Deployment
Feedback!
https://joind.in/14758
Joe Ferguson
Twitter: @JoePFerguson
Email: joe@joeferguson.me
Freenode: joepferguson
Contact Info:

More Related Content

What's hot (20)

PDF
All Aboard for Laravel 5.1
Jason McCreary
 
PPTX
10 Laravel packages everyone should know
Povilas Korop
 
PDF
Laravel 5.4
Nisha Patel
 
PPTX
Introduction to Laravel Framework (5.2)
Viral Solani
 
PDF
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Joe Ferguson
 
ODP
Presentation laravel 5 4
Christen Gjølbye Christensen
 
PDF
Console Apps: php artisan forthe:win
Joe Ferguson
 
PPTX
A introduction to Laravel framework
Phu Luong Trong
 
PDF
Why Laravel?
Jonathan Goode
 
PDF
Web Development with Laravel 5
Soheil Khodayari
 
PPT
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 
PDF
Getting to know Laravel 5
Bukhori Aqid
 
PDF
Digpen 7: Why choose Laravel?
John Blackmore
 
PDF
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
PPTX
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
Roes Wibowo
 
PDF
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
PPTX
Laravel Beginners Tutorial 1
Vikas Chauhan
 
PDF
What's New In Laravel 5
Darren Craig
 
PDF
2021.laravelconf.tw.slides1
LiviaLiaoFontech
 
PDF
From CakePHP to Laravel
Jason McCreary
 
All Aboard for Laravel 5.1
Jason McCreary
 
10 Laravel packages everyone should know
Povilas Korop
 
Laravel 5.4
Nisha Patel
 
Introduction to Laravel Framework (5.2)
Viral Solani
 
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Joe Ferguson
 
Presentation laravel 5 4
Christen Gjølbye Christensen
 
Console Apps: php artisan forthe:win
Joe Ferguson
 
A introduction to Laravel framework
Phu Luong Trong
 
Why Laravel?
Jonathan Goode
 
Web Development with Laravel 5
Soheil Khodayari
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 
Getting to know Laravel 5
Bukhori Aqid
 
Digpen 7: Why choose Laravel?
John Blackmore
 
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
Roes Wibowo
 
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
Laravel Beginners Tutorial 1
Vikas Chauhan
 
What's New In Laravel 5
Darren Craig
 
2021.laravelconf.tw.slides1
LiviaLiaoFontech
 
From CakePHP to Laravel
Jason McCreary
 

Similar to php[world] 2015 Laravel 5.1: From Homestead to the Cloud (20)

PDF
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
PDF
All the Laravel Things – Up & Running to Making $$
Joe Ferguson
 
PDF
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
PDF
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
PDF
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
PDF
Developing web apps
Michael Dyrynda
 
PDF
Take Home Your Very Own Free Vagrant CFML Dev Environment
ColdFusionConference
 
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
PPTX
Using vagrant
Cuong Huynh
 
PDF
Continuous Integration: How I stopped guessing if that merge was bad
Joe Ferguson
 
PPTX
Laravel introduction
Simon Funk
 
PDF
High Stakes Continuous Delivery in the Real World #OpenWest
Joshua Warren
 
PDF
Virtualization with Vagrant (ua.pycon 2011)
Dmitry Guyvoronsky
 
PPTX
Travis CI - PHP
Adam Englander
 
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
E. Camden Fisher
 
PDF
Vagrant - Version control your dev environment
bocribbz
 
PPT
Professional deployment
Ivelina Dimova
 
PDF
FreeBSD: Dev to Prod
Sean Chittenden
 
PDF
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
All the Laravel Things – Up & Running to Making $$
Joe Ferguson
 
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
Developing web apps
Michael Dyrynda
 
Take Home Your Very Own Free Vagrant CFML Dev Environment
ColdFusionConference
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Using vagrant
Cuong Huynh
 
Continuous Integration: How I stopped guessing if that merge was bad
Joe Ferguson
 
Laravel introduction
Simon Funk
 
High Stakes Continuous Delivery in the Real World #OpenWest
Joshua Warren
 
Virtualization with Vagrant (ua.pycon 2011)
Dmitry Guyvoronsky
 
Travis CI - PHP
Adam Englander
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
E. Camden Fisher
 
Vagrant - Version control your dev environment
bocribbz
 
Professional deployment
Ivelina Dimova
 
FreeBSD: Dev to Prod
Sean Chittenden
 
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
Ad

More from Joe Ferguson (16)

PDF
Modern infrastructure as code with ansible cake fest 2021
Joe Ferguson
 
PDF
Modern infrastructure as code with ansible PyTN
Joe Ferguson
 
PDF
Slim PHP when you don't need the kitchen sink
Joe Ferguson
 
PDF
Throwing Laravel into your Legacy App™
Joe Ferguson
 
PDF
DevSpace Conf 2017 - Making sense of the provisioning circus
Joe Ferguson
 
PDF
Release and-dependency-management memphis python
Joe Ferguson
 
PDF
Composer at Scale, Release and Dependency Management
Joe Ferguson
 
PDF
Put an end to regression with codeception testing
Joe Ferguson
 
PDF
Console Apps: php artisan forthe:win
Joe Ferguson
 
PDF
So You Just Inherited a $Legacy Application… NomadPHP July 2016
Joe Ferguson
 
PDF
So You Just Inherited a $Legacy Application...
Joe Ferguson
 
PDF
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Joe Ferguson
 
PDF
Secure Form Processing and Protection - Devspace 2015
Joe Ferguson
 
PDF
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 
PDF
DevOps For Small Teams
Joe Ferguson
 
PDF
Secure Form Processing and Protection - Sunshine PHP 2015
Joe Ferguson
 
Modern infrastructure as code with ansible cake fest 2021
Joe Ferguson
 
Modern infrastructure as code with ansible PyTN
Joe Ferguson
 
Slim PHP when you don't need the kitchen sink
Joe Ferguson
 
Throwing Laravel into your Legacy App™
Joe Ferguson
 
DevSpace Conf 2017 - Making sense of the provisioning circus
Joe Ferguson
 
Release and-dependency-management memphis python
Joe Ferguson
 
Composer at Scale, Release and Dependency Management
Joe Ferguson
 
Put an end to regression with codeception testing
Joe Ferguson
 
Console Apps: php artisan forthe:win
Joe Ferguson
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
Joe Ferguson
 
So You Just Inherited a $Legacy Application...
Joe Ferguson
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Joe Ferguson
 
Secure Form Processing and Protection - Devspace 2015
Joe Ferguson
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 
DevOps For Small Teams
Joe Ferguson
 
Secure Form Processing and Protection - Sunshine PHP 2015
Joe Ferguson
 
Ad

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

php[world] 2015 Laravel 5.1: From Homestead to the Cloud