5
4

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 3 years have passed since last update.

GitLab13 => 14アップデート(docker-compose)

Last updated at Posted at 2021-07-02

今回は13.0.0から14.0.1へのアップデートを行った際の備忘録を残しておきます

なお、最新のバージョンについてはDockerHubを確認してください
gitlab/gitlab-ce
gitlab/gitlab-runner

※アップデート実行前には必ずバックアップを取りましょう

追記)12 => 13へのバージョンアップは以前書いた記事を参照ください

とりあえずdockerイメージのバージョンを14にしてコンテナを作り直してみる

docker-compose.yml
version: '2'
services:
  gitlab:
    image: 'gitlab/gitlab-ce:14.0.1-ce.0'
    ・・・
  gitlab-runner:
    image: gitlab/gitlab-runner:v14.0.1

これでdocker-compose downしてv13のコンテナを削除した後、docker-compose upしてみましたが、gitlabコンテナが異常終了してしまい、ダメでした。。。
ログを見ると以下のようなメッセージがありました。

 It seems you are upgrading from major version 13 to major version 14.
 It is required to upgrade to the latest 13.12.x version first before proceeding.

いったん13.12.0にアップデート

gitlabおよびgitlab-runnerコンテナを13.12.0にアップデートします

docker-compose.yml
version: '2'
services:
  gitlab:
    image: 'gitlab/gitlab-ce:13.12.0-ce.0'
    ・・・
  gitlab-runner:
    image: gitlab/gitlab-runner:v13.12.0

docker-compose upするだけで無事にアップデートできました

image.png

確認出来たらdocker-compose downでコンテナを削除します

14へアップデート

冒頭で記載した内容にdocker-compose.ymlを更新して、docker-compose upします

またエラーが。。。

またGitlabコンテナが異常終了してしまいました。
ログを見ると以下のようなメッセージが出ていました。

 Removals:
* unicorn['worker_processes'] has been deprecated since 13.10 and was removed in 14.0. Starting with GitLab 14.0, Unicorn is no longer supported and users must switch to Puma, following https://docs.gitlab.com/ee/administration/operations/puma.html.

GitLab14からはunicornからPumaに切り替わったのでunicornのパラメータを消せという内容みたいです。

docker-compose.ymlのenvironmentで指定していたのですが、Pumaの場合puma['worker_processes']と指定すれば良いそうなので、修正して再度docker-compose upしてみます
参考:https://docs.gitlab.com/ee/administration/operations/puma.html

unicorn関連の設定はすべて置き換える必要があります。
※docker-compose.ymlで指定してない場合はgitlab.rbを編集してください

image.png

無事立ち上がりました!!!

5
4
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
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?