Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Last active February 17, 2017 13:11
Show Gist options
  • Save wellington1993/d472ec603ef7904dcbcdd2da525e341e to your computer and use it in GitHub Desktop.
Save wellington1993/d472ec603ef7904dcbcdd2da525e341e to your computer and use it in GitHub Desktop.
Upgrade Gitlab ubuntu
#https://about.gitlab.com/update/
#cd /home/git/gitlab
bundle install --without production
bundle install
# Somente versoes mais recentes
#sudo gitlab-ctl stop unicorn
#sudo gitlab-ctl stop sidekiq
#sudo gitlab-ctl stop nginx
# --------------------------------------
#/etc/gitlab/gitlab.rb
#gitlab_rails['backup_path']
#/var/opt/gitlab/backup
#/etc/gitlab
sudo service gitlab stop
# --------------------------------------
cd /home/git/gitlab; \
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \
sudo service gitlab stop; \
sudo -u git -H ruby -Ilib -e 'require "gitlab/upgrader"' -e 'class Gitlab::Upgrader' -e 'def latest_version_raw' -e '"vX.X.X"' -e 'end' -e 'end' -e 'Gitlab::Upgrader.new.execute' -- -y; \
cd /home/git/gitlab-shell; \
sudo -u git -H git fetch; \
sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`; \
cd /home/git/gitlab; \
sudo service gitlab start; \
sudo service nginx restart; \
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
# --------------------------------------
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gitlab-ce
sudo apt-get sudo gitlab-ctl restartinstall gitlab-ce
sudo gitlab-ctl tail
# From:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/upgrader.md
# http://blog.melroy.org/2015/upgrading-gitlab-server/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment