This document discusses zero downtime deployments using Laravel Envoy. It begins with fundamentals of deployment including definitions, best practices, and tools. Common deployment tools mentioned include Capistrano, Ansible, and Envoy. The document then introduces Laravel Envoy, describing it as a tool to define common tasks on remote servers using Blade syntax. Key points about Envoy include installing it globally, writing tasks in an Envoy.blade.php file, and running tasks via the envoy command. The document concludes with an overview of how Envoy enables zero downtime deployments through stories for setup, deploy, and rollback.
5. Deployment Fundamentals
❖ Different ways:
➢ FTP
➢ Version Control Systems (Git, SVN, …)
and SSH
■ Webhook feature
➢ Third party deployment web services
(Beanstalk, Deploy, Bamboo, …)
➢ Command Line Interface (CLI) Tools
(Capistrano, Ansible, rsync, …)
➢ PaaS - Platform as a Service (Heroku,
AppFog, Pagoda Box, …)
6. Deployment Fundamentals
❖ Best practices
➢ Workflow: Development, Staging and Production
environment.
➢ Deploy to Production at a scheduled time.
➢ Verify after finished.
➢ Rolling back strategy.
➢ Automatic deployments to Production? -> NO
9. Introduction to Laravel Envoy
❖About Envoy
➢ Defining common tasks run on Remote Server.
➢ Using Blade style syntax.
➢ Only support the Mac and Linux OS.
❖Installation
➢ Globally
■ composer global require "laravel/envoy=~1.0"
■ Use envoy command
10. Introduction to Laravel Envoy
❖Writing tasks
➢ All tasks should be defined in Envoy.blade.php file in root folder.
➢ Setup
➢ Variables
➢ Stories
➢ Multiple Servers
➢ Example: https://gist.github.com/gravitano/4a86e2de978c45aa2264
❖Running tasks
11. Zero-downtime deployment with Laravel Envoy
❖Reference: https://github.com/FramgiaCD/envoy-config
❖Three main stories:
➢ Setup
➢ Deploy
➢ Rollback
envoy run deploy --on=local,staging --branch=develop
// OR
envoy run deploy --on=production --branch=master
envoy run rollback
// OR
envoy run rollback --rollback_version=20160923022158