php[world] 2015 laravel 5.1: from homestead to the cloud
Post on 15-Apr-2017
832 Views
Preview:
TRANSCRIPT
Who Am I?
Joe Ferguson
PHP Developer
Twitter: @JoePFerguson
Organizer of @MemphisPHP
@NomadPHP Lightning Talks
Passionate about Community
Create our projectVia Laravel Installer: laravel new hello-world
Via Composer: composer create-project laravel/laravel hello-world --prefer-dist
Vagrant allows you to:• Create a server• Configure a server• Delete a server
…over and over and over..
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.”
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
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
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
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
You may not need after.shIt 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
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
PhantomJSPhantomJS 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.
Travis-CI
• Great for OSS projects (And free!)• Easy to set up• Easily test multiple versions of PHP• Hosted on Travis Servers
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
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• 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
Not All The Things
Some things we were doing in customize.sh we can do via Forge:
• Queue Workers• Cron Jobs
Envoyer10 Projects - $10/month or $100/year
20 Projects - $20/month or $200/year
Envoyer Plus
Unlimited Projects - $50/month or $500/year
Envoyer Premium
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 FergusonTwitter: @JoePFergusonEmail: joe@joeferguson.meFreenode: joepferguson
Contact Info:
top related