procédure générique pour upgrade
This commit is contained in:
parent
3a01a46f7a
commit
7e5f7a228a
|
@ -413,7 +413,9 @@ Attention, le fichier `secrets.yml` contient les clés de chiffrements pour les
|
|||
|
||||
Le principe des mises à jour est basé sur un `git pull` et un `git checkout`.
|
||||
|
||||
## Mise à jour mineure 8.14.0 vers 8.14.1
|
||||
## Mise à jour mineure 8.14.x vers 8.14.y
|
||||
|
||||
Procédure générique. Il est possible de « sauter » plusieurs versions. Par exemple, de 8.14.0 à 8.14.3.
|
||||
|
||||
### Sauvegarde
|
||||
|
||||
|
@ -425,81 +427,32 @@ $ bundle exec rake gitlab:backup:create RAILS_ENV=production
|
|||
|
||||
### Mise à jour de GitLab
|
||||
|
||||
~~~
|
||||
# sudo -iu foo
|
||||
$ cd gitlab
|
||||
$ git fetch --all
|
||||
$ git checkout -- Gemfile.lock db/schema.rb
|
||||
$ git checkout v8.14.1 -b v8.14.1
|
||||
$ sed -i -e s'/app_user="git"/app_user="foo"/' \
|
||||
-e 's/# Provides: .*gitlab$/# Provides: gitlab-foo/' \
|
||||
lib/support/init.d/gitlab
|
||||
$ sed -i 's#script_path = "/etc/init.d/gitlab"#script_path = "/etc/init.d/gitlab-foo"#g' lib/tasks/gitlab/check.rake
|
||||
$ git commit -a -m 'change default user'
|
||||
~~~
|
||||
|
||||
### Mise à jour base de données, Gems et assets
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab
|
||||
$ bundle install --without development test mysql aws kerberos --deployment
|
||||
$ bundle clean
|
||||
$ bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
|
||||
$ git commit -a -m 'upgraded to 8.14.1'
|
||||
~~~
|
||||
|
||||
### Redémarrer GitLab
|
||||
|
||||
~~~
|
||||
# /etc/init.d/gitlab-foo restart
|
||||
~~~
|
||||
|
||||
### Vérifier le statut
|
||||
|
||||
~~~
|
||||
# sudo -iu foo
|
||||
$ cd gitlab
|
||||
$ bundle exec rake gitlab:env:info RAILS_ENV=production
|
||||
$ bundle exec rake gitlab:check RAILS_ENV=production
|
||||
~~~
|
||||
|
||||
Si tout est au vert, la migration s'est bien passée !
|
||||
|
||||
## Mise à jour mineure 8.14.1 vers 8.14.2
|
||||
|
||||
### Sauvegarde
|
||||
|
||||
~~~
|
||||
# sudo -iu foo
|
||||
$ cd gitlab
|
||||
$ bundle exec rake gitlab:backup:create RAILS_ENV=production
|
||||
~~~
|
||||
|
||||
Cela va créer une archive TAR dans `~/gitlab/tmp/backups/`.
|
||||
|
||||
### Mise à jour de GitLab
|
||||
|
||||
~~~
|
||||
# sudo -iu foo
|
||||
$ umask 002
|
||||
$ cd gitlab
|
||||
$ git fetch --all
|
||||
$ git checkout -- Gemfile.lock db/schema.rb
|
||||
$ git checkout v8.14.2 -b v8.14.2
|
||||
$ git checkout v8.14.y -b v8.14.y
|
||||
$ sed -i -e s'/app_user="git"/app_user="foo"/' \
|
||||
-e 's/# Provides: .*gitlab$/# Provides: gitlab-foo/' \
|
||||
lib/support/init.d/gitlab
|
||||
$ sed -i 's@script_path = "/etc/init.d/gitlab"@script_path = "/etc/init.d/foo"@g' lib/tasks/gitlab/check.rake
|
||||
$ sed -i 's#script_path = "/etc/init.d/gitlab"#script_path = "/etc/init.d/gitlab-foo"#g' lib/tasks/gitlab/check.rake
|
||||
$ git commit -a -m 'change default user'
|
||||
~~~
|
||||
|
||||
### Mise à jour de gitlab-shell
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab-shell
|
||||
$ git fetch
|
||||
$ git checkout v$(cat ~/gitlab/GITLAB_SHELL_VERSION) -b v$(cat ~/gitlab/GITLAB_SHELL_VERSION)
|
||||
~~~
|
||||
|
||||
### Mise à jour de gitlab-workhorse
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab-workhorse
|
||||
$ git fetch
|
||||
$ git checkout v$(cat ~/gitlab/GITLAB_WORKHORSE_VERSION) -b v$(cat ~/gitlab/GITLAB_WORKHORSE_VERSION)
|
||||
$ make
|
||||
$ bundle exec rake "gitlab:workhorse:install[/home/foo/gitlab-workhorse]" RAILS_ENV=production
|
||||
~~~
|
||||
|
||||
### Mise à jour base de données, Gems et assets
|
||||
|
@ -508,28 +461,15 @@ $ make
|
|||
$ cd ~/gitlab
|
||||
$ bundle install --without development test mysql aws kerberos --deployment
|
||||
$ bundle clean
|
||||
$ bundle exec rake db:migrate RAILS_ENV=production
|
||||
$ bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
|
||||
$ git commit -a -m 'upgraded to 8.14.2'
|
||||
$ git commit -a -m 'upgraded to 8.14.y'
|
||||
~~~
|
||||
|
||||
### Redémarrer GitLab
|
||||
|
||||
~~~
|
||||
# /etc/init.d/gitlab-foo restart
|
||||
|
||||
Shutting down GitLab Unicorn
|
||||
Shutting down GitLab Sidekiq
|
||||
Shutting down GitLab Workhorse
|
||||
.
|
||||
GitLab is not running.
|
||||
Starting GitLab Unicorn
|
||||
Starting GitLab Sidekiq
|
||||
Starting GitLab Workhorse
|
||||
|
||||
The GitLab Unicorn web server with pid 8120 is running.
|
||||
The GitLab Sidekiq job dispatcher with pid 8221 is running.
|
||||
The GitLab Workhorse with pid 8202 is running.
|
||||
GitLab and all its components are up and running.
|
||||
~~~
|
||||
|
||||
### Vérifier le statut
|
||||
|
|
Loading…
Reference in a new issue