Commit 1065f4616c13ff3f344c9ea290ab09c5ca2b2ac7

Authored by Jacob Vosmaer
1 parent e59e48d7

Create 6.0-to-7.0 update guide

Showing 2 changed files with 147 additions and 151 deletions   Show diff stats
doc/update/6.0-to-6.8.md
... ... @@ -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,147 @@
  1 +# From 6.0 to 7.0
  2 +
  3 +## Deprecations
  4 +
  5 +## Global issue numbers
  6 +
  7 +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.
  8 +
  9 +## 0. Backup
  10 +
  11 +It's useful to make a backup just in case things go south:
  12 +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
  13 +
  14 +```bash
  15 +cd /home/git/gitlab
  16 +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
  17 +```
  18 +
  19 +## 1. Stop server
  20 +
  21 + sudo service gitlab stop
  22 +
  23 +## 2. Get latest code
  24 +
  25 +```bash
  26 +cd /home/git/gitlab
  27 +sudo -u git -H git fetch --all
  28 +```
  29 +
  30 +For GitLab Community Edition:
  31 +
  32 +```bash
  33 +sudo -u git -H git checkout 7-0-stable
  34 +```
  35 +
  36 +OR
  37 +
  38 +For GitLab Enterprise Edition:
  39 +
  40 +```bash
  41 +sudo -u git -H git checkout 7-0-stable-ee
  42 +```
  43 +
  44 +
  45 +## 3. Install additional packages
  46 +
  47 +```bash
  48 +# Add support for lograte for better log file handling
  49 +sudo apt-get install logrotate
  50 +```
  51 +
  52 +## 4. Update gitlab-shell
  53 +
  54 +```bash
  55 +cd /home/git/gitlab-shell
  56 +sudo -u git -H git fetch
  57 +sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities
  58 +```
  59 +
  60 +## 5. Install libs, migrations, etc.
  61 +
  62 +```bash
  63 +cd /home/git/gitlab
  64 +
  65 +# MySQL installations (note: the line below states '--without ... postgres')
  66 +sudo -u git -H bundle install --without development test postgres --deployment
  67 +
  68 +# PostgreSQL installations (note: the line below states '--without ... mysql')
  69 +sudo -u git -H bundle install --without development test mysql --deployment
  70 +
  71 +
  72 +# Run database migrations
  73 +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
  74 +
  75 +# Enable internal issue IDs (introduced in GitLab 6.1)
  76 +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production
  77 +
  78 +# Clean up assets and cache
  79 +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
  80 +
  81 +# Close access to gitlab-satellites for others
  82 +sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
  83 +```
  84 +
  85 +## 6. Update config files
  86 +
  87 +TIP: to see what changed in gitlab.yml.example in this release use next command:
  88 +
  89 +```
  90 +git diff 6-0-stable:config/gitlab.yml.example 7-0-stable:config/gitlab.yml.example
  91 +```
  92 +
  93 +* 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.
  94 +* 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.
  95 +* 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.
  96 +* Copy rack attack middleware config
  97 +
  98 +```bash
  99 +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  100 +```
  101 +
  102 +* Set up logrotate
  103 +
  104 +```bash
  105 +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
  106 +```
  107 +
  108 +## 7. Update Init script
  109 +
  110 +```bash
  111 +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
  112 +```
  113 +
  114 +## 8. Start application
  115 +
  116 + sudo service gitlab start
  117 + sudo service nginx restart
  118 +
  119 +## 9. Check application status
  120 +
  121 +Check if GitLab and its environment are configured correctly:
  122 +
  123 + cd /home/git/gitlab
  124 + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
  125 +
  126 +To make sure you didn't miss anything run a more thorough check with:
  127 +
  128 + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
  129 +
  130 +If all items are green, then congratulations upgrade complete!
  131 +
  132 +## Things went south? Revert to previous version (6.0)
  133 +
  134 +### 1. Revert the code to the previous version
  135 +
  136 +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).
  137 +
  138 +### 2. Restore from the backup:
  139 +
  140 +```bash
  141 +cd /home/git/gitlab
  142 +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
  143 +```
  144 +
  145 +## Login issues after upgrade?
  146 +
  147 +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)
... ...