SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
DEPLOYER
DEPLOYER.ORG - DEPLOYMENT TOOL FOR PHP
HERNÂNI BORGES DE FREITAS
PHPLX NOVEMBER 2017
ME
-  Long time PHP user ~ early 2000
-  Drupal Expert / Former Acquia
-  Freelance Architect and Developer
-  Addicted to good hobbies – SerBenfiquista.com
Hernani.pt / twitter: hernanibf
DEPLOYMENT
1.  Build release artifact
2.  Identify to which environment you want to deploy (dev,
staging , prod).
3.  Ideally you save a backup of previous application state in
that environment so you can rollback.
4.  Copy artifact to servers
5.  Execute upgrade procedures (clear cache, update
database schemas, configure services, send
notifications ).
6.  Application live
“Software deployment is all of the activities that make a software system
available for use.”
PROBLEMS
•  Deployments/releases can take 10% of overall project time
•  Downtime involved
•  Not automatized? Human errors ready to happen
•  Hard to rollback in failures
•  Complexity increase with number of web nodes,
environments and their difference
WHAT’S TYPICAL
•  Copy code to servers
•  (FTP, RSYNC, etc..)
•  Deploy from source control
•  Git pull, svn checkout
•  Deploying using other tools / platforms
•  Capistrano, Envoyer/Forge, platform tools..
PERFECT WORLD
•  Code is controlled in
a repository
•  Code is deployed
directly from a
branch or tag.
•  Deployment is done
AUTOMATICALLY to
any environment
from a central
location
•  No human errors,
easy to rollback,
minimum deployment
time and downtime.
MEET DEPLOYER
-  PHP package that allows the configuration and execution
of deployments (deployer.org). Started in 2013 by Anton
Medvedev.
-  All deployment configuration defined as a recipe in a
single file (deploy.php)
-  Define Git origin repository
-  Define environments and their hosts
-  Define deployer strategy
-  Define tasks to be executed in different deployment stages
-  Atomic deployment
-  All tasks related with deployment in a single atomic step
-  Maintains consistency across all servers
-  Rollback possible
GOOD FRIENDSHIPS
INSTALLATION
Or with composer
SIMPLE CONFIGURATION
<?php
namespace Deployer;
require' recipe/drupal8.php' ;
set(' repository' ,' git@bitbucket.org:yourorg/yourepo.git' );
host(' web1.example.com' )
->stage(' production' )
->set(' deploy_path' ,' /home/user/site_prod' );
host(' web2.example.com' )
->stage(' production' )
->set(' deploy_path' ,' /home/user/site_prod' );
host(' web3.example.com' )
->stage(' development' )
->set(' deploy_path' ,' /home/user/site_dev' );
Deploy.php
OTHER FEATURES
-  Shared folders
set('shared_dirs', [
'docroot/sites/{{drupal_site}}/files',
'docroot/forum/attachments',
'docroot/forum/avatars',
'docroot/forum/avatars_custom',
]);
-  Writable dirs
set(' writable_dirs' , [ ' docroot/sites/{{drupal_site}}/files’]);
-  Shared files
TYPICAL RECIPE
task(' deploy' , [
' deploy:prepare' ,
' deploy:lock' ,
' deploy:release' ,
' deploy:update_code' ,
' deploy:shared' ,
' deploy:symlink' ,
' deploy:unlock' ,
' cleanup' 
]);
EXECUTION
$ php dep deploy production --branch=master
-  Code is copied to this structure
-  Permissions are set correctly, shared folders are setup
-  Symlink is defined correctly after code is deployed on all servers
-  Update functions are run if defined
-  https://deployer.org/docs/flow
MISC
-  Different strategies to build/deploy:
-  Deployer checking out code on all servers from git
repository
-  Deployer builiding the artifact on a build server and
syncing to all hosts
-  Parallellism
-  Recipes in
https://github.com/deployphp/deployer/tree/master/recipe
-  Custom tasks definition to define in your recipe
task(' build' ,'
composer install
npm install
npm run build
...
');
-  Largest European event for Drupal developers
-  Lisbon - https://lisbon2018.drupaldays.org/
-  July 2nd – July 6th - Iscte
-  Full week of Drupal and open source talks and sprints! Tickets coming soon .
DRUPAL DEV DAYS 2018
Or share your alternative or experience?
Or walk straight to dinner?
QUESTIONS?

Contenu connexe

Tendances

My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013hernanibf
 
Acquia Commons
Acquia CommonsAcquia Commons
Acquia Commonshernanibf
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionJeff Geerling
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalVibrant Technologies & Computers
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupalsdmaxey
 
WordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetWordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetTech Liminal
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal BasicsJuha Niemi
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)Phase2
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitSuzanne Dergacheva
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsMicky Metts
 
Drupal - Introduction to Drupal and Web Content Management
Drupal - Introduction to Drupal and Web Content ManagementDrupal - Introduction to Drupal and Web Content Management
Drupal - Introduction to Drupal and Web Content ManagementVibrant Technologies & Computers
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectIztok Smolic
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-BoxSuzanne Dergacheva
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSuzanne Dergacheva
 
Evolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityAngela Byron
 

Tendances (20)

My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013
 
Acquia Commons
Acquia CommonsAcquia Commons
Acquia Commons
 
Drupal
DrupalDrupal
Drupal
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief Introduction
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using Drupal
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupal
 
WordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational IntranetWordPress as a CMS - Case Study of an Organizational Intranet
WordPress as a CMS - Case Study of an Organizational Intranet
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Beginners Guide to Drupal
Beginners Guide to DrupalBeginners Guide to Drupal
Beginners Guide to Drupal
 
Introduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience ToolkitIntroduction to the Drupal - Web Experience Toolkit
Introduction to the Drupal - Web Experience Toolkit
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Drupal - Introduction to Drupal and Web Content Management
Drupal - Introduction to Drupal and Web Content ManagementDrupal - Introduction to Drupal and Web Content Management
Drupal - Introduction to Drupal and Web Content Management
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
Evolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal community
 

Similaire à Deployer - Deployment tool for PHP

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineKrimson
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with PuppetJoe Ray
 
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 waySylvain Rayé
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated DeploymentMichael Peacock
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deploymentphpne
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Aleksey Tkachenko
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerEric D. Schabell
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Andrii Podanenko
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
Professional deployment
Professional deploymentProfessional deployment
Professional deploymentIvelina Dimova
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Voiture tech talk
Voiture tech talkVoiture tech talk
Voiture tech talkHoppinger
 
DevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentDevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentGerald Villorente
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupalDay
 
DevOps and Chef
DevOps and ChefDevOps and Chef
DevOps and ChefPiXeL16
 

Similaire à Deployer - Deployment tool for PHP (20)

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev Machine
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
 
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
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deployment
 
Docker-v3.pdf
Docker-v3.pdfDocker-v3.pdf
Docker-v3.pdf
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Voiture tech talk
Voiture tech talkVoiture tech talk
Voiture tech talk
 
DevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentDevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal Deployment
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
DevOps and Chef
DevOps and ChefDevOps and Chef
DevOps and Chef
 

Plus de hernanibf

Drupal Europe 2018: Hackers automate but the drupal community still downloads...
Drupal Europe 2018: Hackers automate but the drupal community still downloads...Drupal Europe 2018: Hackers automate but the drupal community still downloads...
Drupal Europe 2018: Hackers automate but the drupal community still downloads...hernanibf
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018hernanibf
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon praguehernanibf
 
Drupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case StudyDrupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case Studyhernanibf
 
Drupal + selenium
Drupal + seleniumDrupal + selenium
Drupal + seleniumhernanibf
 
Drupal Recipe
Drupal RecipeDrupal Recipe
Drupal Recipehernanibf
 

Plus de hernanibf (6)

Drupal Europe 2018: Hackers automate but the drupal community still downloads...
Drupal Europe 2018: Hackers automate but the drupal community still downloads...Drupal Europe 2018: Hackers automate but the drupal community still downloads...
Drupal Europe 2018: Hackers automate but the drupal community still downloads...
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
 
Drupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case StudyDrupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case Study
 
Drupal + selenium
Drupal + seleniumDrupal + selenium
Drupal + selenium
 
Drupal Recipe
Drupal RecipeDrupal Recipe
Drupal Recipe
 

Dernier

定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 

Dernier (20)

定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 

Deployer - Deployment tool for PHP

  • 1. DEPLOYER DEPLOYER.ORG - DEPLOYMENT TOOL FOR PHP HERNÂNI BORGES DE FREITAS PHPLX NOVEMBER 2017
  • 2. ME -  Long time PHP user ~ early 2000 -  Drupal Expert / Former Acquia -  Freelance Architect and Developer -  Addicted to good hobbies – SerBenfiquista.com Hernani.pt / twitter: hernanibf
  • 3. DEPLOYMENT 1.  Build release artifact 2.  Identify to which environment you want to deploy (dev, staging , prod). 3.  Ideally you save a backup of previous application state in that environment so you can rollback. 4.  Copy artifact to servers 5.  Execute upgrade procedures (clear cache, update database schemas, configure services, send notifications ). 6.  Application live “Software deployment is all of the activities that make a software system available for use.”
  • 4.
  • 5. PROBLEMS •  Deployments/releases can take 10% of overall project time •  Downtime involved •  Not automatized? Human errors ready to happen •  Hard to rollback in failures •  Complexity increase with number of web nodes, environments and their difference
  • 6. WHAT’S TYPICAL •  Copy code to servers •  (FTP, RSYNC, etc..) •  Deploy from source control •  Git pull, svn checkout •  Deploying using other tools / platforms •  Capistrano, Envoyer/Forge, platform tools..
  • 7. PERFECT WORLD •  Code is controlled in a repository •  Code is deployed directly from a branch or tag. •  Deployment is done AUTOMATICALLY to any environment from a central location •  No human errors, easy to rollback, minimum deployment time and downtime.
  • 8. MEET DEPLOYER -  PHP package that allows the configuration and execution of deployments (deployer.org). Started in 2013 by Anton Medvedev. -  All deployment configuration defined as a recipe in a single file (deploy.php) -  Define Git origin repository -  Define environments and their hosts -  Define deployer strategy -  Define tasks to be executed in different deployment stages -  Atomic deployment -  All tasks related with deployment in a single atomic step -  Maintains consistency across all servers -  Rollback possible
  • 11. SIMPLE CONFIGURATION <?php namespace Deployer; require' recipe/drupal8.php' ; set(' repository' ,' git@bitbucket.org:yourorg/yourepo.git' ); host(' web1.example.com' ) ->stage(' production' ) ->set(' deploy_path' ,' /home/user/site_prod' ); host(' web2.example.com' ) ->stage(' production' ) ->set(' deploy_path' ,' /home/user/site_prod' ); host(' web3.example.com' ) ->stage(' development' ) ->set(' deploy_path' ,' /home/user/site_dev' ); Deploy.php
  • 12. OTHER FEATURES -  Shared folders set('shared_dirs', [ 'docroot/sites/{{drupal_site}}/files', 'docroot/forum/attachments', 'docroot/forum/avatars', 'docroot/forum/avatars_custom', ]); -  Writable dirs set(' writable_dirs' , [ ' docroot/sites/{{drupal_site}}/files’]); -  Shared files
  • 13. TYPICAL RECIPE task(' deploy' , [ ' deploy:prepare' , ' deploy:lock' , ' deploy:release' , ' deploy:update_code' , ' deploy:shared' , ' deploy:symlink' , ' deploy:unlock' , ' cleanup' ]);
  • 14. EXECUTION $ php dep deploy production --branch=master -  Code is copied to this structure -  Permissions are set correctly, shared folders are setup -  Symlink is defined correctly after code is deployed on all servers -  Update functions are run if defined -  https://deployer.org/docs/flow
  • 15. MISC -  Different strategies to build/deploy: -  Deployer checking out code on all servers from git repository -  Deployer builiding the artifact on a build server and syncing to all hosts -  Parallellism -  Recipes in https://github.com/deployphp/deployer/tree/master/recipe -  Custom tasks definition to define in your recipe task(' build' ,' composer install npm install npm run build ... ');
  • 16. -  Largest European event for Drupal developers -  Lisbon - https://lisbon2018.drupaldays.org/ -  July 2nd – July 6th - Iscte -  Full week of Drupal and open source talks and sprints! Tickets coming soon . DRUPAL DEV DAYS 2018
  • 17. Or share your alternative or experience? Or walk straight to dinner? QUESTIONS?