メンテナンスモードについて
操作の種類によっては、GitHub Enterprise Serverインスタンス をオフラインにしてメンテナンスモードにする必要があります。
- GitHub Enterprise Server の新規バージョンにアップグレードする
- 仮想マシンに割り当てられている CPU、メモリ、またはストレージリソースを拡大する
- ある仮想マシンから別の仮想マシンへデータを移行する
- GitHub Enterprise Serverバックアップユーティリティ スナップショットからデータを復元する
- 特定の種類の重要なアプリケーション問題のトラブルシューティング
メンテナンスウィンドウのスケジュールは、ユーザに準備時間を与えるために少なくとも30分は先にすることをおすすめします。 メンテナンスウィンドウがスケジューリングされると、すべてのユーザにはサイトにアクセスしたときにバナーが表示されます。
インスタンスがメンテナンスモードに入ると、通常のHTTP及びGitアクセスはすべて拒否されます。 Git fetch、clone、pushの操作も、サイトが一時的に利用できなくなっていることを示すエラーメッセージと共に拒否されます。 In high availability configurations, Git replication will be paused. GitHub Actions jobs will not be executed. サイトにブラウザーでアクセスすると、メンテナンスページが表示されます。
You can perform initial validation of your maintenance operation by configuring an IP exception list to allow access to GitHub Enterprise Serverインスタンス from only the IP addresses and ranges provided. Attempts to access GitHub Enterprise Serverインスタンス from IP addresses not specified on the IP exception list will receive a response consistent with those sent when the instance is in maintenance mode.
メンテナンスモードの即時有効化あるいは後のためのメンテナンスウィンドウのスケジューリング
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
左のサイドバーでManagement Consoleをクリックしてください。
-
Management Consoleの上部でMaintenance(メンテナンス)をクリックしてください
-
"Enable and schedule(有効化とスケジュール)"の下で、即時にメンテナンスモードを有効化するか、将来にメンテナンスウィンドウをスケジューリングするかを決めてください。
- メンテナンスモードを直ちに有効にするには、プルダウンメニューを使用して [now] をクリックします。
- 今後のメンテナンス時間枠をスケジュール設定するには、ドロップダウンメニューを使用して開始時間をクリックします。
- メンテナンスモードを直ちに有効にするには、プルダウンメニューを使用して [now] をクリックします。
-
Enable maintenance mode(メンテナンスモードの有効化)を選択してください。
-
左のサイドバーの下でSave settings(設定の保存)をクリックしてください。
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
設定が完了するのを待ってください。
Validating changes in maintenance mode using the IP exception list
The IP exception list provides controlled and restricted access to GitHub Enterprise Serverインスタンス, which is ideal for initial validation of server health following a maintenance operation. Once enabled, GitHub Enterprise Serverインスタンス will be taken out of maintenance mode and available only to the configured IP addresses. The maintenance mode checkbox will be updated to reflect the change in state.
If you re-enable maintenance mode, the IP exception list will be disabled and GitHub Enterprise Serverインスタンス will return to maintenance mode. If you just disable the IP exception list, GitHub Enterprise Serverインスタンス will return to normal operation.
You can also use a command-line utility to configure the IP exception list. For more information, see "Command-line utilities" and "Accessing the administrative shell (SSH)."
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
左のサイドバーでManagement Consoleをクリックしてください。
-
At the top of the Management Console, click Maintenance, and confirm maintenance mode is already enabled.
-
Select Enable IP exception list.
-
In the text box, type a valid list of space-separated IP addresses or CIDR blocks that should be allowed to access GitHub Enterprise Serverインスタンス.
-
[Save] をクリックします。
GitHub Enterprise Server APIでのメンテナンスモードのスケジューリング
GitHub Enterprise Server APIでは、様々な時間や日付にメンテナンスをスケジューリングできます。 詳しい情報については、「Management Console」を参照してください。
クラスタ内の全ノードでのメンテナンスモードの有効化もしくは無効化
ghe-cluster-maintenance
ユーティリティを使えば、クラスタ内のすべてのノードでメンテナンスモードの設定や解除ができます。
$ ghe-cluster-maintenance -h
# オプションの表示
$ ghe-cluster-maintenance -q
# 現在のモードの問い合わせ
$ ghe-cluster-maintenance -s
# メンテナンスモードの設定
$ ghe-cluster-maintenance -u
# メンテナンスモードの解除