Commit 995d193d32c96a608435f232f67efcaf48cba67c

Authored by Dmitriy Zaporozhets
2 parents e59e48d7 7d04d460

Merge branch '6.0-to-7.0' into 'master'

Create 6.0-to-7.0 update guide
Showing 2 changed files with 149 additions and 151 deletions   Show diff stats
doc/update/6.0-to-6.8.md
@@ -1,151 +0,0 @@ @@ -1,151 +0,0 @@
1 -# From 6.0 to 6.8  
2 -  
3 -**In 6.1 we remove a lot of deprecated code.**  
4 -  
5 -**You should update to 6.0 before installing 6.1 or higher so all the necessary conversions are run.**  
6 -  
7 -## Deprecations  
8 -  
9 -## Global issue numbers  
10 -  
11 -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects.  
12 -  
13 -## 0. Backup  
14 -  
15 -It's useful to make a backup just in case things go south:  
16 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)  
17 -  
18 -```bash  
19 -cd /home/git/gitlab  
20 -sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production  
21 -```  
22 -  
23 -## 1. Stop server  
24 -  
25 - sudo service gitlab stop  
26 -  
27 -## 2. Get latest code  
28 -  
29 -```bash  
30 -cd /home/git/gitlab  
31 -sudo -u git -H git fetch --all  
32 -```  
33 -  
34 -For GitLab Community Edition:  
35 -  
36 -```bash  
37 -sudo -u git -H git checkout 6-8-stable  
38 -```  
39 -  
40 -OR  
41 -  
42 -For GitLab Enterprise Edition:  
43 -  
44 -```bash  
45 -sudo -u git -H git checkout 6-8-stable-ee  
46 -```  
47 -  
48 -  
49 -## 3. Install additional packages  
50 -  
51 -```bash  
52 -# Add support for lograte for better log file handling  
53 -sudo apt-get install logrotate  
54 -```  
55 -  
56 -## 4. Update gitlab-shell  
57 -  
58 -```bash  
59 -cd /home/git/gitlab-shell  
60 -sudo -u git -H git fetch  
61 -sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities  
62 -```  
63 -  
64 -## 5. Install libs, migrations, etc.  
65 -  
66 -```bash  
67 -cd /home/git/gitlab  
68 -  
69 -# MySQL installations (note: the line below states '--without ... postgres')  
70 -sudo -u git -H bundle install --without development test postgres --deployment  
71 -  
72 -# PostgreSQL installations (note: the line below states '--without ... mysql')  
73 -sudo -u git -H bundle install --without development test mysql --deployment  
74 -  
75 -  
76 -# Run database migrations  
77 -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production  
78 -  
79 -# Enable internal issue IDs (introduced in GitLab 6.1)  
80 -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production  
81 -  
82 -# Clean up assets and cache  
83 -sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production  
84 -  
85 -# Close access to gitlab-satellites for others  
86 -sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites  
87 -```  
88 -  
89 -## 6. Update config files  
90 -  
91 -TIP: to see what changed in gitlab.yml.example in this release use next command:  
92 -  
93 -```  
94 -git diff 6-0-stable:config/gitlab.yml.example 6-8-stable:config/gitlab.yml.example  
95 -```  
96 -  
97 -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-8-stable/config/gitlab.yml.example but with your settings.  
98 -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-8-stable/config/unicorn.rb.example but with your settings.  
99 -* Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-8-stable/lib/support/nginx/gitlab but with your settings.  
100 -* Copy rack attack middleware config  
101 -  
102 -```bash  
103 -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb  
104 -```  
105 -  
106 -* Set up logrotate  
107 -  
108 -```bash  
109 -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab  
110 -```  
111 -  
112 -## 7. Update Init script  
113 -  
114 -```bash  
115 -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab  
116 -```  
117 -  
118 -## 8. Start application  
119 -  
120 - sudo service gitlab start  
121 - sudo service nginx restart  
122 -  
123 -## 9. Check application status  
124 -  
125 -Check if GitLab and its environment are configured correctly:  
126 -  
127 - cd /home/git/gitlab  
128 - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production  
129 -  
130 -To make sure you didn't miss anything run a more thorough check with:  
131 -  
132 - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production  
133 -  
134 -If all items are green, then congratulations upgrade complete!  
135 -  
136 -## Things went south? Revert to previous version (6.0)  
137 -  
138 -### 1. Revert the code to the previous version  
139 -  
140 -Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version).  
141 -  
142 -### 2. Restore from the backup:  
143 -  
144 -```bash  
145 -cd /home/git/gitlab  
146 -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production  
147 -```  
148 -  
149 -## Login issues after upgrade?  
150 -  
151 -If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page)  
doc/update/6.0-to-7.0.md 0 → 100644
@@ -0,0 +1,149 @@ @@ -0,0 +1,149 @@
  1 +# From 6.0 to 7.0
  2 +
  3 +## Deprecations
  4 +
  5 +The 'Wall' feature has been removed in GitLab 7.0. Existing wall comments will remain stored in the database after the upgrade.
  6 +
  7 +## Global issue numbers
  8 +
  9 +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects.
  10 +
  11 +## 0. Backup
  12 +
  13 +It's useful to make a backup just in case things go south:
  14 +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
  15 +
  16 +```bash
  17 +cd /home/git/gitlab
  18 +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
  19 +```
  20 +
  21 +## 1. Stop server
  22 +
  23 + sudo service gitlab stop
  24 +
  25 +## 2. Get latest code
  26 +
  27 +```bash
  28 +cd /home/git/gitlab
  29 +sudo -u git -H git fetch --all
  30 +```
  31 +
  32 +For GitLab Community Edition:
  33 +
  34 +```bash
  35 +sudo -u git -H git checkout 7-0-stable
  36 +```
  37 +
  38 +OR
  39 +
  40 +For GitLab Enterprise Edition:
  41 +
  42 +```bash
  43 +sudo -u git -H git checkout 7-0-stable-ee
  44 +```
  45 +
  46 +
  47 +## 3. Install additional packages
  48 +
  49 +```bash
  50 +# Add support for lograte for better log file handling
  51 +sudo apt-get install logrotate
  52 +```
  53 +
  54 +## 4. Update gitlab-shell
  55 +
  56 +```bash
  57 +cd /home/git/gitlab-shell
  58 +sudo -u git -H git fetch
  59 +sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities
  60 +```
  61 +
  62 +## 5. Install libs, migrations, etc.
  63 +
  64 +```bash
  65 +cd /home/git/gitlab
  66 +
  67 +# MySQL installations (note: the line below states '--without ... postgres')
  68 +sudo -u git -H bundle install --without development test postgres --deployment
  69 +
  70 +# PostgreSQL installations (note: the line below states '--without ... mysql')
  71 +sudo -u git -H bundle install --without development test mysql --deployment
  72 +
  73 +
  74 +# Run database migrations
  75 +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
  76 +
  77 +# Enable internal issue IDs (introduced in GitLab 6.1)
  78 +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production
  79 +
  80 +# Clean up assets and cache
  81 +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
  82 +
  83 +# Close access to gitlab-satellites for others
  84 +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
  85 +```
  86 +
  87 +## 6. Update config files
  88 +
  89 +TIP: to see what changed in gitlab.yml.example in this release use next command:
  90 +
  91 +```
  92 +git diff 6-0-stable:config/gitlab.yml.example 7-0-stable:config/gitlab.yml.example
  93 +```
  94 +
  95 +* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/config/gitlab.yml.example but with your settings.
  96 +* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/config/unicorn.rb.example but with your settings.
  97 +* Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/lib/support/nginx/gitlab but with your settings.
  98 +* Copy rack attack middleware config
  99 +
  100 +```bash
  101 +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  102 +```
  103 +
  104 +* Set up logrotate
  105 +
  106 +```bash
  107 +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
  108 +```
  109 +
  110 +## 7. Update Init script
  111 +
  112 +```bash
  113 +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
  114 +```
  115 +
  116 +## 8. Start application
  117 +
  118 + sudo service gitlab start
  119 + sudo service nginx restart
  120 +
  121 +## 9. Check application status
  122 +
  123 +Check if GitLab and its environment are configured correctly:
  124 +
  125 + cd /home/git/gitlab
  126 + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
  127 +
  128 +To make sure you didn't miss anything run a more thorough check with:
  129 +
  130 + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
  131 +
  132 +If all items are green, then congratulations upgrade complete!
  133 +
  134 +## Things went south? Revert to previous version (6.0)
  135 +
  136 +### 1. Revert the code to the previous version
  137 +
  138 +Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version).
  139 +
  140 +### 2. Restore from the backup:
  141 +
  142 +```bash
  143 +cd /home/git/gitlab
  144 +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
  145 +```
  146 +
  147 +## Login issues after upgrade?
  148 +
  149 +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page)