Skip to content

From 4.2 to 5.0

randx edited this page Feb 11, 2013 · 26 revisions

Before: sudo service stop gitlab

1. add bash to git user

sudo chsh -s /bin/bash git

2. git clone gitlab-shell

sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git /home/git/gitlab-shell

3. setup gitlab-shell

# chmod all repos and files under git
sudo chown git:git -R /home/git/repositories/

# login as git
sudo su git
cd /home/git/gitlab-shell

# copy config
cp config.yml.example config.yml

# change url to gitlab instance
vim config.yml

# rewrite hooks
./support/rewrite-hooks.sh


# exit from git user
exit

4. Copy gitlab instance to git user

sudo cp -R /home/gitlab/gitlab /home/git/gitlab
sudo chown git:git -R /home/git/gitlab
sudo rm /tmp/gitlab.socket
sudo rm -rf /home/gitlab/gitlab-satellites

5. Update gitlab to recent version

cd /home/git/gitlab

# change satellites path, repos_path  etc...
vim config/gitlab.yml

sudo -u git -H git fetch
sudo -u git -H git checkout ab19196391f6383cd11a9f2f748bc2a90287fcc4
sudo -u git -H bundle
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production

6. Update init.d script and nginx config

7. Start gitlab instace

sudo service gitlab start

# In 5-10 seconds lets check gitlab-shell
sudo -u git -H /home/git/gitlab-shell/bin/check
Clone this wiki locally