Versão do artigo: Enterprise Server 2.17
Substituir um nó de cluster
Para substituir um nó do GitHub Enterprise Server, você deve marcar os nós afetados offline no arquivo de configuração do cluster (cluster.conf) e adicionar os nós de substituição. Fazer isso pode ser necessário em caso de falha de algum nó ou para adicionar nós com mais recursos a fim de melhorar o desempenho.
Aviso: para evitar conflitos, o nó de substituição deve usar um nome de host exclusivo no cluster.
Substituir um nó funcional
- 
Provision and install GitHub Enterprise Server with a unique hostname on the replacement node. 
- 
Using the administrative shell or DHCP, only configure the IP address of the replacement node. Não altere outras configurações. 
- 
To add the newly provisioned replacement node, on any node, modify the cluster.conffile to remove the failed node and add the replacement node. For example, this modifiedcluster.conffile replacesghe-data-node-3with the newly provisioned node,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::7git-server = true pages-server = true mysql-server = true elasticsearch-server = true redis-server = true memcache-server = true metrics-server = true storage-server = true 
- 
From the administrative shell of the node with the modified cluster.conf, runghe-cluster-config-init. This will initialize the newly added node in the cluster.
- 
From the same node, run ghe-cluster-config-apply. This will validate the configuration file, copy it to each node in the cluster, and configure each node according to the modifiedcluster.conffile.
- 
If you're taking a node offline that has git-server = trueset in cluster.conf, evacuate the node. For more information, see "Evacuating a cluster node."
- 
To mark the failed node offline, on any node, modify the cluster configuration file ( cluster.conf) in the relevant node section to include the textoffline = true.For example, this modified cluster.confwill mark theghe-data-node-3node as offline:[cluster "ghe-data-node-3"] hostname = ghe-data-node-3 offline = true ipv4 = 192.168.0.6 # ipv6 = fd12:3456:789a:1::6 
- 
From the administrative shell of the node where you modified cluster.conf, runghe-cluster-config-apply. This will validate the configuration file, copy it to each node in the cluster, and mark the node offline.
- 
If you're replacing the MySQL master node or Redis master node, in cluster.conf, modify themysql-masterorredis-mastervalue with the replacement node name.For example, this modified cluster.conffile specifies a newly provisioned cluster node,ghe-replacement-data-node-1as the MySQL and Redis master node:mysql-master = ghe-replacement-data-node-1 redis-master = ghe-replacement-data-node-1 
Substituir um nó em caso de emergência
- 
Provision and install GitHub Enterprise Server with a unique hostname on the replacement node. 
- 
Using the administrative shell or DHCP, only configure the IP address of the replacement node. Não altere outras configurações. 
- 
To mark the failed node offline, on any node, modify the cluster configuration file ( cluster.conf) in the relevant node section to include the textoffline = true.For example, this modified cluster.confwill mark theghe-data-node-3node as offline:[cluster "ghe-data-node-3"] hostname = ghe-data-node-3 offline = true ipv4 = 192.168.0.6 # ipv6 = fd12:3456:789a:1::6 
- 
From the administrative shell of the node where you modified cluster.conf, runghe-cluster-config-apply. This will validate the configuration file, copy it to each node in the cluster, and mark the node offline.
- 
To add the newly provisioned replacement node, on any node, modify the cluster.conffile to remove the failed node and add the replacement node. For example, this modifiedcluster.conffile replacesghe-data-node-3with the newly provisioned node,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::7git-server = true pages-server = true mysql-server = true elasticsearch-server = true redis-server = true memcache-server = true metrics-server = true storage-server = true 
- 
If you're replacing the MySQL master node or Redis master node, in cluster.conf, modify themysql-masterorredis-mastervalue with the replacement node name.For example, this modified cluster.conffile specifies a newly provisioned cluster node,ghe-replacement-data-node-1as the MySQL and Redis master node:mysql-master = ghe-replacement-data-node-1 redis-master = ghe-replacement-data-node-1 
- 
From the administrative shell of the node with the modified cluster.conf, runghe-cluster-config-init. This will initialize the newly added node in the cluster.
- 
From the same node, run ghe-cluster-config-apply. This will validate the configuration file, copy it to each node in the cluster, and configure each node according to the modifiedcluster.conffile.
- 
If you're taking a node offline that has git-server = trueset in cluster.conf, evacuate the node. For more information, see "Evacuating a cluster node."