Commit c2ad30638a7c9fa307fe1f3a6653a8010fde1f64
1 parent
e6b668ab
Exists in
spb-stable
and in
3 other branches
add 67-68 update guide
Showing
1 changed file
with
129 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,129 @@ | @@ -0,0 +1,129 @@ | ||
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.9.1 | ||
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 | +# Update the logrotate configuration (keep logs for 90 days instead of 52 weeks) | ||
65 | +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab | ||
66 | + | ||
67 | +# Close access to gitlab-satellites for others | ||
68 | +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites | ||
69 | +``` | ||
70 | + | ||
71 | +### 5. Update config files | ||
72 | + | ||
73 | +#### New configuration options for gitlab.yml | ||
74 | + | ||
75 | +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. | ||
76 | + | ||
77 | +``` | ||
78 | +git diff 6-7-stable:config/gitlab.yml.example 6-8-stable:config/gitlab.yml.example | ||
79 | +``` | ||
80 | + | ||
81 | +#### MySQL? Remove reaping frequency | ||
82 | + | ||
83 | +If you are using MySQL as a database, remove `reaping_frequency` from you database.yml to prevent crashes. [Relevant commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/5163a8fcb9cfd63435560fda00173b76df2ccc93). | ||
84 | + | ||
85 | +#### HTTPS? Disable gzip | ||
86 | + | ||
87 | +If you are using HTTPS, disable gzip as in [this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/563fec734912d81cd7caea6fa8ec2b397fb72a9b) to prevent BREACH attacks. | ||
88 | + | ||
89 | +#### Turn on asset compression | ||
90 | + | ||
91 | +To improve performance, enable gzip asset compression as seen [in this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/8af94ed75505f0253823b9b2d44320fecea5b5fb). | ||
92 | + | ||
93 | +### 6. Update Init script | ||
94 | + | ||
95 | +```bash | ||
96 | +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab | ||
97 | +sudo chmod +x /etc/init.d/gitlab | ||
98 | +``` | ||
99 | + | ||
100 | +### 7. Start application | ||
101 | + | ||
102 | + sudo service gitlab start | ||
103 | + sudo service nginx restart | ||
104 | + | ||
105 | +### 8. Check application status | ||
106 | + | ||
107 | +Check if GitLab and its environment are configured correctly: | ||
108 | + | ||
109 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | ||
110 | + | ||
111 | +To make sure you didn't miss anything run a more thorough check with: | ||
112 | + | ||
113 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | ||
114 | + | ||
115 | +If all items are green, then congratulations upgrade is complete! | ||
116 | + | ||
117 | +## Things went south? Revert to previous version (6.6) | ||
118 | + | ||
119 | +### 1. Revert the code to the previous version | ||
120 | +Follow the [`upgrade guide from 6.5 to 6.6`](6.5-to-6.6.md), except for the database migration | ||
121 | +(The backup is already migrated to the previous version) | ||
122 | + | ||
123 | +### 2. Restore from the backup: | ||
124 | + | ||
125 | +```bash | ||
126 | +cd /home/git/gitlab | ||
127 | +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production | ||
128 | +``` | ||
129 | +If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. |