summaryrefslogtreecommitdiff
path: root/doc/update/3.0-to-3.1.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.0-to-3.1.md
parente7adcaa55b01ced9139135aeef072c2ee776ed0d (diff)
downloadgitlab-ce-a7ad09543ef415967b3d6ea25781601697f95571.tar.gz
move the update guides from the wiki into the repo
Diffstat (limited to 'doc/update/3.0-to-3.1.md')
-rw-r--r--doc/update/3.0-to-3.1.md108
1 files changed, 108 insertions, 0 deletions
diff --git a/doc/update/3.0-to-3.1.md b/doc/update/3.0-to-3.1.md
new file mode 100644
index 00000000000..5f06f818d10
--- /dev/null
+++ b/doc/update/3.0-to-3.1.md
@@ -0,0 +1,108 @@
+# From 3.0 to 3.1
+
+__IMPORTANT!__
+
+In this release __we moved Resque jobs under own gitlab namespace__.
+
+Despite a lot of advantages it requires from our users to __replace gitolite post-receive hook with new one__.
+
+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 server & resque
+
+ sudo service gitlab stop
+
+### 2. Update GitLab
+
+```bash
+
+# Get latest code
+sudo -u gitlab -H git fetch
+sudo -u gitlab -H git checkout v3.1.0
+
+# Install new charlock_holmes
+sudo gem install charlock_holmes --version '0.6.9'
+
+# Install gems for MySQL
+sudo -u gitlab -H bundle install --without development test postgres sqlite
+
+
+# Migrate db
+sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
+
+
+```
+
+### 3. Update post-receive hooks
+
+#### Gitolite 3
+
+Step 1: Rewrite post-receive hook
+
+```bash
+# Rewrite hook for gitolite 3
+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: Rewrite hooks in all projects to symlink gitolite hook
+
+```bash
+# 1. Check for valid path
+sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
+
+# 2. Run script
+sudo -u git -H lib/support/rewrite-hooks.sh
+```
+
+#### Gitolite v2
+
+Step 1: rewrite post-receive hook for gitolite 2
+
+```
+sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive
+sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
+```
+
+Step 2: Replace symlinks in project to valid place
+
+
+ #!/bin/bash
+ src="/home/git/repositories"
+ for dir in `ls "$src/"`
+ do
+ if [ -d "$src/$dir" ]; then
+
+ if [ "$dir" = "gitolite-admin.git" ]
+ then
+ continue
+ fi
+
+ project_hook="$src/$dir/hooks/post-receive"
+ gitolite_hook="/home/git/share/gitolite/hooks/common/post-receive"
+
+ ln -s -f $gitolite_hook $project_hook
+ fi
+ done
+
+
+### 4. Check app status
+
+```bash
+
+# Check APP Status
+sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
+
+
+
+```
+
+
+### 5. Start all
+
+ sudo service gitlab start