Migration vers 9
This commit is contained in:
parent
eb17ab4290
commit
0f9d4c7005
|
@ -495,9 +495,91 @@ $ npm install --production
|
|||
$ bundle exec rake gitlab:assets:clean gitlab:assets:compile cache:clear RAILS_ENV=production
|
||||
```
|
||||
|
||||
Il est aussi nécessaire de disposer de l'outil [Yarn](https://wiki.evolix.org/HowtoYarn).
|
||||
|
||||
## Mise à jour majeure
|
||||
|
||||
En attente de la version 9 :)
|
||||
D'une version 8.x.y à 9.x.y.
|
||||
|
||||
### Sauvegarde
|
||||
|
||||
~~~
|
||||
# sudo -iu foo
|
||||
$ cd gitlab
|
||||
$ bundle exec rake gitlab:backup:create RAILS_ENV=production
|
||||
~~~
|
||||
|
||||
### Mise à jour de GitLab
|
||||
|
||||
~~~
|
||||
$ umask 002
|
||||
$ git fetch --all
|
||||
$ git checkout -- Gemfile.lock db/schema.rb
|
||||
$ git checkout -B v9-0-stable 9-0-stable
|
||||
$ 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 de gitlab-shell
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab-shell
|
||||
$ git fetch --all --tags
|
||||
$ git checkout -B v$(< ~/gitlab/GITLAB_SHELL_VERSION) $(< ~/gitlab/GITLAB_SHELL_VERSION)
|
||||
~~~
|
||||
|
||||
### Mise à jour de gitlab-workhorse
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab-workhorse
|
||||
$ git fetch --all --tags
|
||||
$ git checkout -B v$(< ~/gitlab/GITLAB_WORKHORSE_VERSION) tags/v$(< ~/gitlab/GITLAB_WORKHORSE_VERSION)
|
||||
$ make
|
||||
~~~
|
||||
|
||||
### Merger les fichiers de configurations
|
||||
|
||||
~~~
|
||||
$ cd ~/gitlab
|
||||
$ vimdiff config/gitlab.yml <(git show origin/9-0-stable:config/gitlab.yml.example)
|
||||
~~~
|
||||
|
||||
~~~
|
||||
# cd /home/foo/gitlab
|
||||
# vimdiff /etc/nginx/sites-available/gitlab-demo00 <(git show origin/9-0-stable:lib/support/nginx/gitlab-ssl)
|
||||
~~~
|
||||
|
||||
### 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 db:migrate RAILS_ENV=production
|
||||
$ bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
|
||||
$ bundle exec rake cache:clear RAILS_ENV=production
|
||||
$ git commit -a -m 'upgraded to 9-0-stable'
|
||||
~~~
|
||||
|
||||
### 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 !
|
||||
|
||||
# Divers / FAQ
|
||||
|
||||
|
|
Loading…
Reference in a new issue