summaryrefslogtreecommitdiff
path: root/doc/update/3.1-to-4.0.md
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-04-30 09:29:30 +0200
committerYves Senn <yves.senn@gmail.com>2013-04-30 09:29:30 +0200
commita7ad09543ef415967b3d6ea25781601697f95571 (patch)
tree4b733776e957682fb1944446940fecacb54b4314 /doc/update/3.1-to-4.0.md
parente7adcaa55b01ced9139135aeef072c2ee776ed0d (diff)
downloadgitlab-ce-a7ad09543ef415967b3d6ea25781601697f95571.tar.gz
move the update guides from the wiki into the repo
Diffstat (limited to 'doc/update/3.1-to-4.0.md')
-rw-r--r--doc/update/3.1-to-4.0.md99
1 files changed, 99 insertions, 0 deletions
diff --git a/doc/update/3.1-to-4.0.md b/doc/update/3.1-to-4.0.md
new file mode 100644
index 00000000000..c5ae3a40a76
--- /dev/null
+++ b/doc/update/3.1-to-4.0.md
@@ -0,0 +1,99 @@
+# From 3.1 to 4.0
+
+## Important changes
+
+* Support for SQLite was dropped
+* Support for gitolite 2 was dropped
+* Projects are organized in namespaces
+* The GitLab post-receive hook needs to be updated
+* The configuration file needs to be updated
+* Availability of `python2` executable
+
+Most of projects has post-receive file as symlink to gitolite `/home/git/.gitolite/hooks/post-receive`.
+But some of them may have a real file. In this case you should rewrite it with symlink to gitolite hook.
+
+I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
+
+- - -
+
+### 1. Stop GitLab & Resque
+
+ sudo service gitlab stop
+
+### 2. Update GitLab
+
+```bash
+
+# Get latest code
+sudo -u gitlab -H git fetch
+sudo -u gitlab -H git checkout 4-0-stable
+
+# Install gems for MySQL
+sudo -u gitlab -H bundle install --without development test postgres
+
+# Update repos permissions
+sudo chmod -R ug+rwXs /home/git/repositories/
+sudo chown -R git:git /home/git/repositories/
+
+# Migrate db
+sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
+
+# Enable namespaces (**Warning!** All projects in groups will be moved to subdirectories)
+sudo -u gitlab -H bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
+
+```
+
+### 3. Update post-receive hooks (Requires gitolite v3 )
+
+
+Step 1: Rewrite post-receive hook
+
+```bash
+sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive
+sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
+```
+
+Step 2: Update project hooks to be symlinks to the Gitolite hook
+
+```bash
+# 1. Check paths in script
+sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
+
+# 2. Run script
+sudo -u git -H lib/support/rewrite-hooks.sh
+```
+
+
+### 4. Replace config with new one
+
+
+ # backup old one
+ sudo -u gitlab -H cp config/gitlab.yml config/gitlab.yml.old
+
+ # copy new one
+ sudo -u gitlab -H cp config/gitlab.yml.example config/gitlab.yml
+
+ # edit it
+ sudo -u gitlab -H vim config/gitlab.yml
+
+
+### 5. Disable ssh known_host check for own domain
+
+
+ echo "Host localhost
+ StrictHostKeyChecking no
+ UserKnownHostsFile=/dev/null" | sudo tee -a /etc/ssh/ssh_config
+
+ echo "Host YOUR_DOMAIN_NAME
+ StrictHostKeyChecking no
+ UserKnownHostsFile=/dev/null" | sudo tee -a /etc/ssh/ssh_config
+
+
+### 6. Check GitLab's status
+
+ sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
+
+
+### 7. Start GitLab & Resque
+
+ sudo service gitlab start