SlideShare une entreprise Scribd logo
1  sur  82
Télécharger pour lire hors ligne
APPLICATIONS
CONTINUOUSLY!
DELIVERING
Javier López @loalf
Senior Platform Engineer @Rightster!
formerly Software Architect @TimeOut
Certified Symfony Developer
Zend Certified PHP
Co-organizer @desymfony
DISCLAIMER
AGENDA
CONTINUOUS DELIVERY IN A NUTSHELL
BUILDING THE PIPELINE
BEFORE AND AFTER
1
2
3
CONTINUOUS DELIVERY …
… IN A NUTSHELL
1
COMMIT BUILD TEST DEPLOY
When and how a change in your code is
going to trigger the pipeline
COMMIT BUILD TEST DEPLOY
Check the integrity of your code.
Produce an artifact.
COMMIT BUILD TEST DEPLOY
Check the integrity of your product.
!
After this step you should be 100% confident that
you could deploy your artifact.
COMMIT BUILD TEST DEPLOY
Does what it says on the tin. Triggering this
step should be “a click away”.
Manual
THE BOOK
THE PIPELINE
BUILDING
2
TOOLS!
OF THE TRADE
Github plugin
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
Build Pipeline Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin
BUILDING!
THE PIPELINE
COMMIT BUILD TEST DEPLOY
master
6ebb017
COMMIT BUILD TEST DEPLOY
master
featureA
6ebb017
COMMIT BUILD TEST DEPLOY
master
featureA
6ebb017
PULL REQUEST
COMMIT BUILD TEST DEPLOY
master
featureA
6ebb017 9046c48
COMMIT BUILD TEST DEPLOY
master
featureA
6ebb017 9046c48
BUILD TEST DEPLOY
COMMIT BUILD TEST DEPLOY
1. Check out master branch
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
COMMIT BUILD TEST DEPLOY
—optimizer-­‐autoload  —prefer-­‐dist
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
7. Generate artifact (zip file)
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
7. Generate artifact (zip file)
COMMIT BUILD TEST DEPLOY
discard unnecessary files
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
7. Generate artifact (zip file)
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
7. Generate artifact (zip file)
8. Upload artifact to S3
COMMIT BUILD TEST DEPLOY
1. Check out master branch
2. Generate parameters.ini for each environment
3. Fetch PHP dependencies
4. Run PHPUnit tests
5. Fetch JS dependencies
6. Generate assets (JS, CSS)
7. Generate artifact (zip file)
8. Upload artifact to S3
COMMIT BUILD TEST DEPLOYbuild.xml
<?xml  version="1.0"  encoding="UTF-­‐8"  ?>  
<project  name="Time  Out  Miyagi"  description="Time  Out  Website  V4"  default="build"    
!
    <!-­‐-­‐  Install  PHP  dependencies  (composer)  -­‐-­‐>  
    <target  name="build:php-­‐dependencies"  depends="build:params">  
        <echo  msg="Installing  PHP  dependencies  (composer  install)"  />  
        <exec  command="/opt/composer/composer.phar  install  -­‐-­‐optimize-­‐autoloader  -­‐-­‐prefer-­‐dist"    
                    logoutput="true"    
                    checkreturn=“true"  
        />  
    </target>  
!
    <!-­‐-­‐  Test  JS  &  Generate  JS/CSS  assets  (grunt)  -­‐-­‐>  
    <target  name="build:frontend-­‐dependencies">  
        <echo  msg="Test  JS  and  Generate  JS/CSS  assets  (grunt)"  />  
        <exec  command="npm  install"    
                    logoutput="true"  checkreturn="true"  dir="./web-­‐src"  />  
        <exec  command="xvfb-­‐run  grunt  -­‐-­‐env=dist"    
                    logoutput="true"  checkreturn="true"  dir="./web-­‐src"  />      
    </target>  
     
</project>
build.xml
COMMIT BUILD TEST DEPLOY
Split into two jobs in Jenkins
1. Test deployment script
2. Run automated tests
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
3. Unzip artifact
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
3. Unzip artifact
4. Set right permissions
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
3. Unzip artifact
4. Set right permissions
5. Update virtual host
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
3. Unzip artifact
4. Set right permissions
5. Update virtual host
6. Reload PHP-FPM and nginx
COMMIT BUILD TEST DEPLOY
DEPLOYMENT SCRIPT
1. SSH to QA server
2. Fetch artifact from S3
3. Unzip artifact
4. Set right permissions
5. Update virtual host
6. Reload PHP-FPM and nginx
deploy.yml
-­‐-­‐-­‐  
-­‐  hosts:  qa:beta:prod  
    sudo:  true  
    vars:  
        amazon_bucket  :  "releases-­‐miyagi"  
        base_dir            :  "/var/www/v4.timeout.com"  
        project_dir      :  "{{  base_dir  }}/{{  git_hash  }}"  
        web_dir              :  "{{  project_dir  }}/web"  
    tasks:  
        -­‐  name:  Fetch  artefact  from  S3  
            s3:  bucket={{  amazon_bucket  }}  aws_access_key={{  amazon_key  }}  
aws_secret_key={{  amazon_secret  }}  object={{  git_hash  }}.gzip  dest="{{  project_dir  
}}/{{artefact_zip}}"  mode="get"  
!
        -­‐  name:  Uncompress  zip  file  
            command:  chdir="{{  project_dir  }}"  tar  -­‐xf  {{  artefact_zip  }}  
!
        -­‐  name:  Apply  right  permissions  to  project  root  
            file:  dest="{{  project_dir  }}"  state=directory  mode=0755  group=nginx  
owner=nginx  recurse=true  
          
        -­‐  name:  Restart  PHP-­‐FPM    
            service:  name=php-­‐fpm  state=reloaded
deploy.yml
COMMIT BUILD TEST DEPLOY
RUN AUTOMATED TESTS
COMMIT BUILD TEST DEPLOY
RUN AUTOMATED TESTS
1. Check out 9046c48
COMMIT BUILD TEST DEPLOY
RUN AUTOMATED TESTS
1. Check out 9046c48
2. Fetch PHP dependencies
COMMIT BUILD TEST DEPLOY
RUN AUTOMATED TESTS
1. Check out 9046c48
2. Fetch PHP dependencies
3. Run Behat against QA box
COMMIT BUILD TEST DEPLOY
Split into two jobs in Jenkins
1. Run deployment script (production)
2. Run automated tests against production
BUILD DEPLOY
AUTOMATED!
TESTS
6ebb017
6ebb017
QA
6ebb017
QA
DEPLOY
AUTOMATED!
TESTS
6ebb017
PROD
6ebb017
PROD
6ebb017
6ebb017.zip
BUILD DEPLOY
AUTOMATED!
TESTS
6ebb017
6ebb017
QA
6ebb017
QA
DEPLOY
AUTOMATED!
TESTS
6ebb017
STAGING
6ebb017
STAGING
DEPLOY
AUTOMATED!
TESTS
6ebb017
PROD
6ebb017
PROD
6ebb017
6ebb017.zip
SAFETY NET
TIME
BUILD DEPLOY
AUTOMATED!
TESTS
~3 mins ~30 secs ~5 mins
VISIBILITY
EVERYBODY IN THE TEAM SHOULD BE
AWARE OF THE STATUS OF THE PIPELINE
BUILD DEPLOY
AUTOMATED!
TESTS
9046c48
9046c48
QA
9046c48
QA
9046c48
BUILD DEPLOY
AUTOMATED!
TESTS
6ebb017
6ebb017
QA
6ebb017
QA
6ebb017
BUILD DEPLOY
AUTOMATED!
TESTS
b0b325
b0b325
QA
b0b325
QA
b0b325
BUILD DEPLOY
AUTOMATED!
TESTS
99e6d6
99e6d6
QA
99e6d6
QA
99e6d6
http://www.frisnit.com/internet-of-things-ci-status-lamp/
TRACEABILITY
EVERYBODY SHOULD KNOW WHAT VERSION
IS DEPLOYED IN WHICH ENVIRONMENT
curl  -­‐I  http://www.timeout.com/las-­‐vegas  
!
HTTP/1.1  200  OK  
Server:  nginx/1.4.7  
Vary:  Accept-­‐Encoding  
Cache-­‐Control:  no-­‐cache  
Content-­‐Type:  text/html;  charset=UTF-­‐8  
Date:  Fri,  19  Sep  2014  06:07:29  GMT  
Transfer-­‐Encoding:  chunked  
Access-­‐Control-­‐Allow-­‐Origin:  http://media.timeout.com  
Connection:  Keep-­‐Alive  
X-­‐TIMEOUT-­‐V:  d645127afb423e543d90ab5a7b8eae94f248b137  
X-­‐Powered-­‐By:  PHP/5.5.14
VERSION NUMBER
https://github.com  
              /your-­‐company  
              /your-­‐application  
              /commits  
              /your-­‐git-­‐hash
ROLLING!
BACK
AUTOMATION
YOU’LL NEED!
ALLIES
YOUR ALLIES
DEV TEAM
YOUR ALLIES
DEV TEAM
QA TEAM
YOUR ALLIES
DEV TEAM
QA TEAM
DEVOPS
YOUR ALLIES
DEV TEAM
QA TEAM
DEVOPS
PRODUCT
YOUR ALLIES
DEV TEAM
QA TEAM
DEVOPS
PRODUCT
THE TOP BRASS
YOUR ALLIES
BEFORE AFTER&
3
ONE QA BOX PER FEATURE
SAME QA BOX FOR EVERYONE
BEFORE
AFTER
~ !WEEKS FROM DEVELOPMENT TO RELEASE
~ !DAYS FROM DEVELOPMENT TO RELEASE
BEFORE
AFTER
5 PEOPLE TO RELEASE TO PRODUCTION
1 PERSON TO RELEASE TO PRODUCTION
BEFORE
AFTER
~30 MINUTES TO RUN DEPLOYMENT SCRIPT
~30 SECONDS TO RUN DEPLOYMENT SCRIPT
BEFORE
AFTER
RELEASING WAS AN EVENT
RELEASING NOW A NON-EVENT
BEFORE
AFTER
@loalf

Contenu connexe

Tendances

Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web ApplicationsSeth McLaughlin
 
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt LongLondon Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt LongOpenCredo
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
[CLIW] Web testing
[CLIW] Web testing[CLIW] Web testing
[CLIW] Web testingBogdan Gaza
 
Docker for (Java) Developers
Docker for (Java) DevelopersDocker for (Java) Developers
Docker for (Java) DevelopersRafael Benevides
 
淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)Kyle Lin
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is DockerNick Belhomme
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for DevelopersAntons Kranga
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
oVirt CI Package Managenent
oVirt CI Package ManagenentoVirt CI Package Managenent
oVirt CI Package ManagenentBarak Korren
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 FeatureBo-Yi Wu
 
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...chbornet
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile InfrastructuresAntons Kranga
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersNan Liu
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Bo-Yi Wu
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance testBryan Liu
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins PipelinesSteffen Gebert
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合Kyle Lin
 

Tendances (20)

Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt LongLondon Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
[CLIW] Web testing
[CLIW] Web testing[CLIW] Web testing
[CLIW] Web testing
 
Docker for (Java) Developers
Docker for (Java) DevelopersDocker for (Java) Developers
Docker for (Java) Developers
 
淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)淺談 Geb 網站自動化測試(JCConf 2014)
淺談 Geb 網站自動化測試(JCConf 2014)
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
oVirt CI Package Managenent
oVirt CI Package ManagenentoVirt CI Package Managenent
oVirt CI Package Managenent
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 Feature
 
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance test
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 

En vedette

One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.Javier López
 
PHP Unconference Continuous Integration
PHP Unconference Continuous IntegrationPHP Unconference Continuous Integration
PHP Unconference Continuous IntegrationNils Hofmeister
 
Introducción a Ganglia
Introducción a GangliaIntroducción a Ganglia
Introducción a GangliaDardo Valdez
 
BDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteBDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteJorge Gamba
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsDavid Calavera
 
Alta disponibilidad con MySQL
Alta disponibilidad con MySQLAlta disponibilidad con MySQL
Alta disponibilidad con MySQLDennis Cohn
 
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteSoftware Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteAngel Nuñez
 
Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Anton Babenko
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Ricard Clau
 
Automatizacion de proyectos con gradle
Automatizacion de proyectos con gradleAutomatizacion de proyectos con gradle
Automatizacion de proyectos con gradleEdson Chávez Montaño
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsAdam Culp
 
Introducción a DDD
Introducción a DDDIntroducción a DDD
Introducción a DDDsergiopolo
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesMarcello Duarte
 

En vedette (20)

One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
PHP Unconference Continuous Integration
PHP Unconference Continuous IntegrationPHP Unconference Continuous Integration
PHP Unconference Continuous Integration
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Introducción a Ganglia
Introducción a GangliaIntroducción a Ganglia
Introducción a Ganglia
 
BDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu clienteBDD: Descubriendo qué requiere realmente tu cliente
BDD: Descubriendo qué requiere realmente tu cliente
 
Introducción a LDAP
Introducción a LDAPIntroducción a LDAP
Introducción a LDAP
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y Rails
 
Alta disponibilidad con MySQL
Alta disponibilidad con MySQLAlta disponibilidad con MySQL
Alta disponibilidad con MySQL
 
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo HolísticamenteSoftware Debt: Qué Es y Cómo Gestionarlo Holísticamente
Software Debt: Qué Es y Cómo Gestionarlo Holísticamente
 
Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2
 
OAUTH introducción y entretenida explicación.
OAUTH introducción y entretenida explicación.OAUTH introducción y entretenida explicación.
OAUTH introducción y entretenida explicación.
 
Conferencia Monitoreo de Servidores con Nagios
Conferencia Monitoreo de Servidores con NagiosConferencia Monitoreo de Servidores con Nagios
Conferencia Monitoreo de Servidores con Nagios
 
TDD with phpspec2
TDD with phpspec2TDD with phpspec2
TDD with phpspec2
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Automatizacion de proyectos con gradle
Automatizacion de proyectos con gradleAutomatizacion de proyectos con gradle
Automatizacion de proyectos con gradle
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Integrando sonar
Integrando sonarIntegrando sonar
Integrando sonar
 
Introducción a DDD
Introducción a DDDIntroducción a DDD
Introducción a DDD
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examples
 

Similaire à Continous Delivering a PHP application

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
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
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and LingvokotLingvokot
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and ChefContinous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chefdefrag2
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
End to-end testing from rookie to pro
End to-end testing  from rookie to proEnd to-end testing  from rookie to pro
End to-end testing from rookie to proDomenico Gemoli
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017Mandi Walls
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionJoe Ferguson
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsDECK36
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 

Similaire à Continous Delivering a PHP application (20)

Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
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)
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and ChefContinous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chef
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
End to-end testing from rookie to pro
End to-end testing  from rookie to proEnd to-end testing  from rookie to pro
End to-end testing from rookie to pro
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
 
PHP-VCR behat case study
PHP-VCR behat case studyPHP-VCR behat case study
PHP-VCR behat case study
 
Automation Zaman Now
Automation Zaman NowAutomation Zaman Now
Automation Zaman Now
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 

Plus de Javier López

Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23Javier López
 
Novedades en Symfony 2.3
Novedades en Symfony 2.3Novedades en Symfony 2.3
Novedades en Symfony 2.3Javier López
 
Shifting gears with Composer
Shifting gears with ComposerShifting gears with Composer
Shifting gears with ComposerJavier López
 
Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Javier López
 
Slides components en
Slides components enSlides components en
Slides components enJavier López
 
Symfony y Admin Generator
Symfony y Admin GeneratorSymfony y Admin Generator
Symfony y Admin GeneratorJavier López
 

Plus de Javier López (8)

PHP's FIG and PSRs
PHP's FIG and PSRsPHP's FIG and PSRs
PHP's FIG and PSRs
 
Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23
 
Novedades en Symfony 2.3
Novedades en Symfony 2.3Novedades en Symfony 2.3
Novedades en Symfony 2.3
 
Shifting gears with Composer
Shifting gears with ComposerShifting gears with Composer
Shifting gears with Composer
 
Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2Componentes, el arma secreta de Symfony2
Componentes, el arma secreta de Symfony2
 
Slides components en
Slides components enSlides components en
Slides components en
 
Slides componentes
Slides componentesSlides componentes
Slides componentes
 
Symfony y Admin Generator
Symfony y Admin GeneratorSymfony y Admin Generator
Symfony y Admin Generator
 

Dernier

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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 AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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 WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Continous Delivering a PHP application

  • 2. Javier López @loalf Senior Platform Engineer @Rightster! formerly Software Architect @TimeOut Certified Symfony Developer Zend Certified PHP Co-organizer @desymfony
  • 4. AGENDA CONTINUOUS DELIVERY IN A NUTSHELL BUILDING THE PIPELINE BEFORE AND AFTER 1 2 3
  • 5. CONTINUOUS DELIVERY … … IN A NUTSHELL 1
  • 6. COMMIT BUILD TEST DEPLOY When and how a change in your code is going to trigger the pipeline
  • 7. COMMIT BUILD TEST DEPLOY Check the integrity of your code. Produce an artifact.
  • 8. COMMIT BUILD TEST DEPLOY Check the integrity of your product. ! After this step you should be 100% confident that you could deploy your artifact.
  • 9. COMMIT BUILD TEST DEPLOY Does what it says on the tin. Triggering this step should be “a click away”. Manual
  • 13.
  • 14.
  • 15. Github plugin https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin Build Pipeline Plugin https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin
  • 16.
  • 17.
  • 18.
  • 20. COMMIT BUILD TEST DEPLOY master 6ebb017
  • 21. COMMIT BUILD TEST DEPLOY master featureA 6ebb017
  • 22. COMMIT BUILD TEST DEPLOY master featureA 6ebb017 PULL REQUEST
  • 23. COMMIT BUILD TEST DEPLOY master featureA 6ebb017 9046c48
  • 24. COMMIT BUILD TEST DEPLOY master featureA 6ebb017 9046c48 BUILD TEST DEPLOY
  • 26. 1. Check out master branch COMMIT BUILD TEST DEPLOY
  • 27. 1. Check out master branch 2. Generate parameters.ini for each environment COMMIT BUILD TEST DEPLOY
  • 28. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies COMMIT BUILD TEST DEPLOY
  • 29. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies COMMIT BUILD TEST DEPLOY —optimizer-­‐autoload  —prefer-­‐dist
  • 30. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies COMMIT BUILD TEST DEPLOY
  • 31. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests COMMIT BUILD TEST DEPLOY
  • 32. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies COMMIT BUILD TEST DEPLOY
  • 33. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) COMMIT BUILD TEST DEPLOY
  • 34. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) 7. Generate artifact (zip file) COMMIT BUILD TEST DEPLOY
  • 35. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) 7. Generate artifact (zip file) COMMIT BUILD TEST DEPLOY discard unnecessary files
  • 36. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) 7. Generate artifact (zip file) COMMIT BUILD TEST DEPLOY
  • 37. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) 7. Generate artifact (zip file) 8. Upload artifact to S3 COMMIT BUILD TEST DEPLOY
  • 38. 1. Check out master branch 2. Generate parameters.ini for each environment 3. Fetch PHP dependencies 4. Run PHPUnit tests 5. Fetch JS dependencies 6. Generate assets (JS, CSS) 7. Generate artifact (zip file) 8. Upload artifact to S3 COMMIT BUILD TEST DEPLOYbuild.xml
  • 39. <?xml  version="1.0"  encoding="UTF-­‐8"  ?>   <project  name="Time  Out  Miyagi"  description="Time  Out  Website  V4"  default="build"     !    <!-­‐-­‐  Install  PHP  dependencies  (composer)  -­‐-­‐>      <target  name="build:php-­‐dependencies"  depends="build:params">          <echo  msg="Installing  PHP  dependencies  (composer  install)"  />          <exec  command="/opt/composer/composer.phar  install  -­‐-­‐optimize-­‐autoloader  -­‐-­‐prefer-­‐dist"                        logoutput="true"                        checkreturn=“true"          />      </target>   !    <!-­‐-­‐  Test  JS  &  Generate  JS/CSS  assets  (grunt)  -­‐-­‐>      <target  name="build:frontend-­‐dependencies">          <echo  msg="Test  JS  and  Generate  JS/CSS  assets  (grunt)"  />          <exec  command="npm  install"                        logoutput="true"  checkreturn="true"  dir="./web-­‐src"  />          <exec  command="xvfb-­‐run  grunt  -­‐-­‐env=dist"                        logoutput="true"  checkreturn="true"  dir="./web-­‐src"  />          </target>       </project> build.xml
  • 40. COMMIT BUILD TEST DEPLOY Split into two jobs in Jenkins 1. Test deployment script 2. Run automated tests
  • 41. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT
  • 42. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server
  • 43. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3
  • 44. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3 3. Unzip artifact
  • 45. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3 3. Unzip artifact 4. Set right permissions
  • 46. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3 3. Unzip artifact 4. Set right permissions 5. Update virtual host
  • 47. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3 3. Unzip artifact 4. Set right permissions 5. Update virtual host 6. Reload PHP-FPM and nginx
  • 48. COMMIT BUILD TEST DEPLOY DEPLOYMENT SCRIPT 1. SSH to QA server 2. Fetch artifact from S3 3. Unzip artifact 4. Set right permissions 5. Update virtual host 6. Reload PHP-FPM and nginx deploy.yml
  • 49. -­‐-­‐-­‐   -­‐  hosts:  qa:beta:prod      sudo:  true      vars:          amazon_bucket  :  "releases-­‐miyagi"          base_dir            :  "/var/www/v4.timeout.com"          project_dir      :  "{{  base_dir  }}/{{  git_hash  }}"          web_dir              :  "{{  project_dir  }}/web"      tasks:          -­‐  name:  Fetch  artefact  from  S3              s3:  bucket={{  amazon_bucket  }}  aws_access_key={{  amazon_key  }}   aws_secret_key={{  amazon_secret  }}  object={{  git_hash  }}.gzip  dest="{{  project_dir   }}/{{artefact_zip}}"  mode="get"   !        -­‐  name:  Uncompress  zip  file              command:  chdir="{{  project_dir  }}"  tar  -­‐xf  {{  artefact_zip  }}   !        -­‐  name:  Apply  right  permissions  to  project  root              file:  dest="{{  project_dir  }}"  state=directory  mode=0755  group=nginx   owner=nginx  recurse=true                    -­‐  name:  Restart  PHP-­‐FPM                service:  name=php-­‐fpm  state=reloaded deploy.yml
  • 50. COMMIT BUILD TEST DEPLOY RUN AUTOMATED TESTS
  • 51. COMMIT BUILD TEST DEPLOY RUN AUTOMATED TESTS 1. Check out 9046c48
  • 52. COMMIT BUILD TEST DEPLOY RUN AUTOMATED TESTS 1. Check out 9046c48 2. Fetch PHP dependencies
  • 53. COMMIT BUILD TEST DEPLOY RUN AUTOMATED TESTS 1. Check out 9046c48 2. Fetch PHP dependencies 3. Run Behat against QA box
  • 54. COMMIT BUILD TEST DEPLOY Split into two jobs in Jenkins 1. Run deployment script (production) 2. Run automated tests against production
  • 57. TIME
  • 59. VISIBILITY EVERYBODY IN THE TEAM SHOULD BE AWARE OF THE STATUS OF THE PIPELINE
  • 60. BUILD DEPLOY AUTOMATED! TESTS 9046c48 9046c48 QA 9046c48 QA 9046c48 BUILD DEPLOY AUTOMATED! TESTS 6ebb017 6ebb017 QA 6ebb017 QA 6ebb017 BUILD DEPLOY AUTOMATED! TESTS b0b325 b0b325 QA b0b325 QA b0b325 BUILD DEPLOY AUTOMATED! TESTS 99e6d6 99e6d6 QA 99e6d6 QA 99e6d6
  • 62. TRACEABILITY EVERYBODY SHOULD KNOW WHAT VERSION IS DEPLOYED IN WHICH ENVIRONMENT
  • 63. curl  -­‐I  http://www.timeout.com/las-­‐vegas   ! HTTP/1.1  200  OK   Server:  nginx/1.4.7   Vary:  Accept-­‐Encoding   Cache-­‐Control:  no-­‐cache   Content-­‐Type:  text/html;  charset=UTF-­‐8   Date:  Fri,  19  Sep  2014  06:07:29  GMT   Transfer-­‐Encoding:  chunked   Access-­‐Control-­‐Allow-­‐Origin:  http://media.timeout.com   Connection:  Keep-­‐Alive   X-­‐TIMEOUT-­‐V:  d645127afb423e543d90ab5a7b8eae94f248b137   X-­‐Powered-­‐By:  PHP/5.5.14 VERSION NUMBER
  • 64. https://github.com                /your-­‐company                /your-­‐application                /commits                /your-­‐git-­‐hash
  • 65.
  • 68.
  • 75. DEV TEAM QA TEAM DEVOPS PRODUCT THE TOP BRASS YOUR ALLIES
  • 77. ONE QA BOX PER FEATURE SAME QA BOX FOR EVERYONE BEFORE AFTER
  • 78. ~ !WEEKS FROM DEVELOPMENT TO RELEASE ~ !DAYS FROM DEVELOPMENT TO RELEASE BEFORE AFTER
  • 79. 5 PEOPLE TO RELEASE TO PRODUCTION 1 PERSON TO RELEASE TO PRODUCTION BEFORE AFTER
  • 80. ~30 MINUTES TO RUN DEPLOYMENT SCRIPT ~30 SECONDS TO RUN DEPLOYMENT SCRIPT BEFORE AFTER
  • 81. RELEASING WAS AN EVENT RELEASING NOW A NON-EVENT BEFORE AFTER