3
1

More than 1 year has passed since last update.

GitLabのメジャーバージョンアップ対応 14-->15 (15-->16も追記)

Last updated at Posted at 2022-07-19

GitLab14.8.2の脆弱性対応で最新版にしようとしたときに、途中で2つのバージョンを挟む必要があったので記録として残しました。


追記 2023.06.21
15->16も実施しました。今回のメジャーバージョンアップを経験してわかったことは、
・Retry the upgrade after upgrading your PostgreSQL version.のメッセージが出たらPostgreSQLのアップグレードを行う (今回は12->13へアップグレードされました)

$ sudo gitlab-ctl pg-upgrade

・現在のバージョンから最新のバージョンにあげる時には手順をUpgrade Pathで確認してから実施する
です 勉強になりました まとめると15.8.1から16へのアップグレードは
15.8.1-->15.11.10-->16.0.7 の手順でした


どうやったかを先に書くと
14.8.2-> 14.10.5 -> 15.0.0 -> 15.1.2(最新)
の手順で行いました。

ブラウザで確認すると
「GitLab Community Edition 14.8.2」
14.x.xの最後のバージョンを確認

$ sudo yum list --showduplicates gitlab-ce|grep 14\.10|tail -n 2
gitlab-ce.x86_64              14.10.4-ce.0.el7                 gitlab_gitlab-ce
gitlab-ce.x86_64              14.10.5-ce.0.el7                 gitlab_gitlab-ce

14の最後の版を指定してインストール

$ sudo yum install gitlab-ce-14.10.5-ce.0.el7.x86_64
---> パッケージ gitlab-ce.x86_64 0:14.8.2-ce.0.el7 を 更新
---> パッケージ gitlab-ce.x86_64 0:14.10.5-ce.0.el7 を アップデート
  検証中                  : gitlab-ce-14.10.5-ce.0.el7.x86_64                                   1/2
  検証中                  : gitlab-ce-14.8.2-ce.0.el7.x86_64                                    2/2
更新:
  gitlab-ce.x86_64 0:14.10.5-ce.0.el7
$ sudo gitlab-ctl reconfigure
Chef Infra Client finished, 1/817 resources updated in 33 seconds
gitlab Reconfigured!

ブラウザで確認
「GitLab Community Edition 14.10.5」

次は15の最新版へといつもの手順でバージョンアップを行うと、「失敗」と表示された

$ sudo yum install gitlab-ce
---> パッケージ gitlab-ce.x86_64 0:14.10.5-ce.0.el7 を 更新
---> パッケージ gitlab-ce.x86_64 0:15.1.2-ce.0.el7 を アップデート
Error in PREIN scriptlet in rpm package gitlab-ce-15.1.2-ce.0.el7.x86_64
gitlab-ce-14.10.5-ce.0.el7.x86_64 was supposed to be removed but is not!
  検証中  : gitlab-ce-14.10.5-ce.0.el7.x86_64            1/2 
  検証中  : gitlab-ce-15.1.2-ce.0.el7.x86_64             2/2 
失敗:
  gitlab-ce.x86_64 0:14.10.5-ce.0.el7    gitlab-ce.x86_64 0:15.1.2-ce.0.el7

ここで15の最初の版を指定してバージョンアップ

$ sudo yum install gitlab-ce-15.0.0-ce.0.el7.x86_64
  更新します  : gitlab-ce-15.0.0-ce.0.el7.x86_64     
  整理中     : gitlab-ce-14.10.5-ce.0.el7.x86_64 
  検証中                  : gitlab-ce-15.0.0-ce.0.el7.x86_64                                                       1/2 
  検証中                  : gitlab-ce-14.10.5-ce.0.el7.x86_64                                                      2/2 
更新:
  gitlab-ce.x86_64 0:15.0.0-ce.0.el7                                                                                   
完了しました!
$ sudo gitlab-ctl reconfigure

やっといつもの手順で最新版へバージョンアップ

$ sudo yum install gitlab-ce
---> パッケージ gitlab-ce.x86_64 0:15.0.0-ce.0.el7 を 更新
---> パッケージ gitlab-ce.x86_64 0:15.1.2-ce.0.el7 を アップデート
  検証中    : gitlab-ce-15.1.2-ce.0.el7.x86_64  
  検証中    : gitlab-ce-15.0.0-ce.0.el7.x86_64   

更新:
  gitlab-ce.x86_64 0:15.1.2-ce.0.el7                                                                                   

完了しました!
$ sudo gitlab-ctl reconfigure
3
1
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
3
1