Changes between Version 7 and Version 8 of CodeManagementReleaseProcess


Ignore:
Timestamp:
11/25/11 19:15:46 (5 years ago)
Author:
jim
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeManagementReleaseProcess

    v7 v8  
    103103Please note the documentation for the LIVE server is here: wiki:NewLiveServer - and you should have decided whether or not it's necessary to do a run of testing on the TEST site before moving to LIVE... TEST is not presently set up with a Git repository, but the process for both would be the same. Contact Jim if TEST is actually needed. 
    104104 
    105 '''4a. Merge your branches''' by... 
    106 ON YOUR MACHINE: 
     105'''5a. Merge your branches''' by... 
     106'''ON YOUR MACHINE:''' 
    107107{{{ 
    108108git checkout [the branch you want to merge into] <--- probably 'live' at this stage] 
    109109git pull <--- belt and braces to make sure you've not forgotten to merge something 
    110110git merge [your working branch] <--- probably 'development' 
     111git push origin [the branch you want to merge into] <--- probably 'live' 
    111112}}} 
    112 The above will merge your recent work in [your working branch] into [the branch you want to merge into 'live']. This is probably a case of checking out 'live' and merging 'development' at this point. If all ok, follow rest of "3. Merge your code and push back to Github" but pushing the 'live' branch. 
     113The above will merge your recent work in [your working branch] into [the branch you want to merge into 'live'], then push it back to GitHub. The above is usually a case of checking out 'live' and merging 'development' before pushing, but if you've made further edits you'll have to merge them in. 
    113114 
    114 '''4b. Prepare LIVE''' 
     115'''5b. Prepare LIVE''' 
    115116 1. SSH into LIVE (or TEST): ssh www.transitionnetwork.org (OR for TEST: ssh test.transitionnetwork.org.webarch.net) 
    116117 1. Go to the site root folder {{{ cd /web/transitionnetwork.org/www }}} (OR cd /web/test.transitionnetwork.org.webarch.net/www) 
    117118 
    118 '''4b. Backup & put Drupal into maintenance mode''': You are now ready to take the site down and get the new files onto the server, but first you need to make a backup and prepare in Drupal... 
     119'''5c. Backup & put Drupal into maintenance mode''': You are now ready to take the site down and get the new files onto the server, but first you need to make a backup and prepare in Drupal... 
    119120 1. Log in as Transition Admin (user 1 - password available on request) 
    120121 1. Go to 'Site configuration' -> 'Site maintenance' and put the site offline. Ideally update message so users can see when the site is likely to be back - allow 15 minutes. 
    121122 1. Go to 'Site building' -> 'Backup & migrate' (or use the NewLiveServer#mysql-backup script) to make a manual backup of the database - which is saved on the server. 
    122123 
    123 '''NOTE''' you will need to do points 2 and 3 above on the http://workspaces.transitionnetwork.org domain too! 
     124'''REMEMBER!!!''' you will need to do points 2 and 3 above on the http://workspaces.transitionnetwork.org domain too! 
    124125 
    125 '''4c. Deploy the new code''': Back in the terminal where you are SSHed into the correct machine AND in the correct site root folder... 
     126'''5d. Deploy the new code''': Back in the terminal where you are SSHed into the correct machine AND in the correct site root folder... 
    126127{{{ 
    127   sudo -i 
    128   svn switch https://tech.transitionnetwork.org/svn/www/release/2010-11-19/ . 
     128sudo -i 
     129sudo git pull 
    129130}}} 
    130 Using your release date, obviously. After a short while the server will complete the task and you can... 
     131The server will grab the lastest in the 'live' branch and you can then... 
    131132 
    132133'''4d. Finish the job''': Go back to Drupal in your browser and... 
     
    138139 
    139140=== 5. Rolling back a release === 
    140 If it goes badly, don't panic. You have all the old code in SVN and a snapshot of the database just prior to updating it. To roll back, run the following commands on the server you're logged into: 
     141If it goes badly, don't panic. You have all the old code in Git and a snapshot of the database just prior to updating it. To roll back, run the following commands on the server you're logged into: 
    141142 1. (Assuming you can still use Drupal) Take the site back offline and go to 'Site building' -> 'Backup & migrate' -> 'Restore' (if the NewLiveServer#mysql-backup script has been used then the restore will have to be done via the command line). 
    142143 1. Restore the database backup just prior to the and make a manual backup of the database - saved on the server.