Commit e3a718574c1c862a1b806b8bb04fa1f4b10a2d37
1 parent
7101b22c
Exists in
master
and in
4 other branches
Update docs for 6.3
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
117 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,117 @@ |
1 | +# From 6.2 to 6.3 | |
2 | + | |
3 | +## Requires version: 6.1 or 6.2 | |
4 | + | |
5 | +### 0. Backup | |
6 | + | |
7 | +It's useful to make a backup just in case things go south: | |
8 | +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) | |
9 | + | |
10 | +```bash | |
11 | +cd /home/git/gitlab | |
12 | +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production | |
13 | +``` | |
14 | + | |
15 | +### 1. Stop server | |
16 | + | |
17 | + sudo service gitlab stop | |
18 | + | |
19 | +### 2. Get latest code | |
20 | + | |
21 | +```bash | |
22 | +cd /home/git/gitlab | |
23 | +sudo -u git -H git fetch | |
24 | +sudo -u git -H git checkout 6.3-stable | |
25 | +``` | |
26 | + | |
27 | +### 3. Update gitlab-shell | |
28 | + | |
29 | +```bash | |
30 | +cd /home/git/gitlab-shell | |
31 | +sudo -u git -H git fetch | |
32 | +sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities | |
33 | +``` | |
34 | + | |
35 | +### 4. Install additional packages | |
36 | + | |
37 | +```bash | |
38 | +# Add support for lograte for better log file handling | |
39 | +sudo apt-get install logrotate | |
40 | +``` | |
41 | + | |
42 | +### 5. Install libs, migrations, etc. | |
43 | + | |
44 | +```bash | |
45 | +cd /home/git/gitlab | |
46 | + | |
47 | +# MySQL | |
48 | +sudo -u git -H bundle install --without development test postgres --deployment | |
49 | + | |
50 | +#PostgreSQL | |
51 | +sudo -u git -H bundle install --without development test mysql --deployment | |
52 | + | |
53 | + | |
54 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
55 | +sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production | |
56 | +sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production | |
57 | +sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production | |
58 | +``` | |
59 | + | |
60 | +### 6. Update config files | |
61 | + | |
62 | +TIP: to see what changed in gitlab.yml.example in this release use next command: | |
63 | + | |
64 | +``` | |
65 | +git diff 6.2-stable:config/gitlab.yml.example 6.3-stable:config/gitlab.yml.example | |
66 | +``` | |
67 | + | |
68 | +* Make `/home/git/gitlab/config/gitlab.yml` same as https://github.com/gitlabhq/gitlabhq/blob/6.3-stable/config/gitlab.yml.example but with your settings. | |
69 | +* Make `/home/git/gitlab/config/unicorn.rb` same as https://github.com/gitlabhq/gitlabhq/blob/6.3-stable/config/unicorn.rb.example but with your settings. | |
70 | +* Copy rack attack middleware config | |
71 | + | |
72 | +```bash | |
73 | +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb | |
74 | +``` | |
75 | +* Set up logrotate | |
76 | + | |
77 | +```bash | |
78 | +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab | |
79 | +``` | |
80 | + | |
81 | +### 7. Update Init script | |
82 | + | |
83 | +```bash | |
84 | +sudo rm /etc/init.d/gitlab | |
85 | +sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/6.3-stable/lib/support/init.d/gitlab | |
86 | +sudo chmod +x /etc/init.d/gitlab | |
87 | +``` | |
88 | + | |
89 | +### 8. Start application | |
90 | + | |
91 | + sudo service gitlab start | |
92 | + sudo service nginx restart | |
93 | + | |
94 | +### 9. Check application status | |
95 | + | |
96 | +Check if GitLab and its environment are configured correctly: | |
97 | + | |
98 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
99 | + | |
100 | +To make sure you didn't miss anything run a more thorough check with: | |
101 | + | |
102 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
103 | + | |
104 | +If all items are green, then congratulations upgrade complete! | |
105 | + | |
106 | +## Things went south? Revert to previous version (6.2) | |
107 | + | |
108 | +### 1. Revert the code to the previous version | |
109 | +Follow the [`upgrade guide from 6.1 to 6.2`](6.1-to-6.2.md), except for the database migration | |
110 | +(The backup is already migrated to the previous version) | |
111 | + | |
112 | +### 2. Restore from the backup: | |
113 | + | |
114 | +```bash | |
115 | +cd /home/git/gitlab | |
116 | +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production | |
117 | +``` | ... | ... |