SlideShare ist ein Scribd-Unternehmen logo
1 von 75
Downloaden Sie, um offline zu lesen
Rock Solid Deployment
     of PHP Applications
    Pablo Godel @pgodel - www.pfcongres.com
           Sep 15th 2012 - Utrecht, NL
               https://joind.in/7079




Saturday, September 15, 2012
Who Am I?

    ⁃ Born in Argentina, living in the US since 1999
    ⁃ PHP & Symfony developer
    ⁃ Founder of the original PHP mailing list in spanish
    ⁃ Master of the parrilla




Saturday, September 15, 2012
Saturday, September 15, 2012
Saturday, September 15, 2012
ServerGrove!


      ⁃ Founded ServerGrove Networks in 2005

      ⁃ Provider of web hosting specialized in PHP,
        Symfony, ZendFramework, MongoDB and others

      ⁃ Servers in USA and Europe!




Saturday, September 15, 2012
Community is our teacher
            ⁃ Very active open source supporter through code
              contributions and usergroups/conference sponsoring




Saturday, September 15, 2012
Deployment



                                 ?
Saturday, September 15, 2012
Deployment
                Software deployment is all of the activities that make
                a software system available for use.




                               http://en.wikipedia.org/wiki/Software_deployment
Saturday, September 15, 2012
Deployment


                          A very important part of
                          the application life-cycle



Saturday, September 15, 2012
Deployment


                A very important critical part
                of the application life-cycle



Saturday, September 15, 2012
Deployment


                               It should not be an
                                   after thought



Saturday, September 15, 2012
Deployment


                          It should be predictable



Saturday, September 15, 2012
Deployment


                               The more you do it the
                                   better it goes



Saturday, September 15, 2012
Saturday, September 15, 2012
Deployment: Goals




Saturday, September 15, 2012
Deployment: Goals




                 One-click deploys




Saturday, September 15, 2012
Deployment: Goals




                 One-click deploys
              Continuous deploys



Saturday, September 15, 2012
PHP Apps
                               Deployment




Saturday, September 15, 2012
PHP Apps
                               Deployment




Saturday, September 15, 2012
PHP Apps
                               Deployment




Saturday, September 15, 2012
Deployment: Goals




                                         Anytime & Anywhere



Saturday, September 15, 2012
Deployment: Goals




                  Anyone




Saturday, September 15, 2012
Deployment: Goals




                                              Reliable




Saturday, September 15, 2012
Deployment: Goals




                Rollbacks




Saturday, September 15, 2012
Deployment: Goals




                                             No downtime




Saturday, September 15, 2012
Deployment: Goals




                     Reusable




Saturday, September 15, 2012
Deployment: Goals




                                              Scalable




Saturday, September 15, 2012
Deployment: Goals


                          • One-click / continuous deploys
                          • Anytime & Anywhere
                          • Anyone
                          • No downtime
                          • Predictable & Reliable
                          • Rollbacks
                          • Reusable
                          • Scalable

Saturday, September 15, 2012
Deployment Facts




Saturday, September 15, 2012
Deployment: Fact #1

                      Deployment starts with the developer

      • Setup development environment to be as close
        as possible to productions servers
      • Setup test/qa/staging servers
      • Use Vagrant to manage VMs
      • Use Puppet/Chef to manage OS packages/
        configuration



Saturday, September 15, 2012
Deployment: Fact #2

                           Success linked to server OS setup



      • Use Puppet/Chef to manage OS packages/
        configuration
      • Create OS packages for 3rd party software
      • Setup your own package repositories



Saturday, September 15, 2012
Deployment: Fact #3

                                  Monitoring is uptime


      • Use monitoring tools to know what is going on
        with your servers (Ganglia, Cacti, Zabbix, etc.)
      • Add monitoring and metrics to your app
        (Graphite, StatsD, New Relic)
      • Use your logs wisely (Graylog, Logstash, Kibana)


Saturday, September 15, 2012
Deployment Methodologies




Saturday, September 15, 2012
Deployment Methodologies


                    • VIM-style
                    • FTP uploads
                    • rsync
                    • source control (svn, git)
                    • Build tools (ant, phing)
                    • Specialized tools (capistrano, fabric, etc)
                    • Package based (rpm, deb, etc)


Saturday, September 15, 2012
Web Apps Deployment:
                        Steps overview




Saturday, September 15, 2012
Web Apps Deployment:
                          First time


                       • Copy files to server(s)
                       • Set server-side configurations
                       • Load DB fixtures
                       • Process and install assets
                       • Warm up cache
                       • “Enable” site


Saturday, September 15, 2012
Web Apps Deployment:
                       Subsequent times


                         • Copy files to server(s)
                         • Apply DB updates (migrations)
                         • Process and install assets
                         • Warm up cache
                         • “Enable” site


Saturday, September 15, 2012
Deployment: Challenges




Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Fast & reliable copy of files


      Solutions:
      • rsync
      • git pull
      • setup git repo on local network to save
        bandwidth and avoid issues if git server is down
        (i.e. github)

Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Scalable


      Solutions:
      • use a tool that allows to go from 1 to n servers
        easily (i.e. capistrano)
      • pssh allows to send commands to n servers in
        parallel
      • package your app in OS packages
        like .rpm/.deb to easily install across n servers
Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Rollbacks


      Solutions:
      • test!
      • tag releases
      • dedicated branches (master for production)
      • deploy each release in its own directory


Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Secure


      Solutions:
      • use ssh based connections
      • donʼt store passwords on source control
      • store sensitive strings (passwords) in server
        environment variables


Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      DB migrations


      Solutions:
      • Doctrine Migrations
      • Consider document oriented DBs like
        MongoDB

        “The best migrations are the ones you don’t have to do”

Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Static assets


       Solutions:
       • YUICompress shrinks JS and CSS file sizes
       • Enable web server compression
       • Add versioning to static assets links (code.js?v=1)
       • Assetic combines multiple files into one
       • Run utilities locally or in a staging server, deploy
         result
Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      Caching


       Solutions:
      • Update one server while others handle load
      • Group servers and update group at a time
      • execute commands on “finalize” to clear up APC
           cache


Saturday, September 15, 2012
Deployment: Challenges

      Challenge:
      File permission conflicts


       Solutions:
       • Run Apache/PHP with same user
       • Use php-fpm instead of mod_php
       • Create “deploy” user and add web server to the
         group
       • Use setfacl to give write access to multiple users

Saturday, September 15, 2012
PHP Apps Deployment:
                     Other common pitfalls




Saturday, September 15, 2012
PHP Apps Deployment:
                     Other common pitfalls
        • Case sensitive filesystems
        • Configuration differences
        • Outdated 3rd party software
        • Github down

        $ git daemon --base-path=/git/repo/path/ --
        export-all

        $ git clone git://127.0.0.1/repo

                               http://ozmm.org/posts/when_github_goes_down.html
Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples




Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                    Simplest continuous deployment ever!
    hook.php
         <?php

         exec(ʻ/usr/bin/env -i HOME=/var/www git pullʼ);
         echo “All done!”;


                               screenshot


Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                          Capistrano

                      • Ruby based
                      • Very extensible
                      • Large number of extensions
                      • Simple client side installation


                               $ gem install capistrano


Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                               Capistrano

    set :application, "myapp" # Application name
    set :deploy_to, "/var/www/myapp"

    set :user, "deployer"
    set :use_sudo, false # sudo isn't required

    set :deploy_via, :remote_cache
    set :repository, "git@github.com:user/repo.git"

    role :web, "server.example.com", “server2.example.com”

Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                         Capistrano




                               $ cap deploy
                               $ cap deploy:migrations
                               $ cap deploy:rollback




Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                               Capifony (Symfony2)

                     • Extension of Capistrano
                     • Implements lots of needed features
                       for Symfony
                     • Great documentation




Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                    Capifony (Symfony2)




                               $ capifony .




Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                               Capifony (Symfony2)
    set :keep_releases, 3

    # directories that will be shared between all deployments
    set :shared_children, [ app_path + "/logs", web_path + "/
    uploads"]

    set :update_vendors, true
    # set :use_composer, true

    set :dump_assetic_assets, true


Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                    Capifony (Symfony2)




                               $ cap deploy:setup




Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                     Capifony (Symfony2)


                               |-- httpdocs
                               | `-- index.php
                               |-- releases
                               `-- shared
                                   |-- logs
                                   `-- uploads

                               5 directories, 1 file
Saturday, September 15, 2012
PHP Apps Deployment:
                           Examples
                                    Capifony (Symfony2)




                               $ cap deploy
                               $ cap deploy:migrations
                               $ cap deploy:rollback




Saturday, September 15, 2012
PHP Apps Deployment:
                         Other options

                      • Fabric
                      • WePloy
                      • Phing
                      • Magallanes
                      • Jenkins




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                               App Metrics: StatsD & Graphite




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                               Logging: Logstash
                Ship logs from any source, parse them, get the right
                timestamp, index them, and search them




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                                 Logging: Logstash
 Configure Apache to log json
  LogFormat "{ "@timestamp": "%{%Y-%m-%dT%H:%M:%S%z}t", "@fields": { "client": "%a",
  "duration_usec": %D, "status": %s, "request": "%U%q", "method": "%m", "referrer": "%
  {Referer}i" } }" logstash_json


  # Write our 'logstash_json' logs to logs/access_json.log
  CustomLog logs/access_json.log logstash_json




  Result
  { "@timestamp": "2012-08-22T14:35:19-0700", "client": "127.0.0.1",
  "duration_usec": 532, "status": 404, "request": "/favicon.ico",
  "method": "GET", "referrer": "-" }



Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                               Logging: Graylog




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                               Logging: Kibana
  Kibana is a user friendly way to view, search and visualize
  your log data




Saturday, September 15, 2012
PHP Apps Deployment:
                            Tools
                                       Packaging: fpm
             Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.



               fpm -s dir -t rpm -n "myapp" -v 1.0 /var/www/myapp

               fpm -s dir -t deb -a all -n myapp -v 1.0 /etc/apache2/
               conf.d/my.conf /var/www/myapp



                               https://github.com/jordansissel/fpm

Saturday, September 15, 2012
PHP Apps Deployment:
                        Time for demo




Saturday, September 15, 2012
PHP Apps Deployment:
                           Summary




Saturday, September 15, 2012
•Stop using FTP



Saturday, September 15, 2012
•Stop using FTP
                               •Plan early



Saturday, September 15, 2012
•Stop using FTP
                               •Plan early
                               •Practice


Saturday, September 15, 2012
•Stop using FTP
                               •Plan early
                               •Practice
                               •Monitor


Saturday, September 15, 2012
•Stop using FTP
                               •Plan early
                               •Practice
                               •Monitor
                               •AUTOMATE!

Saturday, September 15, 2012
Thank you!
                               QUESTIONS?




                Rate Me Please! https://joind.in/7079
                     Slides: http://slideshare.net/pgodel
                              Twitter: @pgodel
                      E-mail: pablo@servergrove.com
Saturday, September 15, 2012

Weitere ähnliche Inhalte

Andere mochten auch

The Summer University in Vienna
The Summer University in Vienna The Summer University in Vienna
The Summer University in Vienna presidentaegeewien
 
Mff715 s2 w1 scientific reasoning
Mff715 s2 w1 scientific reasoningMff715 s2 w1 scientific reasoning
Mff715 s2 w1 scientific reasoningRachel Chung
 
Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014futureagricultures
 
There is no accidental DBA
There is no accidental DBAThere is no accidental DBA
There is no accidental DBAWally Pons
 
Colors scramble 2
Colors scramble 2Colors scramble 2
Colors scramble 2Les Davy
 
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis Dinamis
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis DinamisPengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis Dinamis
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis DinamisKagarasomaru
 
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITACANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITALHA Lou
 
The Next Big Thing
The  Next  Big  ThingThe  Next  Big  Thing
The Next Big Thingnick.shaw
 
366/14 MediaKey /// Creatività: Made in Tunnel Studios
366/14 MediaKey /// Creatività: Made in Tunnel Studios366/14 MediaKey /// Creatività: Made in Tunnel Studios
366/14 MediaKey /// Creatività: Made in Tunnel StudiosTunnel Studios
 

Andere mochten auch (20)

The Summer University in Vienna
The Summer University in Vienna The Summer University in Vienna
The Summer University in Vienna
 
Mff715 s2 w1 scientific reasoning
Mff715 s2 w1 scientific reasoningMff715 s2 w1 scientific reasoning
Mff715 s2 w1 scientific reasoning
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
3 dni w oświęcimiu
3 dni w oświęcimiu3 dni w oświęcimiu
3 dni w oświęcimiu
 
Assignment
AssignmentAssignment
Assignment
 
Canadas beauty
Canadas beautyCanadas beauty
Canadas beauty
 
Issue 8 April 2011
Issue 8 April 2011Issue 8 April 2011
Issue 8 April 2011
 
Erikson
EriksonErikson
Erikson
 
Slide share test 110727
Slide share test 110727Slide share test 110727
Slide share test 110727
 
Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014
 
There is no accidental DBA
There is no accidental DBAThere is no accidental DBA
There is no accidental DBA
 
Colors scramble 2
Colors scramble 2Colors scramble 2
Colors scramble 2
 
01 05-14
01 05-1401 05-14
01 05-14
 
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis Dinamis
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis DinamisPengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis Dinamis
Pengantar Bisnis Bab 1 : Mengelola Lingkungan Bisnis Dinamis
 
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITACANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
 
The Next Big Thing
The  Next  Big  ThingThe  Next  Big  Thing
The Next Big Thing
 
M robby f_mi2b_tugas 2
M robby f_mi2b_tugas 2M robby f_mi2b_tugas 2
M robby f_mi2b_tugas 2
 
ไฟฟ้า
ไฟฟ้าไฟฟ้า
ไฟฟ้า
 
366/14 MediaKey /// Creatività: Made in Tunnel Studios
366/14 MediaKey /// Creatività: Made in Tunnel Studios366/14 MediaKey /// Creatività: Made in Tunnel Studios
366/14 MediaKey /// Creatività: Made in Tunnel Studios
 
DK03 NL
DK03 NLDK03 NL
DK03 NL
 

Ähnlich wie PFCongres 2012 - Rock Solid Deployment of PHP Apps

Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXoArnaud Héritier
 
Quinn beginning wordpress_2012
Quinn beginning wordpress_2012Quinn beginning wordpress_2012
Quinn beginning wordpress_2012Sara Quinn
 
Codeworks'12 Rock Solid Deployment of PHP Apps
Codeworks'12 Rock Solid Deployment of PHP AppsCodeworks'12 Rock Solid Deployment of PHP Apps
Codeworks'12 Rock Solid Deployment of PHP AppsPablo Godel
 
Phingified ci and deployment strategies ipc 2012
Phingified ci and deployment strategies ipc 2012Phingified ci and deployment strategies ipc 2012
Phingified ci and deployment strategies ipc 2012TEQneers GmbH & Co. KG
 
Tame your test environment with Docker Compose
Tame your test environment with Docker ComposeTame your test environment with Docker Compose
Tame your test environment with Docker ComposeKevin Bell
 
Diseño de APIs con Ruby
Diseño de APIs con RubyDiseño de APIs con Ruby
Diseño de APIs con RubySoftware Guru
 
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesAmazon Web Services
 
oEmbed in Drupal
oEmbed in DrupaloEmbed in Drupal
oEmbed in DrupalPure Sign
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlottebotsplash.com
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps TransformationDeborah Schalm
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps TransformationDevOps.com
 
Marcopolo | Expertise for business communication
Marcopolo | Expertise for business communicationMarcopolo | Expertise for business communication
Marcopolo | Expertise for business communicationAndrea Ioppolo
 
Running open source PHP applications on you IBM i
Running open source PHP applications on you IBM iRunning open source PHP applications on you IBM i
Running open source PHP applications on you IBM iProximity Group
 
Project a day 2 introduction to android studio
Project a day 2   introduction to android studioProject a day 2   introduction to android studio
Project a day 2 introduction to android studioGoran Djonovic
 
Android build process (1)
Android build process (1)Android build process (1)
Android build process (1)Shubham Goyal
 
Information Management with Redmine
Information Management with RedmineInformation Management with Redmine
Information Management with RedmineVu Hung Nguyen
 
Sfd2012Hanoi - Nguyễn Vũ Hưng: Information/Project Management with Redmine
Sfd2012Hanoi  - Nguyễn Vũ Hưng: Information/Project Management with RedmineSfd2012Hanoi  - Nguyễn Vũ Hưng: Information/Project Management with Redmine
Sfd2012Hanoi - Nguyễn Vũ Hưng: Information/Project Management with RedmineVu Hung Nguyen
 
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with Redmine
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with RedmineSfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with Redmine
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with RedmineVu Hung Nguyen
 

Ähnlich wie PFCongres 2012 - Rock Solid Deployment of PHP Apps (20)

Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXo
 
Quinn beginning wordpress_2012
Quinn beginning wordpress_2012Quinn beginning wordpress_2012
Quinn beginning wordpress_2012
 
Codeworks'12 Rock Solid Deployment of PHP Apps
Codeworks'12 Rock Solid Deployment of PHP AppsCodeworks'12 Rock Solid Deployment of PHP Apps
Codeworks'12 Rock Solid Deployment of PHP Apps
 
Phingified ci and deployment strategies ipc 2012
Phingified ci and deployment strategies ipc 2012Phingified ci and deployment strategies ipc 2012
Phingified ci and deployment strategies ipc 2012
 
Tame your test environment with Docker Compose
Tame your test environment with Docker ComposeTame your test environment with Docker Compose
Tame your test environment with Docker Compose
 
Diseño de APIs con Ruby
Diseño de APIs con RubyDiseño de APIs con Ruby
Diseño de APIs con Ruby
 
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
 
oEmbed in Drupal
oEmbed in DrupaloEmbed in Drupal
oEmbed in Drupal
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps Transformation
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps Transformation
 
Marcopolo | Expertise for business communication
Marcopolo | Expertise for business communicationMarcopolo | Expertise for business communication
Marcopolo | Expertise for business communication
 
Gerrit Workshop
Gerrit WorkshopGerrit Workshop
Gerrit Workshop
 
Running open source PHP applications on you IBM i
Running open source PHP applications on you IBM iRunning open source PHP applications on you IBM i
Running open source PHP applications on you IBM i
 
Project a day 2 introduction to android studio
Project a day 2   introduction to android studioProject a day 2   introduction to android studio
Project a day 2 introduction to android studio
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Android build process (1)
Android build process (1)Android build process (1)
Android build process (1)
 
Information Management with Redmine
Information Management with RedmineInformation Management with Redmine
Information Management with Redmine
 
Sfd2012Hanoi - Nguyễn Vũ Hưng: Information/Project Management with Redmine
Sfd2012Hanoi  - Nguyễn Vũ Hưng: Information/Project Management with RedmineSfd2012Hanoi  - Nguyễn Vũ Hưng: Information/Project Management with Redmine
Sfd2012Hanoi - Nguyễn Vũ Hưng: Information/Project Management with Redmine
 
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with Redmine
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with RedmineSfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with Redmine
Sfd2012 Hanoi Nguyễn Vũ Hưng - Information Management with Redmine
 

Mehr von Pablo Godel

SymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSkySymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSkyPablo Godel
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkySymfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkyPablo Godel
 
DeSymfony 2017 - Symfony en OpenSky
DeSymfony 2017 - Symfony en OpenSkyDeSymfony 2017 - Symfony en OpenSky
DeSymfony 2017 - Symfony en OpenSkyPablo Godel
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
La Caja de Herramientas del Desarrollador Moderno PHPConferenceARLa Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
La Caja de Herramientas del Desarrollador Moderno PHPConferenceARPablo Godel
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...Pablo Godel
 
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balasPHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balasPablo Godel
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsphp[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsPablo Godel
 
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP DevelopersLone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP DevelopersPablo Godel
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AngleLone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AnglePablo Godel
 
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
deSymfony 2013 -  Creando aplicaciones web desde otro ángulo con Symfony y A...deSymfony 2013 -  Creando aplicaciones web desde otro ángulo con Symfony y A...
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...Pablo Godel
 
Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Pablo Godel
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and SymfonyTek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and SymfonyPablo Godel
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSPablo Godel
 
Soflophp 2013 - SysAdmin skills for PHP developers
Soflophp 2013 - SysAdmin skills for PHP developersSoflophp 2013 - SysAdmin skills for PHP developers
Soflophp 2013 - SysAdmin skills for PHP developersPablo Godel
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013 Pablo Godel
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 

Mehr von Pablo Godel (20)

SymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSkySymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSky
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSkySymfony Live San Francisco 2017 - Symfony @ OpenSky
Symfony Live San Francisco 2017 - Symfony @ OpenSky
 
DeSymfony 2017 - Symfony en OpenSky
DeSymfony 2017 - Symfony en OpenSkyDeSymfony 2017 - Symfony en OpenSky
DeSymfony 2017 - Symfony en OpenSky
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
La Caja de Herramientas del Desarrollador Moderno PHPConferenceARLa Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
 
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balasPHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP appsphp[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
 
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP DevelopersLone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AngleLone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New Angle
 
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
deSymfony 2013 -  Creando aplicaciones web desde otro ángulo con Symfony y A...deSymfony 2013 -  Creando aplicaciones web desde otro ángulo con Symfony y A...
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
 
Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and SymfonyTek13 - Creating Mobile Apps with PHP and Symfony
Tek13 - Creating Mobile Apps with PHP and Symfony
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
Soflophp 2013 - SysAdmin skills for PHP developers
Soflophp 2013 - SysAdmin skills for PHP developersSoflophp 2013 - SysAdmin skills for PHP developers
Soflophp 2013 - SysAdmin skills for PHP developers
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 

Kürzlich hochgeladen

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
[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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 

Kürzlich hochgeladen (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
[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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 

PFCongres 2012 - Rock Solid Deployment of PHP Apps

  • 1. Rock Solid Deployment of PHP Applications Pablo Godel @pgodel - www.pfcongres.com Sep 15th 2012 - Utrecht, NL https://joind.in/7079 Saturday, September 15, 2012
  • 2. Who Am I? ⁃ Born in Argentina, living in the US since 1999 ⁃ PHP & Symfony developer ⁃ Founder of the original PHP mailing list in spanish ⁃ Master of the parrilla Saturday, September 15, 2012
  • 5. ServerGrove! ⁃ Founded ServerGrove Networks in 2005 ⁃ Provider of web hosting specialized in PHP, Symfony, ZendFramework, MongoDB and others ⁃ Servers in USA and Europe! Saturday, September 15, 2012
  • 6. Community is our teacher ⁃ Very active open source supporter through code contributions and usergroups/conference sponsoring Saturday, September 15, 2012
  • 7. Deployment ? Saturday, September 15, 2012
  • 8. Deployment Software deployment is all of the activities that make a software system available for use. http://en.wikipedia.org/wiki/Software_deployment Saturday, September 15, 2012
  • 9. Deployment A very important part of the application life-cycle Saturday, September 15, 2012
  • 10. Deployment A very important critical part of the application life-cycle Saturday, September 15, 2012
  • 11. Deployment It should not be an after thought Saturday, September 15, 2012
  • 12. Deployment It should be predictable Saturday, September 15, 2012
  • 13. Deployment The more you do it the better it goes Saturday, September 15, 2012
  • 16. Deployment: Goals One-click deploys Saturday, September 15, 2012
  • 17. Deployment: Goals One-click deploys Continuous deploys Saturday, September 15, 2012
  • 18. PHP Apps Deployment Saturday, September 15, 2012
  • 19. PHP Apps Deployment Saturday, September 15, 2012
  • 20. PHP Apps Deployment Saturday, September 15, 2012
  • 21. Deployment: Goals Anytime & Anywhere Saturday, September 15, 2012
  • 22. Deployment: Goals Anyone Saturday, September 15, 2012
  • 23. Deployment: Goals Reliable Saturday, September 15, 2012
  • 24. Deployment: Goals Rollbacks Saturday, September 15, 2012
  • 25. Deployment: Goals No downtime Saturday, September 15, 2012
  • 26. Deployment: Goals Reusable Saturday, September 15, 2012
  • 27. Deployment: Goals Scalable Saturday, September 15, 2012
  • 28. Deployment: Goals • One-click / continuous deploys • Anytime & Anywhere • Anyone • No downtime • Predictable & Reliable • Rollbacks • Reusable • Scalable Saturday, September 15, 2012
  • 30. Deployment: Fact #1 Deployment starts with the developer • Setup development environment to be as close as possible to productions servers • Setup test/qa/staging servers • Use Vagrant to manage VMs • Use Puppet/Chef to manage OS packages/ configuration Saturday, September 15, 2012
  • 31. Deployment: Fact #2 Success linked to server OS setup • Use Puppet/Chef to manage OS packages/ configuration • Create OS packages for 3rd party software • Setup your own package repositories Saturday, September 15, 2012
  • 32. Deployment: Fact #3 Monitoring is uptime • Use monitoring tools to know what is going on with your servers (Ganglia, Cacti, Zabbix, etc.) • Add monitoring and metrics to your app (Graphite, StatsD, New Relic) • Use your logs wisely (Graylog, Logstash, Kibana) Saturday, September 15, 2012
  • 34. Deployment Methodologies • VIM-style • FTP uploads • rsync • source control (svn, git) • Build tools (ant, phing) • Specialized tools (capistrano, fabric, etc) • Package based (rpm, deb, etc) Saturday, September 15, 2012
  • 35. Web Apps Deployment: Steps overview Saturday, September 15, 2012
  • 36. Web Apps Deployment: First time • Copy files to server(s) • Set server-side configurations • Load DB fixtures • Process and install assets • Warm up cache • “Enable” site Saturday, September 15, 2012
  • 37. Web Apps Deployment: Subsequent times • Copy files to server(s) • Apply DB updates (migrations) • Process and install assets • Warm up cache • “Enable” site Saturday, September 15, 2012
  • 39. Deployment: Challenges Challenge: Fast & reliable copy of files Solutions: • rsync • git pull • setup git repo on local network to save bandwidth and avoid issues if git server is down (i.e. github) Saturday, September 15, 2012
  • 40. Deployment: Challenges Challenge: Scalable Solutions: • use a tool that allows to go from 1 to n servers easily (i.e. capistrano) • pssh allows to send commands to n servers in parallel • package your app in OS packages like .rpm/.deb to easily install across n servers Saturday, September 15, 2012
  • 41. Deployment: Challenges Challenge: Rollbacks Solutions: • test! • tag releases • dedicated branches (master for production) • deploy each release in its own directory Saturday, September 15, 2012
  • 42. Deployment: Challenges Challenge: Secure Solutions: • use ssh based connections • donʼt store passwords on source control • store sensitive strings (passwords) in server environment variables Saturday, September 15, 2012
  • 43. Deployment: Challenges Challenge: DB migrations Solutions: • Doctrine Migrations • Consider document oriented DBs like MongoDB “The best migrations are the ones you don’t have to do” Saturday, September 15, 2012
  • 44. Deployment: Challenges Challenge: Static assets Solutions: • YUICompress shrinks JS and CSS file sizes • Enable web server compression • Add versioning to static assets links (code.js?v=1) • Assetic combines multiple files into one • Run utilities locally or in a staging server, deploy result Saturday, September 15, 2012
  • 45. Deployment: Challenges Challenge: Caching Solutions: • Update one server while others handle load • Group servers and update group at a time • execute commands on “finalize” to clear up APC cache Saturday, September 15, 2012
  • 46. Deployment: Challenges Challenge: File permission conflicts Solutions: • Run Apache/PHP with same user • Use php-fpm instead of mod_php • Create “deploy” user and add web server to the group • Use setfacl to give write access to multiple users Saturday, September 15, 2012
  • 47. PHP Apps Deployment: Other common pitfalls Saturday, September 15, 2012
  • 48. PHP Apps Deployment: Other common pitfalls • Case sensitive filesystems • Configuration differences • Outdated 3rd party software • Github down $ git daemon --base-path=/git/repo/path/ -- export-all $ git clone git://127.0.0.1/repo http://ozmm.org/posts/when_github_goes_down.html Saturday, September 15, 2012
  • 49. PHP Apps Deployment: Examples Saturday, September 15, 2012
  • 50. PHP Apps Deployment: Examples Simplest continuous deployment ever! hook.php <?php exec(ʻ/usr/bin/env -i HOME=/var/www git pullʼ); echo “All done!”; screenshot Saturday, September 15, 2012
  • 51. PHP Apps Deployment: Examples Capistrano • Ruby based • Very extensible • Large number of extensions • Simple client side installation $ gem install capistrano Saturday, September 15, 2012
  • 52. PHP Apps Deployment: Examples Capistrano set :application, "myapp" # Application name set :deploy_to, "/var/www/myapp" set :user, "deployer" set :use_sudo, false # sudo isn't required set :deploy_via, :remote_cache set :repository, "git@github.com:user/repo.git" role :web, "server.example.com", “server2.example.com” Saturday, September 15, 2012
  • 53. PHP Apps Deployment: Examples Capistrano $ cap deploy $ cap deploy:migrations $ cap deploy:rollback Saturday, September 15, 2012
  • 54. PHP Apps Deployment: Examples Capifony (Symfony2) • Extension of Capistrano • Implements lots of needed features for Symfony • Great documentation Saturday, September 15, 2012
  • 55. PHP Apps Deployment: Examples Capifony (Symfony2) $ capifony . Saturday, September 15, 2012
  • 56. PHP Apps Deployment: Examples Capifony (Symfony2) set :keep_releases, 3 # directories that will be shared between all deployments set :shared_children, [ app_path + "/logs", web_path + "/ uploads"] set :update_vendors, true # set :use_composer, true set :dump_assetic_assets, true Saturday, September 15, 2012
  • 57. PHP Apps Deployment: Examples Capifony (Symfony2) $ cap deploy:setup Saturday, September 15, 2012
  • 58. PHP Apps Deployment: Examples Capifony (Symfony2) |-- httpdocs | `-- index.php |-- releases `-- shared |-- logs `-- uploads 5 directories, 1 file Saturday, September 15, 2012
  • 59. PHP Apps Deployment: Examples Capifony (Symfony2) $ cap deploy $ cap deploy:migrations $ cap deploy:rollback Saturday, September 15, 2012
  • 60. PHP Apps Deployment: Other options • Fabric • WePloy • Phing • Magallanes • Jenkins Saturday, September 15, 2012
  • 61. PHP Apps Deployment: Tools Saturday, September 15, 2012
  • 62. PHP Apps Deployment: Tools App Metrics: StatsD & Graphite Saturday, September 15, 2012
  • 63. PHP Apps Deployment: Tools Logging: Logstash Ship logs from any source, parse them, get the right timestamp, index them, and search them Saturday, September 15, 2012
  • 64. PHP Apps Deployment: Tools Logging: Logstash Configure Apache to log json LogFormat "{ "@timestamp": "%{%Y-%m-%dT%H:%M:%S%z}t", "@fields": { "client": "%a", "duration_usec": %D, "status": %s, "request": "%U%q", "method": "%m", "referrer": "% {Referer}i" } }" logstash_json # Write our 'logstash_json' logs to logs/access_json.log CustomLog logs/access_json.log logstash_json Result { "@timestamp": "2012-08-22T14:35:19-0700", "client": "127.0.0.1", "duration_usec": 532, "status": 404, "request": "/favicon.ico", "method": "GET", "referrer": "-" } Saturday, September 15, 2012
  • 65. PHP Apps Deployment: Tools Logging: Graylog Saturday, September 15, 2012
  • 66. PHP Apps Deployment: Tools Logging: Kibana Kibana is a user friendly way to view, search and visualize your log data Saturday, September 15, 2012
  • 67. PHP Apps Deployment: Tools Packaging: fpm Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity. fpm -s dir -t rpm -n "myapp" -v 1.0 /var/www/myapp fpm -s dir -t deb -a all -n myapp -v 1.0 /etc/apache2/ conf.d/my.conf /var/www/myapp https://github.com/jordansissel/fpm Saturday, September 15, 2012
  • 68. PHP Apps Deployment: Time for demo Saturday, September 15, 2012
  • 69. PHP Apps Deployment: Summary Saturday, September 15, 2012
  • 70. •Stop using FTP Saturday, September 15, 2012
  • 71. •Stop using FTP •Plan early Saturday, September 15, 2012
  • 72. •Stop using FTP •Plan early •Practice Saturday, September 15, 2012
  • 73. •Stop using FTP •Plan early •Practice •Monitor Saturday, September 15, 2012
  • 74. •Stop using FTP •Plan early •Practice •Monitor •AUTOMATE! Saturday, September 15, 2012
  • 75. Thank you! QUESTIONS? Rate Me Please! https://joind.in/7079 Slides: http://slideshare.net/pgodel Twitter: @pgodel E-mail: pablo@servergrove.com Saturday, September 15, 2012