Commit 95ef25a57a872f6cc03416b4c88ca3b17a90f740

Authored by Jacob Vosmaer
1 parent e4c8e8fd

Replace 6.0-to-6.7.md with 6.0-to-6.8.md

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