SlideShare uma empresa Scribd logo
1 de 15
Zero downtime deployments
with Laravel Envoy
Presented by Nguyen Thanh Tung D
About me
Nguyen Thanh Tung D
PHP Developer
Division 1 - Group 2
Agenda
❖ Deployment Fundamentals
➢ Deployment definition
➢ Deployment best practices
➢ Deployment tools
➢ Zero-downtime deployment
❖ Introduction to Laravel Envoy
➢ Definition
➢ Syntax
Deployment Fundamentals
“Software deployment is all of the activities that make a
software system available for use.”
(https://en.wikipedia.org/wiki/Software_deployment)
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, …)
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
Deployment Fundamentals
❖ Deployment tools:
➢ Capistrano
➢ Rocketeer
➢ Ansible
➢ Asistrano
➢ Envoy
➢ ...
Deployment Fundamentals
❖ Zero-downtime strategy
|-- deploy
|-- project_envoy
|-- current -> /home/deploy/project_envoy/releases/20160923070018
|-- releases
| |-- 20160923022158
| |-- 20160923024741
| |-- 20160923025123
| |-- 20160923030315
| |-- 20160923070018
| | |-- storage => /home/deploy/project_envoy/shared/storage
| | |-- .env => /home/deploy/project_envoy/shared/.env
|-- shared
| |-- storage
| |-- .env
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
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
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
Zero-downtime deployment with Laravel Envoy
DEMO
Message from Presenter
❖ Always think about the ways to make your life easier.
❖ Philosophy problem.
❖ Human readable.
Q&A
Zero downtime deployments with laravel envoy

Mais conteúdo relacionado

Mais procurados

Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
gethue
 

Mais procurados (20)

Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
 
High Availability Perl DBI + MySQL
High Availability Perl DBI + MySQLHigh Availability Perl DBI + MySQL
High Availability Perl DBI + MySQL
 
Site speed Server Optimization
Site speed Server OptimizationSite speed Server Optimization
Site speed Server Optimization
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karaf
 
Deploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic BeanstalDeploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic Beanstal
 
Chef fundamentals
Chef fundamentalsChef fundamentals
Chef fundamentals
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache Camel
 
Whats all the FaaS About
Whats all the FaaS AboutWhats all the FaaS About
Whats all the FaaS About
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
 
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and MesosIguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
 
Unlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide PackUnlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide Pack
 
React on rails v4
React on rails v4React on rails v4
React on rails v4
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Bring api manager into your stack
Bring api manager into your stackBring api manager into your stack
Bring api manager into your stack
 
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
 
Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?Ingest and Stream Processing - What will you choose?
Ingest and Stream Processing - What will you choose?
 
Big Retail Goes Reactive at Walmart
Big Retail Goes Reactive at WalmartBig Retail Goes Reactive at Walmart
Big Retail Goes Reactive at Walmart
 
be the captain of your connections deployment
be the captain of your connections deploymentbe the captain of your connections deployment
be the captain of your connections deployment
 
5 steps to take setting up a streamlined container pipeline
5 steps to take setting up a streamlined container pipeline5 steps to take setting up a streamlined container pipeline
5 steps to take setting up a streamlined container pipeline
 

Semelhante a Zero downtime deployments with laravel envoy

Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
Nick Belhomme
 

Semelhante a Zero downtime deployments with laravel envoy (20)

Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
4. open mano set up and usage
4. open mano set up and usage4. open mano set up and usage
4. open mano set up and usage
 
Writing your First Ansible Playbook
Writing your First Ansible PlaybookWriting your First Ansible Playbook
Writing your First Ansible Playbook
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...Maven Zero to Hero with  AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
Maven Zero to Hero with AWS CodeCommit, CodeArtifact, ECR, OWASP Dependency ...
 
Operating OPNFV: Deploy it, test it, run it
Operating OPNFV: Deploy it, test it, run itOperating OPNFV: Deploy it, test it, run it
Operating OPNFV: Deploy it, test it, run it
 
Maven: from Scratch to Production (.pdf)
Maven: from Scratch to Production (.pdf)Maven: from Scratch to Production (.pdf)
Maven: from Scratch to Production (.pdf)
 
Vagrant 101 Workshop
Vagrant 101 WorkshopVagrant 101 Workshop
Vagrant 101 Workshop
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
Everything as code
Everything as codeEverything as code
Everything as code
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
CRaSH the shell for the JVM
CRaSH the shell for the JVMCRaSH the shell for the JVM
CRaSH the shell for the JVM
 
Developing web apps
Developing web appsDeveloping web apps
Developing web apps
 
[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
 
Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014Hands on continouous delivery, I TAKE 2014
Hands on continouous delivery, I TAKE 2014
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Zero downtime deployments with laravel envoy

  • 1. Zero downtime deployments with Laravel Envoy Presented by Nguyen Thanh Tung D
  • 2. About me Nguyen Thanh Tung D PHP Developer Division 1 - Group 2
  • 3. Agenda ❖ Deployment Fundamentals ➢ Deployment definition ➢ Deployment best practices ➢ Deployment tools ➢ Zero-downtime deployment ❖ Introduction to Laravel Envoy ➢ Definition ➢ Syntax
  • 4. Deployment Fundamentals “Software deployment is all of the activities that make a software system available for use.” (https://en.wikipedia.org/wiki/Software_deployment)
  • 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
  • 7. Deployment Fundamentals ❖ Deployment tools: ➢ Capistrano ➢ Rocketeer ➢ Ansible ➢ Asistrano ➢ Envoy ➢ ...
  • 8. Deployment Fundamentals ❖ Zero-downtime strategy |-- deploy |-- project_envoy |-- current -> /home/deploy/project_envoy/releases/20160923070018 |-- releases | |-- 20160923022158 | |-- 20160923024741 | |-- 20160923025123 | |-- 20160923030315 | |-- 20160923070018 | | |-- storage => /home/deploy/project_envoy/shared/storage | | |-- .env => /home/deploy/project_envoy/shared/.env |-- shared | |-- storage | |-- .env
  • 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
  • 12. Zero-downtime deployment with Laravel Envoy DEMO
  • 13. Message from Presenter ❖ Always think about the ways to make your life easier. ❖ Philosophy problem. ❖ Human readable.
  • 14. Q&A