Changes between Version 7 and Version 8 of CodeManagementReleaseProcess
- Timestamp:
- 11/25/11 19:15:46 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodeManagementReleaseProcess
v7 v8 103 103 Please 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. 104 104 105 ''' 4a. Merge your branches''' by...106 ON YOUR MACHINE: 105 '''5a. Merge your branches''' by... 106 '''ON YOUR MACHINE:''' 107 107 {{{ 108 108 git checkout [the branch you want to merge into] <--- probably 'live' at this stage] 109 109 git pull <--- belt and braces to make sure you've not forgotten to merge something 110 110 git merge [your working branch] <--- probably 'development' 111 git push origin [the branch you want to merge into] <--- probably 'live' 111 112 }}} 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.113 The 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. 113 114 114 ''' 4b. Prepare LIVE'''115 '''5b. Prepare LIVE''' 115 116 1. SSH into LIVE (or TEST): ssh www.transitionnetwork.org (OR for TEST: ssh test.transitionnetwork.org.webarch.net) 116 117 1. Go to the site root folder {{{ cd /web/transitionnetwork.org/www }}} (OR cd /web/test.transitionnetwork.org.webarch.net/www) 117 118 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... 119 120 1. Log in as Transition Admin (user 1 - password available on request) 120 121 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. 121 122 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. 122 123 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! 124 125 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... 126 127 {{{ 127 128 svn switch https://tech.transitionnetwork.org/svn/www/release/2010-11-19/ . 128 sudo -i 129 sudo git pull 129 130 }}} 130 Using your release date, obviously. After a short while the server will complete the task and you can...131 The server will grab the lastest in the 'live' branch and you can then... 131 132 132 133 '''4d. Finish the job''': Go back to Drupal in your browser and... … … 138 139 139 140 === 5. Rolling back a release === 140 If it goes badly, don't panic. You have all the old code in SVNand a snapshot of the database just prior to updating it. To roll back, run the following commands on the server you're logged into:141 If 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: 141 142 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). 142 143 1. Restore the database backup just prior to the and make a manual backup of the database - saved on the server.