Gitlab 8.1.4 auf 8.2.1 aktualisieren

289 Wörter 2 Minuten Lesezeit

Die kollaborative Versionsverwaltung Gitlab unter Debian von Version 8.1.4 auf Version 8.2.1 aktualisieren.

Service stoppen + Backup ausführen

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

Gitlab 8.2.1 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.2.1

gitlab-shell 2.6.8

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

gitlab-git-http-server durch gitlab-workhorse ersetzen

cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
cd gitlab-workhorse
sudo -u git -H git checkout 0.4.2
sudo -u git -H make

cd /home/git/gitlab
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
test -e /etc/default/gitlab && \
sudo sed -i.pre-8.2 's/^\([^=]*\)gitlab_git_http_server/\1gitlab_workhorse/' /etc/default/gitlab

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

cd /home/git/gitlab
sudo -u git -H git diff v8.1.4 v8.2.1 config/gitlab.yml.example
sudo -u git -H vi /home/git/gitlab/config/gitlab.yml

sudo -u git -H git diff v8.1.4 v8.2.1 lib/support/nginx/gitlab
sudo cp lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab
sudo vi /etc/nginx/sites-available/gitlab

Dienste neu starten

sudo systemctl daemon-reload
sudo service gitlab start
sudo service nginx restart

Ü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.2.1
Revision:       e53c0c5
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.8
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git