SlideShare a Scribd company logo
1 of 35
Download to read offline
PHP Deployment with
Subversion
 Lorna Mitchell



                       Ibuildings
                  The PHP Professionals




                                          Ibuildings
About Me
•   Lorna Mitchell
•   PHP Developer/Consultant/Trainer with Ibuildings
•   ZCE
•   Member of http://www.phpwomen.org
•   Personal blog at http://www.lornajane.net




                                                       2
SVN and Deployment
 •   Deployment process
 •   Deployment mechanism
 •   Subversion
 •   Other tools




                            3
In The Beginning

 •   One Developer
 •   Code on PC
 •   FTP / SCP / Upload to live server
 •   It works!




                                         4
Early Development Team

 • More developers
 • Development server
 • Ideally one copy per developer, a testing/staging
   server and a live platform

                                                    Dev
                      LIVE                          area


                                             Dev
                                    Dev
                                             area
                                    area
       Staging
                                      Dev      Dev
                                      area     area


                                                           5
Deployment Considerations

 • Multiple platforms prompt context-aware
   configuration
 • File permissions may need checking, for example
   on cache directories
 • If the live site has uploaded files stored in the file
   system, need to preserve this content
 • Compile step for initialising compiled templates or
   populating caches




                                                            6
Deployment Plan

 • A deployment plan is a recipe for moving code
 • Step-by-step instructions for setting up a new
   version of code
 • Must always be accompanied by a rollback plan
 • This process should be as automated as possible




                                                     7
Example Deployment Plan

 • Avoid missing steps when putting live

             Export from repository
             Tar




                           Upload




             Untar
             Set permissions
             Switch symlinks



                                           8
Symlinks

                       Live-site (symlink)




  Existing live code                    New code version




  existing                              ready
                                        preparing



                                                           9
Code Transport

 •   Copy development code to live
 •   Rsync development code to live
 •   Check out to live and update
 •   Export to live
 •   Patch changes from last live version only – requires
     version meta-data




                                                       10
Commit Hooks
 • Subversion can run scripts on given events, called
   “commit hooks”
      Pre-commit
      Post-commit
 •   Run test suite
 •   Coding standards conformance
 •   Syntax check
 •   No “forgetting” any steps




                                                    11
Notifications
 • Can use the commit hooks to trigger information
 • Email team
    Diff
    Changes
    Test coverage/outcomes
 • Ticker/big screen
 • Nabaztag




                                                     12
Source Control Packages
 •   Subversion http://subversion.tigris.org
 •   CVS http://www.cvshome.org
 •   GIT http://git.or.cz
 •   Bazaar http://bazaar-vcs.org
 •   Visual Source Safe




                                               13
Source Control Clients

 •   Command line tools
 •   TortoiseSVN: http://tortoise.tigris.org
 •   IDE Plugins: for Zend Studio, Komodo, etc
 •   WebSVN: http://websvn.tigris.org
      SFM (Safe For Managers)
 • Trac: http://trac.edgewall.org/




                                                 14
Source Control Concepts

 •   Individuals communicate with repository
 •   Keeping place
 •   Collaboration tool
 •   Historic versions




                                               15
Collaboration
 • Two people operate on different files
     Changes are combined
 • Two people change the same file
     Changes are merged if changes don't overlap
 • Allows teams to easily work on different parts of
   the system




                                                       16
Collaboration Example

                $greeting = 'hello world';
                echo $greeting;




  $greeting = 'hey people';     $greeting = 'hello world';
  echo $greeting;               print $greeting;




                   $greeting = 'hey people';
                   print $greeting;

                                                             17
Conflicts

 • Two people edit the same part of the same file
     Includes both adding a new method to the end of a class
 • Subversion will notify you of the conflict and
   provide:
     Your most recent version
     The version from the repository
     Its best guess at a merge with some notation for where
      the overlaps are




                                                               18
Conflict Example

                $greeting = 'hello world';
                echo $greeting;


  $greeting = 'hey people';   $greeting = 'hi universe';
  echo $greeting;             echo $greeting;




         $greeting = 'hey people';
         echo $greeting;




                                                           19
Conflict Example

  greeting.php                 greeting.php.r365
  <<<<<<< .mine                $greeting = 'hello world';
  $greeting = 'hi universe';   echo $greeting;
  =======
  $greeting = 'hey people';
  >>>>>>> .r366
  echo $greeting;


  greeting.php.mine            greeting.php.r366
  $greeting = 'hi universe';   $greeting = 'hey people';
  echo $greeting;              echo $greeting;


 • Correct greeting.php and then let Subversion know
   you have resolved the conflict

                                                            20
Branching




            21
Branching Example

                              trunk
                version 1.1
                                      Development done,
                                       merge in changes
                version 1.2

                                           development branch

      bug fix




                                               Delete extra
                                                 branch
   bug fix
   backport

                                                                22
Tagging Versions
 • Source control tools allow you to label releases,
   called “tags”
 • Subversion has one revision number for a whole
   repository, incrementing on every commit
 • CVS has one revision number per file
 • In either case its nice to have “client preview” or
   “release 4.11” as human readable markers




                                                         23
Repository Structure

 •   Repository layout choices
 •   Deployment point choices
 •   Affected by process
 •   Dependent on product type




                                 24
Cyclic Releases

 •   Periodic release cycle
 •   Need to maintain existing version
 •   Start developing new version
 •   May need to fix bugs in both versions
 •   Use branching




                                             25
Continuous Releases
 • Changes to branch
 • Branch merged to trunk
 • Can patch changes from branch to trunk for bug
   fixes
 • Deployment from trunk




                                                    26
Branch Deployment

                       trunk
         version 1.1

                       development branch

         version 1.2




                        testing


                                       deployment!




                                                     27
Live Branch

 •   Changes to branch
 •   Branch merged to trunk
 •   Testing performed on trunk
 •   Changes then patched to live branch
 •   Deployment from live branch




                                           28
Live Branch Deployment

          trunk          live branch


          development branch




           testing
                                       deployment!



                     approved
                      changes
                                               29
Database Versioning
 • Copying exported versions around
    Risk losing live data
 • Make structure changes to all platforms
    Put objects in scripts
 • Simple patching strategy
      No direct database operations
      Numbered patch files in subversion
      Include patches in script
      Give database awareness of current patch level
      Keep an installation script updated with all changes




                                                              30
Database Rollback
 • Write patch file
 • Also write undo file

 -- release.2.0.sql
 create table friends(
  user_id int not null
  friend_user_id int not null
  created_date timestamp default current_timestamp not null
 );


 -- release.2.0.undo.sql
 drop table friends;




                                                          31
DbMorph

 • Tool developed by Maggie Nelson
 • DbMorph, very early version http://sourceforge.net/
   projects/dbmorph
 • Also see Maggie's homepage
   http://objectivelyoriented.com
 • Slides from her talk at php|tek “Keeping Your
   Database and PHP in Sync”




                                                    32
Other Tools
 • Phing http://phing.info
       Project build system based on Apache Ant
       XML configuration
       Integration with SVN
       Available through PEAR
 • Phar http://pecl.php.net/package/phar
       Package management for PHP
       Like JAR for Java
       Self-extracting option
       PECL module




                                                   33
SVN and Deployment
 •   Deployment process
 •   Deployment mechanism
 •   Subversion
 •   Other tools




                            34
Questions?

  Lorna Mitchell - lorna@ibuildings.com




                                          Ibuildings

More Related Content

What's hot

Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Martin de Keijzer
 
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)Howto createOpenFlow Switchusing FPGA (at FPGAX#6)
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)Kentaro Ebisawa
 
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationLinaro
 
Open Source Toolchains to Manage Cloud Infrastructure
Open Source Toolchains to Manage Cloud InfrastructureOpen Source Toolchains to Manage Cloud Infrastructure
Open Source Toolchains to Manage Cloud InfrastructureMark Hinkle
 
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...Felipe Prado
 
Transferring Changes Between Perforce Servers
Transferring Changes Between Perforce ServersTransferring Changes Between Perforce Servers
Transferring Changes Between Perforce ServersPerforce
 
Brno Perl Mongers 28.5.2015 - Perl family by mj41
Brno Perl Mongers 28.5.2015 - Perl family by mj41Brno Perl Mongers 28.5.2015 - Perl family by mj41
Brno Perl Mongers 28.5.2015 - Perl family by mj41Michal Jurosz
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
Security testing with gauntlt
Security testing with gauntltSecurity testing with gauntlt
Security testing with gauntltJames Wickett
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudJung-Hong Kim
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generatorskamaelian
 
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗Macpaul Lin
 
Upgrade ipa to rhel 7
Upgrade ipa to rhel 7Upgrade ipa to rhel 7
Upgrade ipa to rhel 7Amjad Yaseen
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...Linaro
 
Overview: Building Open Source Cloud Computing Environments
Overview: Building Open Source Cloud Computing EnvironmentsOverview: Building Open Source Cloud Computing Environments
Overview: Building Open Source Cloud Computing EnvironmentsMark Hinkle
 
Aumentando a eficiência do Web Container usando chamadas Assíncronas
Aumentando a eficiência do Web Container usando chamadas Assíncronas Aumentando a eficiência do Web Container usando chamadas Assíncronas
Aumentando a eficiência do Web Container usando chamadas Assíncronas Rafael T. C. Soares (tuelho)
 
Architecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in TechnologyArchitecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in TechnologyDaniel Barker
 

What's hot (20)

Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality with continuous integration (PHPBenelux Conference 2011)
 
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)Howto createOpenFlow Switchusing FPGA (at FPGAX#6)
Howto createOpenFlow Switchusing FPGA (at FPGAX#6)
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
 
Open Source Toolchains to Manage Cloud Infrastructure
Open Source Toolchains to Manage Cloud InfrastructureOpen Source Toolchains to Manage Cloud Infrastructure
Open Source Toolchains to Manage Cloud Infrastructure
 
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
 
Transferring Changes Between Perforce Servers
Transferring Changes Between Perforce ServersTransferring Changes Between Perforce Servers
Transferring Changes Between Perforce Servers
 
Brno Perl Mongers 28.5.2015 - Perl family by mj41
Brno Perl Mongers 28.5.2015 - Perl family by mj41Brno Perl Mongers 28.5.2015 - Perl family by mj41
Brno Perl Mongers 28.5.2015 - Perl family by mj41
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
Security testing with gauntlt
Security testing with gauntltSecurity testing with gauntlt
Security testing with gauntlt
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generators
 
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
 
Upgrade ipa to rhel 7
Upgrade ipa to rhel 7Upgrade ipa to rhel 7
Upgrade ipa to rhel 7
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 
Overview: Building Open Source Cloud Computing Environments
Overview: Building Open Source Cloud Computing EnvironmentsOverview: Building Open Source Cloud Computing Environments
Overview: Building Open Source Cloud Computing Environments
 
sed.pdf
sed.pdfsed.pdf
sed.pdf
 
Aumentando a eficiência do Web Container usando chamadas Assíncronas
Aumentando a eficiência do Web Container usando chamadas Assíncronas Aumentando a eficiência do Web Container usando chamadas Assíncronas
Aumentando a eficiência do Web Container usando chamadas Assíncronas
 
Architecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in TechnologyArchitecting The Future - WeRise Women in Technology
Architecting The Future - WeRise Women in Technology
 

Viewers also liked

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethansdpc
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)dpc
 
PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期ericzhangcn
 
Web2 0slideshare
Web2 0slideshareWeb2 0slideshare
Web2 0slidesharebfuhrer
 
Mobile Learning and Health Risks - Implications for Pedagogical and Education...
Mobile Learning and Health Risks - Implications for Pedagogical and Education...Mobile Learning and Health Risks - Implications for Pedagogical and Education...
Mobile Learning and Health Risks - Implications for Pedagogical and Education...Mikko Ahonen
 

Viewers also liked (6)

Dolomitas
DolomitasDolomitas
Dolomitas
 
ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethans
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期PHP and Zend Internal I - 体系结构及生命周期
PHP and Zend Internal I - 体系结构及生命周期
 
Web2 0slideshare
Web2 0slideshareWeb2 0slideshare
Web2 0slideshare
 
Mobile Learning and Health Risks - Implications for Pedagogical and Education...
Mobile Learning and Health Risks - Implications for Pedagogical and Education...Mobile Learning and Health Risks - Implications for Pedagogical and Education...
Mobile Learning and Health Risks - Implications for Pedagogical and Education...
 

Similar to Deployment With Subversion - Lorna Mitchell

PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVNLorna Mitchell
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVNPHPBelgium
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulkedpc
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitAndreas Heim
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl UniMatthew Landauer
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-stepMichelangelo van Dam
 
Improving Application Installation Ux In Windows 7
Improving Application Installation Ux In Windows 7Improving Application Installation Ux In Windows 7
Improving Application Installation Ux In Windows 7Vijay Raj
 
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
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemGilad Garon
 
Subversion Clients for the Mac - svnX
Subversion Clients  for the Mac - svnXSubversion Clients  for the Mac - svnX
Subversion Clients for the Mac - svnXBen MacNeill
 
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File TransferPerforce
 
Dvcs With Mercurial (No Notes)
Dvcs With Mercurial (No Notes)Dvcs With Mercurial (No Notes)
Dvcs With Mercurial (No Notes)Ted Naleid
 
Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Pursuit Consulting
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments Ohad Raz
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)Fabien Potencier
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLars Trieloff
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control SystemsMark van Lent
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...adunne
 

Similar to Deployment With Subversion - Lorna Mitchell (20)

PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulke
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl Uni
 
Version Management with CVS
Version Management with CVSVersion Management with CVS
Version Management with CVS
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
 
Improving Application Installation Ux In Windows 7
Improving Application Installation Ux In Windows 7Improving Application Installation Ux In Windows 7
Improving Application Installation Ux In Windows 7
 
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)
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control system
 
Subversion Clients for the Mac - svnX
Subversion Clients  for the Mac - svnXSubversion Clients  for the Mac - svnX
Subversion Clients for the Mac - svnX
 
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
 
Dvcs With Mercurial (No Notes)
Dvcs With Mercurial (No Notes)Dvcs With Mercurial (No Notes)
Dvcs With Mercurial (No Notes)
 
Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010Distributed Versioning Tools, BeJUG 2010
Distributed Versioning Tools, BeJUG 2010
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 Applications
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control Systems
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
 

More from dpc

Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinneydpc
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraskidpc
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencierdpc
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broersedpc
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmanndpc
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebschdpc
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmanndpc
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Janschdpc
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Janschdpc
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)dpc
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)dpc
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)dpc
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)dpc
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)dpc
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)dpc
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)dpc
 
DPC2007 PDO (Lukas Kahwe Smith)
DPC2007 PDO (Lukas Kahwe Smith)DPC2007 PDO (Lukas Kahwe Smith)
DPC2007 PDO (Lukas Kahwe Smith)dpc
 
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)dpc
 

More from dpc (18)

Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraski
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencier
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmann
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmann
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Jansch
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Jansch
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
 
DPC2007 PDO (Lukas Kahwe Smith)
DPC2007 PDO (Lukas Kahwe Smith)DPC2007 PDO (Lukas Kahwe Smith)
DPC2007 PDO (Lukas Kahwe Smith)
 
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Deployment With Subversion - Lorna Mitchell

  • 1. PHP Deployment with Subversion Lorna Mitchell Ibuildings The PHP Professionals Ibuildings
  • 2. About Me • Lorna Mitchell • PHP Developer/Consultant/Trainer with Ibuildings • ZCE • Member of http://www.phpwomen.org • Personal blog at http://www.lornajane.net 2
  • 3. SVN and Deployment • Deployment process • Deployment mechanism • Subversion • Other tools 3
  • 4. In The Beginning • One Developer • Code on PC • FTP / SCP / Upload to live server • It works! 4
  • 5. Early Development Team • More developers • Development server • Ideally one copy per developer, a testing/staging server and a live platform Dev LIVE area Dev Dev area area Staging Dev Dev area area 5
  • 6. Deployment Considerations • Multiple platforms prompt context-aware configuration • File permissions may need checking, for example on cache directories • If the live site has uploaded files stored in the file system, need to preserve this content • Compile step for initialising compiled templates or populating caches 6
  • 7. Deployment Plan • A deployment plan is a recipe for moving code • Step-by-step instructions for setting up a new version of code • Must always be accompanied by a rollback plan • This process should be as automated as possible 7
  • 8. Example Deployment Plan • Avoid missing steps when putting live Export from repository Tar Upload Untar Set permissions Switch symlinks 8
  • 9. Symlinks Live-site (symlink) Existing live code New code version existing ready preparing 9
  • 10. Code Transport • Copy development code to live • Rsync development code to live • Check out to live and update • Export to live • Patch changes from last live version only – requires version meta-data 10
  • 11. Commit Hooks • Subversion can run scripts on given events, called “commit hooks”  Pre-commit  Post-commit • Run test suite • Coding standards conformance • Syntax check • No “forgetting” any steps 11
  • 12. Notifications • Can use the commit hooks to trigger information • Email team  Diff  Changes  Test coverage/outcomes • Ticker/big screen • Nabaztag 12
  • 13. Source Control Packages • Subversion http://subversion.tigris.org • CVS http://www.cvshome.org • GIT http://git.or.cz • Bazaar http://bazaar-vcs.org • Visual Source Safe 13
  • 14. Source Control Clients • Command line tools • TortoiseSVN: http://tortoise.tigris.org • IDE Plugins: for Zend Studio, Komodo, etc • WebSVN: http://websvn.tigris.org  SFM (Safe For Managers) • Trac: http://trac.edgewall.org/ 14
  • 15. Source Control Concepts • Individuals communicate with repository • Keeping place • Collaboration tool • Historic versions 15
  • 16. Collaboration • Two people operate on different files  Changes are combined • Two people change the same file  Changes are merged if changes don't overlap • Allows teams to easily work on different parts of the system 16
  • 17. Collaboration Example $greeting = 'hello world'; echo $greeting; $greeting = 'hey people'; $greeting = 'hello world'; echo $greeting; print $greeting; $greeting = 'hey people'; print $greeting; 17
  • 18. Conflicts • Two people edit the same part of the same file  Includes both adding a new method to the end of a class • Subversion will notify you of the conflict and provide:  Your most recent version  The version from the repository  Its best guess at a merge with some notation for where the overlaps are 18
  • 19. Conflict Example $greeting = 'hello world'; echo $greeting; $greeting = 'hey people'; $greeting = 'hi universe'; echo $greeting; echo $greeting; $greeting = 'hey people'; echo $greeting; 19
  • 20. Conflict Example greeting.php greeting.php.r365 <<<<<<< .mine $greeting = 'hello world'; $greeting = 'hi universe'; echo $greeting; ======= $greeting = 'hey people'; >>>>>>> .r366 echo $greeting; greeting.php.mine greeting.php.r366 $greeting = 'hi universe'; $greeting = 'hey people'; echo $greeting; echo $greeting; • Correct greeting.php and then let Subversion know you have resolved the conflict 20
  • 22. Branching Example trunk version 1.1 Development done, merge in changes version 1.2 development branch bug fix Delete extra branch bug fix backport 22
  • 23. Tagging Versions • Source control tools allow you to label releases, called “tags” • Subversion has one revision number for a whole repository, incrementing on every commit • CVS has one revision number per file • In either case its nice to have “client preview” or “release 4.11” as human readable markers 23
  • 24. Repository Structure • Repository layout choices • Deployment point choices • Affected by process • Dependent on product type 24
  • 25. Cyclic Releases • Periodic release cycle • Need to maintain existing version • Start developing new version • May need to fix bugs in both versions • Use branching 25
  • 26. Continuous Releases • Changes to branch • Branch merged to trunk • Can patch changes from branch to trunk for bug fixes • Deployment from trunk 26
  • 27. Branch Deployment trunk version 1.1 development branch version 1.2 testing deployment! 27
  • 28. Live Branch • Changes to branch • Branch merged to trunk • Testing performed on trunk • Changes then patched to live branch • Deployment from live branch 28
  • 29. Live Branch Deployment trunk live branch development branch testing deployment! approved changes 29
  • 30. Database Versioning • Copying exported versions around  Risk losing live data • Make structure changes to all platforms  Put objects in scripts • Simple patching strategy  No direct database operations  Numbered patch files in subversion  Include patches in script  Give database awareness of current patch level  Keep an installation script updated with all changes 30
  • 31. Database Rollback • Write patch file • Also write undo file -- release.2.0.sql create table friends( user_id int not null friend_user_id int not null created_date timestamp default current_timestamp not null ); -- release.2.0.undo.sql drop table friends; 31
  • 32. DbMorph • Tool developed by Maggie Nelson • DbMorph, very early version http://sourceforge.net/ projects/dbmorph • Also see Maggie's homepage http://objectivelyoriented.com • Slides from her talk at php|tek “Keeping Your Database and PHP in Sync” 32
  • 33. Other Tools • Phing http://phing.info  Project build system based on Apache Ant  XML configuration  Integration with SVN  Available through PEAR • Phar http://pecl.php.net/package/phar  Package management for PHP  Like JAR for Java  Self-extracting option  PECL module 33
  • 34. SVN and Deployment • Deployment process • Deployment mechanism • Subversion • Other tools 34
  • 35. Questions? Lorna Mitchell - lorna@ibuildings.com Ibuildings