SlideShare a Scribd company logo
Laravel Forge: 
From Hello World to Hello Production
Step One: Hello World 
Step Two: CI, CD, OMG 
Step Three: ???? 
Step Four: Hello 
Production
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
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?
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 
*This step is optional
Ready to vagrant up 
Our code will be shared from our host machine 
~/PhpstormProjects/hello-world 
And mapped to the vagrant machine 
/home/vagrant/hello-world
$ vagrant up
What now?
How to access our 
hello-world.app 
These are ports forwarded to homestead
Connect to the Database
Connect via a browser
Or use the hostname* 
*If you added the host to your /etc/hosts
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
Add another provisioner
What could customize.sh do?
You may not need 
customize.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 
• 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
Basic Acceptance Test
Automate our Testing
TeamCity
Build Steps
All OK? Deploy!
Step Four: 
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
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
Forge can do more…
Add a WordPress Site
Ready to install
Removing WordPress 
Does NOT remove your WordPress Database!
Install Craft CMS
Craft CMS
Uninstall Craft CMS 
Does NOT remove your Craft CMS Database!
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 customize.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 
You can use cURL to post to Slack channels 
curl -X POST --data-urlencode ‘payload= 
{"channel": “#devops", 
"username": "Forge", 
"text": “'"$Message"'", 
"icon_emoji": ":shipit:"}' 
https://<You>.slack.com/services/ 
hooks/incoming-webhook 
?token=<Your-Slack-Token>
Edit our Deployment 
Script 
Now every deployment will run bower and 
notify our slack channel that our repo was deployed.
Hey Joe…
Been there, done that
Enable Slack
Add the Integration
Authenticate with Slack
Deploy!
Restarting Services 
Edit PHP Configuration
Delete the server
Deleting a site
Forge Circles* 
*Forge Plus Feature
Forge Circles* 
*Forge Plus Feature
Forge VS Forge Plus 
• Manage 5 Servers 
• Unlimited Servers 
• Forge Circles
Recap 
Local Development: Use Homestead 
Automate build tests and configure 
Continuous Deployment 
Practice Continuous Delivery if not Continuous Deployment 
Remote Deployment: Use Forge
Feedback! 
https://joind.in/talk/view/11870 
Contact Info: 
Joe Ferguson 
Twitter: @Svpernova09 
Email: joe@joeferguson.me

More Related Content

What's hot (20)

PPTX
10 Laravel packages everyone should know
Povilas Korop
 
PDF
MidwestPHP 2016 - Adventures in Laravel 5
Joe Ferguson
 
PDF
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Joe Ferguson
 
PPT
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 
ODP
Presentation laravel 5 4
Christen Gjølbye Christensen
 
PPTX
Workshop Laravel 5.2
Wahyu Rismawan
 
PPTX
Laravel Beginners Tutorial 2
Vikas Chauhan
 
PDF
Why Laravel?
Jonathan Goode
 
PPTX
Introduction to Laravel Framework (5.2)
Viral Solani
 
PDF
Laravel 5 New Features
Joe Ferguson
 
PDF
What's New In Laravel 5
Darren Craig
 
PDF
Laravel 5.4
Nisha Patel
 
PPTX
Laravel - Website Development in Php Framework.
SWAAM Tech
 
PDF
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
PDF
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
PDF
Knowing Laravel 5 : The most popular PHP framework
Bukhori Aqid
 
PDF
Deploying Symfony | symfony.cat
Pablo Godel
 
PDF
Web Development with Laravel 5
Soheil Khodayari
 
PDF
Laravel 101
Commit University
 
PPTX
A introduction to Laravel framework
Phu Luong Trong
 
10 Laravel packages everyone should know
Povilas Korop
 
MidwestPHP 2016 - Adventures in Laravel 5
Joe Ferguson
 
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Joe Ferguson
 
Laravel Starter Kit | Laravel Admin Template-ChandraAdmin
Lorvent56
 
Presentation laravel 5 4
Christen Gjølbye Christensen
 
Workshop Laravel 5.2
Wahyu Rismawan
 
Laravel Beginners Tutorial 2
Vikas Chauhan
 
Why Laravel?
Jonathan Goode
 
Introduction to Laravel Framework (5.2)
Viral Solani
 
Laravel 5 New Features
Joe Ferguson
 
What's New In Laravel 5
Darren Craig
 
Laravel 5.4
Nisha Patel
 
Laravel - Website Development in Php Framework.
SWAAM Tech
 
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
Laravel 5 Annotations: RESTful API routing
Christopher Pecoraro
 
Knowing Laravel 5 : The most popular PHP framework
Bukhori Aqid
 
Deploying Symfony | symfony.cat
Pablo Godel
 
Web Development with Laravel 5
Soheil Khodayari
 
Laravel 101
Commit University
 
A introduction to Laravel framework
Phu Luong Trong
 

Similar to Laravel Forge: Hello World to Hello Production (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
Developing web apps
Michael Dyrynda
 
PDF
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
PDF
Dockerize Laravel Application
Afrimadoni Dinata
 
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
PDF
Docker at MoneyBird
Edwin Vlieg
 
PPTX
Laravel Day / Deploy
Simone Gentili
 
PDF
Converting Your Dev Environment to a Docker Stack - php[world]
Dana Luther
 
PDF
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
PDF
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PPT
Professional deployment
Ivelina Dimova
 
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
 
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
E. Camden Fisher
 
PDF
Cooking Perl with Chef: Hello World Tutorial
David Golden
 
PDF
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
Wong Hoi Sing Edison
 
PDF
Convert Your Dev Environment to a Docker Stack - PHP Tek 2025.pdf
Dana Luther
 
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
 
Developing web apps
Michael Dyrynda
 
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
Dockerize Laravel Application
Afrimadoni Dinata
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Docker at MoneyBird
Edwin Vlieg
 
Laravel Day / Deploy
Simone Gentili
 
Converting Your Dev Environment to a Docker Stack - php[world]
Dana Luther
 
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Professional deployment
Ivelina Dimova
 
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
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
E. Camden Fisher
 
Cooking Perl with Chef: Hello World Tutorial
David Golden
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
Wong Hoi Sing Edison
 
Convert Your Dev Environment to a Docker Stack - PHP Tek 2025.pdf
Dana Luther
 
Ad

More from Joe Ferguson (18)

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
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
Continuous Integration: How I stopped guessing if that merge was bad
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
 
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
 
Continuous Integration: How I stopped guessing if that merge was bad
Joe Ferguson
 
DevOps For Small Teams
Joe Ferguson
 
Secure Form Processing and Protection - Sunshine PHP 2015
Joe Ferguson
 
Ad

Recently uploaded (20)

PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Securing Model Context Protocol with Keycloak: AuthN/AuthZ for MCP Servers
Hitachi, Ltd. OSS Solution Center.
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PPTX
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
PDF
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Securing Model Context Protocol with Keycloak: AuthN/AuthZ for MCP Servers
Hitachi, Ltd. OSS Solution Center.
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 

Laravel Forge: Hello World to Hello Production