GitLab10.4から11.4にアップデートする

10.4から11.4にいきなりアップデートはできない。
yumでアップデートしようとすると、まず10.8にアップデートしろと言われるのである。

言われた通りに10.8にアップデートを試みる。
とりあえずインストールできるバージョンを見てみる。

インストールできるバージョンの確認

[root@localhost ~]# yum list --showduplicates gitlab-ce
省略
gitlab-ce.x86_64                                   10.7.7-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.0-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.1-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.2-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.3-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.4-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.5-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.6-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   10.8.7-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   11.0.0-ce.0.el7                                       gitlab_gitlab-ce
gitlab-ce.x86_64                                   11.0.1-ce.0.el7                                       gitlab_gitlab-ce
省略

10.8.7をインストールする。

[root@localhost ~]# yum install gitlab-ce-10.8.7-ce.0.el7
省略
 * mattermost['email_send_email_notifications'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_smtp_auth'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_smtp_username'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_smtp_password'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_smtp_server'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_smtp_port'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_feedback_name'] has been deprecated since 10.2 and removed in 11.0.
 * mattermost['email_feedback_email'] has been deprecated since 10.2 and removed in 11.0.
Deprecations found. Please correct them and try again.
error: %pre(gitlab-ce-10.8.7-ce.0.el7.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package gitlab-ce-10.8.7-ce.0.el7.x86_64
gitlab-ce-10.4.0-ce.0.el7.x86_64 was supposed to be removed but is not!
  検証中                  : gitlab-ce-10.4.0-ce.0.el7.x86_64                                                          1/2
  検証中                  : gitlab-ce-10.8.7-ce.0.el7.x86_64                                                          2/2

失敗:
  gitlab-ce.x86_64 0:10.4.0-ce.0.el7                          gitlab-ce.x86_64 0:10.8.7-ce.0.el7

完了しました!
[root@localhost ~]#

mattermostの設定で非推奨のものがあるから直せとのこと。
/etc/gitlab/gitlab.rbの該当部分をコメントアウトしてreconfigureする。

gitlab.rbの修正

[root@localhost ~]# gitlab-ctl reconfigure
Deprecations:

 * Mattermost
        Detected deprecated Mattermost settings. Starting with GitLab 11.0, these settings are no longer supported.
        Check http://docs.gitlab.com/omnibus/gitlab-mattermost/#upgrading-gitlab-mattermost-from-versions-prior-to-11-0 for details.

        * mattermost['email_enable_sign_up_with_email']
        * mattermost['email_enable_sign_in_with_email']
        * mattermost['email_enable_sign_in_with_username']
        * mattermost['email_connection_security']
        * mattermost['email_skip_server_certificate_verification']

gitlab Reconfigured!

非推奨項目が見つかったよと。
なぜ、まとめて教えてくれないのか。
再度、gitlab.rbの該当箇所をコメントアウトしてreconfigureする。

[root@localhost ~]# gitlab-ctl reconfigure
省略
Running handlers:
Running handlers complete
Chef Client finished, 5/585 resources updated in 07 seconds
gitlab Reconfigured!

うまくいったみたいだ。

再度10.8のインストール。

[root@localhost ~]# yum install gitlab-ce-10.8.7-ce.0.el7
省略

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


Upgrade complete! If your GitLab server is misbehaving try running
  sudo gitlab-ctl restart
before anything else.
If you need to roll back to the previous version you can use the database
backup made during the upgrade (scroll up for the filename).

  検証中                  : gitlab-ce-10.8.7-ce.0.el7.x86_64                                                          1/2
  検証中                  : gitlab-ce-10.4.0-ce.0.el7.x86_64                                                          2/2

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

完了しました!

無事に10.8.7にアップデートできたので、
続いて11.4.7にアップデートする。

11.4のインストール

[root@localhost ~]# yum install gitlab-ce-11.4.7-ce.0.el7
省略
     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


Upgrade complete! If your GitLab server is misbehaving try running
  sudo gitlab-ctl restart
before anything else.
If you need to roll back to the previous version you can use the database
backup made during the upgrade (scroll up for the filename).

  検証中                  : gitlab-ce-11.4.7-ce.0.el7.x86_64                                                          1/2
  検証中                  : gitlab-ce-10.8.7-ce.0.el7.x86_64                                                          2/2

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

完了しました!

11.4でマージリクエスト画面でファイルツリーが見れるようになったらしい。
これからは毎月こまめにアップデートしよう。