Commit 3e6fe8bff04f7ab72119cdfc04d7c752c58a3d40
1 parent
c22646d2
Exists in
spb-stable
and in
3 other branches
Add 6.6-to-6.7.md update guide
Showing
1 changed file
with
95 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,95 @@ | @@ -0,0 +1,95 @@ | ||
| 1 | +# From 6.6 to 6.7 | ||
| 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 --all | ||
| 19 | +``` | ||
| 20 | + | ||
| 21 | +For Gitlab Community Edition: | ||
| 22 | + | ||
| 23 | +```bash | ||
| 24 | +sudo -u git -H git checkout 6-7-stable | ||
| 25 | +``` | ||
| 26 | + | ||
| 27 | +OR | ||
| 28 | + | ||
| 29 | +For GitLab Enterprise Edition: | ||
| 30 | + | ||
| 31 | +```bash | ||
| 32 | +sudo -u git -H git checkout 6-7-stable-ee | ||
| 33 | +``` | ||
| 34 | + | ||
| 35 | +### 3. Update gitlab-shell (and its config) | ||
| 36 | + | ||
| 37 | +```bash | ||
| 38 | +cd /home/git/gitlab-shell | ||
| 39 | +sudo -u git -H git fetch | ||
| 40 | +sudo -u git -H git checkout v1.8.0 | ||
| 41 | +``` | ||
| 42 | + | ||
| 43 | +### 4. Install libs, migrations, etc. | ||
| 44 | + | ||
| 45 | +```bash | ||
| 46 | +cd /home/git/gitlab | ||
| 47 | + | ||
| 48 | +# MySQL installations (note: the line below states '--without ... postgres') | ||
| 49 | +sudo -u git -H bundle install --without development test postgres --deployment | ||
| 50 | + | ||
| 51 | +# PostgreSQL installations (note: the line below states '--without ... mysql') | ||
| 52 | +sudo -u git -H bundle install --without development test mysql --deployment | ||
| 53 | + | ||
| 54 | + | ||
| 55 | +# Run database migrations | ||
| 56 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | ||
| 57 | + | ||
| 58 | +# Clean up assets and cache | ||
| 59 | +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production | ||
| 60 | + | ||
| 61 | +# Update init.d script | ||
| 62 | +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab | ||
| 63 | +``` | ||
| 64 | + | ||
| 65 | + | ||
| 66 | +### 5. Start application | ||
| 67 | + | ||
| 68 | + sudo service gitlab start | ||
| 69 | + sudo service nginx restart | ||
| 70 | + | ||
| 71 | +### 6. Check application status | ||
| 72 | + | ||
| 73 | +Check if GitLab and its environment are configured correctly: | ||
| 74 | + | ||
| 75 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | ||
| 76 | + | ||
| 77 | +To make sure you didn't miss anything run a more thorough check with: | ||
| 78 | + | ||
| 79 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | ||
| 80 | + | ||
| 81 | +If all items are green, then congratulations upgrade is complete! | ||
| 82 | + | ||
| 83 | +## Things went south? Revert to previous version (6.6) | ||
| 84 | + | ||
| 85 | +### 1. Revert the code to the previous version | ||
| 86 | +Follow the [`upgrade guide from 6.5 to 6.6`](6.5-to-6.6.md), except for the database migration | ||
| 87 | +(The backup is already migrated to the previous version) | ||
| 88 | + | ||
| 89 | +### 2. Restore from the backup: | ||
| 90 | + | ||
| 91 | +```bash | ||
| 92 | +cd /home/git/gitlab | ||
| 93 | +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production | ||
| 94 | +``` | ||
| 95 | +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. |