Commit 1dab27ee37df5969c75ff982ee9226475a8ea501
1 parent
be3e1ccb
Exists in
master
and in
4 other branches
Update guide for 6.3 to 6.4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
77 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,77 @@ |
| 1 | +# From 6.3 to 6.4 | |
| 2 | + | |
| 3 | +### 0. Backup | |
| 4 | + | |
| 5 | +```bash | |
| 6 | +cd /home/git/gitlab | |
| 7 | +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production | |
| 8 | +``` | |
| 9 | + | |
| 10 | +### 1. Stop server | |
| 11 | + | |
| 12 | + sudo service gitlab stop | |
| 13 | + | |
| 14 | +### 2. Get latest code | |
| 15 | + | |
| 16 | +```bash | |
| 17 | +cd /home/git/gitlab | |
| 18 | +sudo -u git -H git fetch | |
| 19 | +sudo -u git -H git checkout 6-4-stable | |
| 20 | +``` | |
| 21 | + | |
| 22 | +### 3. Update gitlab-shell (and its config) | |
| 23 | + | |
| 24 | +```bash | |
| 25 | +cd /home/git/gitlab-shell | |
| 26 | +sudo -u git -H git fetch | |
| 27 | +sudo -u git -H git checkout v1.8.0 | |
| 28 | +``` | |
| 29 | + | |
| 30 | +### 4. Install libs, migrations, etc. | |
| 31 | + | |
| 32 | +```bash | |
| 33 | +cd /home/git/gitlab | |
| 34 | + | |
| 35 | +# MySQL | |
| 36 | +sudo -u git -H bundle install --without development test postgres --deployment | |
| 37 | + | |
| 38 | +# PostgreSQL | |
| 39 | +sudo -u git -H bundle install --without development test mysql --deployment | |
| 40 | + | |
| 41 | + | |
| 42 | +# Run database migrations | |
| 43 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
| 44 | + | |
| 45 | +# Clean up assets and cache | |
| 46 | +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production | |
| 47 | +``` | |
| 48 | + | |
| 49 | +### 5. Start application | |
| 50 | + | |
| 51 | + sudo service gitlab start | |
| 52 | + sudo service nginx restart | |
| 53 | + | |
| 54 | +### 8. Check application status | |
| 55 | + | |
| 56 | +Check if GitLab and its environment are configured correctly: | |
| 57 | + | |
| 58 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
| 59 | + | |
| 60 | +To make sure you didn't miss anything run a more thorough check with: | |
| 61 | + | |
| 62 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
| 63 | + | |
| 64 | +If all items are green, then congratulations upgrade complete! | |
| 65 | + | |
| 66 | +## Things went south? Revert to previous version (6.3) | |
| 67 | + | |
| 68 | +### 1. Revert the code to the previous version | |
| 69 | +Follow the [`upgrade guide from 6.2 to 6.3`](6.2-to-6.3.md), except for the database migration | |
| 70 | +(The backup is already migrated to the previous version) | |
| 71 | + | |
| 72 | +### 2. Restore from the backup: | |
| 73 | + | |
| 74 | +```bash | |
| 75 | +cd /home/git/gitlab | |
| 76 | +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production | |
| 77 | +``` | ... | ... |