Commit dcc6ff5bcdf760e73fb2a045521716d0997fdbab

Authored by Sytse Sijbrandij
2 parents 1018cbdc 96ed6c45

Merge branch 'doc/6-0-to-6-5' into 'master'

Replace 6.0-to-6.4.md with 6.0-to-6.5.md
Showing 2 changed files with 127 additions and 127 deletions   Show diff stats
doc/update/6.0-to-6.4.md
@@ -1,127 +0,0 @@ @@ -1,127 +0,0 @@
1 -# From 6.0 to 6.4  
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 -sudo -u git -H git checkout 6-4-stable  
32 -# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-4-stable-ee  
33 -```  
34 -  
35 -  
36 -### 3. Install additional packages  
37 -  
38 -```bash  
39 -# Add support for lograte for better log file handling  
40 -sudo apt-get install logrotate  
41 -```  
42 -  
43 -### 4. Update gitlab-shell  
44 -  
45 -```bash  
46 -cd /home/git/gitlab-shell  
47 -sudo -u git -H git fetch  
48 -sudo -u git -H git checkout v1.8.0 # Addresses multiple critical security vulnerabilities  
49 -```  
50 -  
51 -### 5. Install libs, migrations, etc.  
52 -  
53 -```bash  
54 -cd /home/git/gitlab  
55 -  
56 -# MySQL  
57 -sudo -u git -H bundle install --without development test postgres --deployment  
58 -  
59 -#PostgreSQL  
60 -sudo -u git -H bundle install --without development test mysql --deployment  
61 -  
62 -  
63 -sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production  
64 -sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production  
65 -sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production  
66 -sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production  
67 -sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production  
68 -```  
69 -  
70 -### 6. Update config files  
71 -  
72 -TIP: to see what changed in gitlab.yml.example in this release use next command:  
73 -  
74 -```  
75 -git diff 6-0-stable:config/gitlab.yml.example 6-4-stable:config/gitlab.yml.example  
76 -```  
77 -  
78 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-4-stable/config/gitlab.yml.example but with your settings.  
79 -* Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-4-stable/config/unicorn.rb.example but with your settings.  
80 -* Copy rack attack middleware config  
81 -  
82 -```bash  
83 -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb  
84 -```  
85 -  
86 -* Set up logrotate  
87 -  
88 -```bash  
89 -sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab  
90 -```  
91 -  
92 -### 7. Update Init script  
93 -  
94 -```bash  
95 -sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab  
96 -```  
97 -  
98 -### 8. Start application  
99 -  
100 - sudo service gitlab start  
101 - sudo service nginx restart  
102 -  
103 -### 9. Check application status  
104 -  
105 -Check if GitLab and its environment are configured correctly:  
106 -  
107 - cd /home/git/gitlab  
108 - sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production  
109 -  
110 -To make sure you didn't miss anything run a more thorough check with:  
111 -  
112 - sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production  
113 -  
114 -If all items are green, then congratulations upgrade complete!  
115 -  
116 -## Things went south? Revert to previous version (6.0)  
117 -  
118 -### 1. Revert the code to the previous version  
119 -Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration  
120 -(The backup is already migrated to the previous version)  
121 -  
122 -### 2. Restore from the backup:  
123 -  
124 -```bash  
125 -cd /home/git/gitlab  
126 -sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production  
127 -```  
doc/update/6.0-to-6.5.md 0 → 100644
@@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
  1 +# From 6.0 to 6.5
  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 +sudo -u git -H git checkout 6-5-stable
  32 +# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-5-stable-ee
  33 +```
  34 +
  35 +
  36 +### 3. Install additional packages
  37 +
  38 +```bash
  39 +# Add support for lograte for better log file handling
  40 +sudo apt-get install logrotate
  41 +```
  42 +
  43 +### 4. Update gitlab-shell
  44 +
  45 +```bash
  46 +cd /home/git/gitlab-shell
  47 +sudo -u git -H git fetch
  48 +sudo -u git -H git checkout v1.8.0 # Addresses multiple critical security vulnerabilities
  49 +```
  50 +
  51 +### 5. Install libs, migrations, etc.
  52 +
  53 +```bash
  54 +cd /home/git/gitlab
  55 +
  56 +# MySQL
  57 +sudo -u git -H bundle install --without development test postgres --deployment
  58 +
  59 +#PostgreSQL
  60 +sudo -u git -H bundle install --without development test mysql --deployment
  61 +
  62 +
  63 +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
  64 +sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production
  65 +sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
  66 +sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
  67 +sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
  68 +```
  69 +
  70 +### 6. Update config files
  71 +
  72 +TIP: to see what changed in gitlab.yml.example in this release use next command:
  73 +
  74 +```
  75 +git diff 6-0-stable:config/gitlab.yml.example 6-5-stable:config/gitlab.yml.example
  76 +```
  77 +
  78 +* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-5-stable/config/gitlab.yml.example but with your settings.
  79 +* Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-5-stable/config/unicorn.rb.example but with your settings.
  80 +* Copy rack attack middleware config
  81 +
  82 +```bash
  83 +sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  84 +```
  85 +
  86 +* Set up logrotate
  87 +
  88 +```bash
  89 +sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
  90 +```
  91 +
  92 +### 7. Update Init script
  93 +
  94 +```bash
  95 +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
  96 +```
  97 +
  98 +### 8. Start application
  99 +
  100 + sudo service gitlab start
  101 + sudo service nginx restart
  102 +
  103 +### 9. Check application status
  104 +
  105 +Check if GitLab and its environment are configured correctly:
  106 +
  107 + cd /home/git/gitlab
  108 + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
  109 +
  110 +To make sure you didn't miss anything run a more thorough check with:
  111 +
  112 + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
  113 +
  114 +If all items are green, then congratulations upgrade complete!
  115 +
  116 +## Things went south? Revert to previous version (6.0)
  117 +
  118 +### 1. Revert the code to the previous version
  119 +Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration
  120 +(The backup is already migrated to the previous version)
  121 +
  122 +### 2. Restore from the backup:
  123 +
  124 +```bash
  125 +cd /home/git/gitlab
  126 +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
  127 +```