Gitlab 7.14.1 auf 8.0.2 aktualisieren

October 09, 2015

Reading time ~2 Minuten

Die kollaborative Versionsverwaltung Gitlab unter Debian von Version 7.14.1 auf Version 8.0.2 aktualisieren.

Gitlab stoppen + Daten-Backup

sudo service gitlab stop
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

Gitlab 8.0.2 auschecken

cd /home/git/gitlab
sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb
sudo -u git -H git checkout v8.0.2

gitlab-shell 2.6.5

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v2.6.5

Go 1.5

cd ~ && mkdir go-lang && cd go-lang
curl -O --progress https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
echo '5817fa4b2252afdb02e11e8b9dc1d9173ef3bd5a  go1.5.linux-amd64.tar.gz' | shasum -c - && sudo tar -C /usr/local -xzf go1.5.linux-amd64.tar.gz
sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/

gitlab-git-http-server

cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-git-http-server.git
cd gitlab-git-http-server && sudo -u git -H make

cd /home/git/gitlab
grep ^listen config/unicorn.rb

sudo -u git tee -a config/unicorn.rb <<EOF
listen "127.0.0.1:8080", :tcp_nopush => true
EOF

Secrets

cd /home/git/gitlab
sudo -u git -H cp config/secrets.yml.example config/secrets.yml
sudo -u git -H chmod 0600 config/secrets.yml
sudo -u git -H editor config/secrets.yml

Gitlab aktualisieren

cd /home/git/gitlab
sudo -u git -H bundle install --without development test postgres --deployment
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

Konfiguration aktualisieren

git diff origin/7-14-stable:config/gitlab.yml.example origin/8-0-stable:config/gitlab.yml.example
git cat-file -p origin/8-0-stable:config/gitlab.yml.example | less

git diff origin/7-14-stable:lib/support/nginx/gitlab-ssl origin/8-0-stable:lib/support/nginx/gitlab-ssl
git cat-file -p origin/8-0-stable:lib/support/nginx/gitlab-ssl | less

git diff origin/7-14-stable:lib/support/nginx/gitlab origin/8-0-stable:lib/support/nginx/gitlab
git cat-file -p origin/8-0-stable:lib/support/nginx/gitlab | less

Gitlab CI migrieren

Gitlab 8 hat den "Common Integration" Server nun eingebaut, eine Migration der Daten von GitLab CI 7 ist deshalb notwendig.

Dienste neustarten

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Überprüfen

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
System information
System:         Debian 8
Current User:   git
Using RVM:      no
Ruby Version:   2.1.5p273
Gem Version:
Bundler Version:1.10.6
Rake Version:   10.4.2
Sidekiq Version:3.3.0

GitLab information
Version:        8.0.2
Revision:       3df6c44
Directory:      /home/git/gitlab
DB Adapter:     mysql2
URL:            http://gitlab.domain.tld
HTTP Clone URL: http://gitlab.domain.tld/some-group/some-project.git
SSH Clone URL:  git@gitlab.domain.tld:some-group/some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        2.6.5
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git

Und es machte BOOM!

Die neue Logitech SqueezeBox Boom ist endlich auch bei uns gelandet. Während Logitech bekannte Blogger bereits vorab mit der Boom beglückte,…… Continue reading