0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Gitlab Mattermost 2.2.0 => 3.1.0, 3.2.0 へのアップデート (Gitlab omnibus を利用)

Posted at

2.2.0 => 3.1.0 へのアップデート

GitLab Documentation

上記ページの 「Upgrading GitLab Mattermost from versions prior to 8.9」 を参照。

※以下の手順はあくまでも私の環境での確認のみしか行っていません。上記公式ページを参照のもと、自己責任で実行願います。

1. Confirm you are starting with version GitLab 8.8.

例として以下のような環境からアップデートを行います。

$ dpkg -l gitlab-ce
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                        Version                    Architecture               Description
+++-===========================================-==========================-==========================-===========================================================================================
ii  gitlab-ce                                   8.8.5-ce.1                 amd64                      GitLab Community Edition and GitLab CI (including NGINX, Postgres, Redis)

2. Backup your Mattermost database.

失敗した時用にバックアップを作成します。

$ sudo -u gitlab-psql -- /opt/gitlab/embedded/bin/pg_dump -h /var/opt/gitlab/postgresql mattermost_production | gzip > mattermost_dbdump_$(date --rfc-3339=date).sql.gz
実行例
$ sudo -u gitlab-psql -- /opt/gitlab/embedded/bin/pg_dump -h /var/opt/gitlab/postgresql mattermost_production | gzip > mattermost_dbdump_$(date --rfc-3339=date).sql.gz
$ ls
mattermost_dbdump_2016-08-12.sql.gz

3. Configure two settings.

gitlab.rb3.1 に合わせて修正します。

$ sudo vi /etc/gitlab/gitlab.rb

以下を追加します。

/etc/gitlab/gitlab.rb
mattermost['db2_backup_created'] = true
mattermost['db2_team_name'] = "TEAMNAME"

TEAMNAMEは使用しているチーム名に合わせて変更して下さい。
3.1 より、複数チームに対応しているため、メインのチーム名を指定する必要があるようです。
If you use multiple teams, this should be the name of the team most commonly used. とのことです。

4. Run your GitLab 8.9 upgrade as normal.

8.9.0-ce.0 にアップデートします。

$ sudo apt-get update
$ sudo apt-get install gitlab-ce=8.9.0-ce.0
$ sudo gitlab-ctl restart

これで成功すればバージョンが 3.1.0 になっているはずです。

無題.png

3.1.0 => 3.2.0 へのアップデート

このまま 3.2.0 へのアップデートもできることを確認できました。

$ sudo apt-get update --fix-missing
$ sudo apt-get install gitlab-ce
$ sudo gitlab-ctl restart
$ dpkg -l gitlab-ce
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                        Version                    Architecture               Description
+++-===========================================-==========================-==========================-===========================================================================================
ii  gitlab-ce                                   8.10.5-ce.0                amd64                      GitLab Community Edition and GitLab CI (including NGINX, Postgres, Redis)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?