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