About replacement of GitHub Enterprise Server cluster nodes
You can replace a functional node in a GitHub Enterprise Server cluster, or you can replace a node that has failed unexpectedly.
Warning: To avoid conflicts, do not reuse a hostname that was previously assigned to a node in the cluster.
Replacing a functional node
You can replace an existing, functional node in your cluster. For example, you may want to provide a virtual machine (VM) with additional CPU, memory, or storage resources.
To replace a functional node, install the GitHub Enterprise Server appliance on a new VM, configure an IP address, add the new node to the cluster configuration file, initialize the cluster and apply the configuration, then take the node you replaced offline.
-
置き換えノードに一意のホスト名を指定し、GitHub Enterprise Server をプロビジョニングしてインストールします。
-
管理シェルまたは DHCP を使用して、置換ノードの IP アドレスのみを構成します。 その他の設定は行わないでください。
-
任意のノードに対して、新たにプロビジョニングされた置換ノードを追加するには、
cluster.conf
ファイルを修正し、障害が起きたノードを取り除き、置換ノードを追加します。 たとえば、このように変更したcluster.conf
ファイルでは、ghe-data-node-3
を新しくプロビジョニングされたghe-replacement-data-node-3
ノードで置換します。[cluster "ghe-replacement-data-node-3"] hostname = ghe-replacement-data-node-3 ipv4 = 192.168.0.7 # ipv6 = fd12:3456:789a:1::7 git-server = true pages-server = true mysql-server = true elasticsearch-server = true redis-server = true memcache-server = true metrics-server = true storage-server = true
-
変更された
cluster.conf
があるノードの管理シェルから、ghe-cluster-config-init
を実行します。 これで、クラスタに新たに追加されたノードが初期化されます。 -
同じノードから、
ghe-cluster-config-apply
を実行します。 これにより、構成ファイルが検証され、クラスター内の各ノードにコピーされ、変更されたcluster.conf
ファイルに従って各ノードが設定されます。 -
git-server
、pages-server
、storage-server
などのデータ サービスを提供するノードをオフラインにしている場合は、ノードを退避します。 詳しくは、「Evacuating a cluster node running data services」を参照してください。 -
障害が発生したノードをオフラインとしてマークするには、
offline = true
というテキストを含むようにクラスター構成ファイル (cluster.conf
) の関連するノードのセクションを変更します。たとえば、このように変更した
cluster.conf
では、ghe-data-node-3
ノードをオフラインとしてマークします。[cluster "ghe-data-node-3"] hostname = ghe-data-node-3 offline = true ipv4 = 192.168.0.6 # ipv6 = fd12:3456:789a:1::6
-
cluster.conf
を変更したノードの管理シェルから、ghe-cluster-config-apply
を実行します。 これで設定ファイルが検証され、クラスタ内の各ノードにコピーされ、そのノードがオフラインとしてマークされます。 -
プライマリ MySQL または Redis ノードを置き換える場合は、
cluster.conf
でmysql-master
またはredis-master
の値を置換ノード名に変更します。たとえば、この変更された
cluster.conf
ファイルは、プライマリ MySQL および Redis ノードとして、新しくプロビジョニングされたクラスター ノードghe-replacement-data-node-1
を指定します。mysql-master = ghe-replacement-data-node-1 redis-master = ghe-replacement-data-node-1
Replacing a node in an emergency
You can replace a failed node in your cluster. For example, a software or hardware issue may affect a node's availability.
To replace a node in an emergency, install the GitHub Enterprise Server appliance on a new VM, configure an IP address, take the failed node offline, apply the configuration, add the new node to the cluster configuration file, initialize the cluster and apply the configuration, and optionally, evacuate the failed node.
-
置き換えノードに一意のホスト名を指定し、GitHub Enterprise Server をプロビジョニングしてインストールします。
-
管理シェルまたは DHCP を使用して、置換ノードの IP アドレスのみを構成します。 その他の設定は行わないでください。
-
障害が発生したノードをオフラインとしてマークするには、
offline = true
というテキストを含むようにクラスター構成ファイル (cluster.conf
) の関連するノードのセクションを変更します。たとえば、このように変更した
cluster.conf
では、ghe-data-node-3
ノードをオフラインとしてマークします。[cluster "ghe-data-node-3"] hostname = ghe-data-node-3 offline = true ipv4 = 192.168.0.6 # ipv6 = fd12:3456:789a:1::6
-
cluster.conf
を変更したノードの管理シェルから、ghe-cluster-config-apply
を実行します。 これで設定ファイルが検証され、クラスタ内の各ノードにコピーされ、そのノードがオフラインとしてマークされます。 -
任意のノードに対して、新たにプロビジョニングされた置換ノードを追加するには、
cluster.conf
ファイルを修正し、障害が起きたノードを取り除き、置換ノードを追加します。 たとえば、このように変更したcluster.conf
ファイルでは、ghe-data-node-3
を新しくプロビジョニングされたghe-replacement-data-node-3
ノードで置換します。[cluster "ghe-replacement-data-node-3"] hostname = ghe-replacement-data-node-3 ipv4 = 192.168.0.7 # ipv6 = fd12:3456:789a:1::7 git-server = true pages-server = true mysql-server = true elasticsearch-server = true redis-server = true memcache-server = true metrics-server = true storage-server = true
-
プライマリ MySQL または Redis ノードを置き換える場合は、
cluster.conf
でmysql-master
またはredis-master
の値を置換ノード名に変更します。たとえば、この変更された
cluster.conf
ファイルは、プライマリ MySQL および Redis ノードとして、新しくプロビジョニングされたクラスター ノードghe-replacement-data-node-1
を指定します。mysql-master = ghe-replacement-data-node-1 redis-master = ghe-replacement-data-node-1
-
変更された
cluster.conf
があるノードの管理シェルから、ghe-cluster-config-init
を実行します。 これで、クラスタに新たに追加されたノードが初期化されます。 -
同じノードから、
ghe-cluster-config-apply
を実行します。 これにより、構成ファイルが検証され、クラスター内の各ノードにコピーされ、変更されたcluster.conf
ファイルに従って各ノードが設定されます。 -
git-server
、pages-server
、storage-server
などのデータ サービスを提供するノードをオフラインにしている場合は、ノードを退避します。 詳しくは、「Evacuating a cluster node running data services」を参照してください。