1
0
mirror of synced 2026-01-08 12:01:53 -05:00

Merge pull request #32211 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-03-25 09:31:33 -04:00
committed by GitHub
4 changed files with 110 additions and 33 deletions

View File

@@ -664,38 +664,23 @@ $ ghe-cluster-maintenance -u
# Unsets maintenance mode
```
{% ifversion cluster-node-removal %}
{% ifversion cluster-ha-tooling-improvements %}
### ghe-remove-node
### ghe-cluster-repl-bootstrap
This utility removes a node from a cluster. If you're replacing a node, after you've set up a replacement node, you can use this command to take the old node offline. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/replacing-a-cluster-node)."
You must run this command from the primary MySQL node in your cluster, which is typically the node designated as `mysql-master` in your cluster configuration file (`cluster.conf`). You can use this command to remove any node, with the exception of the `mysql-master` or `redis-master` node. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/initializing-the-cluster#about-the-cluster-configuration-file)."
This utility configures high availability replication to a secondary set of cluster nodes. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/configuring-high-availability-replication-for-a-cluster)."
```shell
ghe-remove-node HOSTNAME
ghe-cluster-repl-bootstrap
```
The command does the following things:
- Evacuates data from any data services running on the node, so that the remaining nodes in your cluster contain copies of the data
- Marks the node as offline in your configuration, applies this change to the rest of the nodes in the cluster, and stops traffic being routed to the node
### ghe-cluster-repl-teardown
You can run the command with the following flags.
This utility disables replication to replica nodes for a cluster in a high availability configuration. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/configuring-high-availability-replication-for-a-cluster#disabling-high-availability-replication-for-a-cluster)."
Flag | Description
---- | ----------
`-ne/--no-evacuate` | Skips evacuation of data services (warning: may result in data loss).
`-v/--verbose` | Prints additional information to the console.
`-h/--help` | Displays help text for the command.
{% note %}
**Notes:**
- This command can only be used to remove a node from a cluster configuration. It cannot be used to remove a node from a high availability configuration.
- This command does not support parallel execution. To remove multiple nodes, you must wait until this command has finished before running it for another node.
{% endnote %}
```shell
ghe-cluster-repl-teardown
```
{% endif %}
@@ -763,6 +748,41 @@ To evacuate a {% data variables.product.prodname_pages %} storage service before
ghe-dpages evacuate pages-server-UUID
```
{% ifversion cluster-node-removal %}
### ghe-remove-node
This utility removes a node from a cluster. If you're replacing a node, after you've set up a replacement node, you can use this command to take the old node offline. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/replacing-a-cluster-node)."
You must run this command from the primary MySQL node in your cluster, which is typically the node designated as `mysql-master` in your cluster configuration file (`cluster.conf`). You can use this command to remove any node, with the exception of the `mysql-master` or `redis-master` node. For more information, see "[AUTOTITLE](/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/initializing-the-cluster#about-the-cluster-configuration-file)."
```shell
ghe-remove-node HOSTNAME
```
The command does the following things:
- Evacuates data from any data services running on the node, so that the remaining nodes in your cluster contain copies of the data
- Marks the node as offline in your configuration, applies this change to the rest of the nodes in the cluster, and stops traffic being routed to the node
You can run the command with the following flags.
Flag | Description
---- | ----------
`-ne/--no-evacuate` | Skips evacuation of data services (warning: may result in data loss).
`-v/--verbose` | Prints additional information to the console.
`-h/--help` | Displays help text for the command.
{% note %}
**Notes:**
- This command can only be used to remove a node from a cluster configuration. It cannot be used to remove a node from a high availability configuration.
- This command does not support parallel execution. To remove multiple nodes, you must wait until this command has finished before running it for another node.
{% endnote %}
{% endif %}
{% ifversion ghe-spokes-deprecation-phase-1 %}
### ghe-spokesctl

View File

@@ -47,11 +47,38 @@ You must assign a static IP address to each new node that you provision, and you
## Creating a high availability replica for a cluster
- [Assigning active nodes to the primary datacenter](#assigning-active-nodes-to-the-primary-datacenter)
- [Adding replica nodes to the cluster configuration file](#adding-replica-nodes-to-the-cluster-configuration-file)
- [Example configuration](#example-configuration)
{% ifversion cluster-ha-tooling-improvements %}
### Assigning active nodes to the primary datacenter
To create a high availability replica for your cluster, use the `ghe-cluster-repl-bootstrap` utility, then complete the follow-up tasks that the tool details.
{% data reusables.enterprise_clustering.ssh-to-a-node %}
1. To begin configuration of high availability, run the following command. The `-p` and `-s` flags are optional. If you're using the flags, replace PRIMARY-DATACENTER and SECONDARY-DATACENTER with the names of your primary and secondary datacenters.
{% note %}
**Notes:**
- By default, the utility will use the name of the primary datacenter in `cluster.conf`.
- If no name for the primary datacenter is defined, the utility will use `mona`.
- If no name for the secondary datacenter is defined, the utility will use `hubot`.
{% endnote %}
```shell copy
ghe-cluster-repl-bootstrap -p PRIMARY-DATACENTER -s SECONDARY-DATACENTER
```
1. After the utility runs, you will see output with further instructions. To finish the configuration, complete the tasks listed in the output.
{% else %}
To create a high availability replica for your cluster, you must complete the following tasks. You can also review an example configuration.
1. [Assign active nodes to the primary datacenter](#1-assign-active-nodes-to-the-primary-datacenter).
1. [Add replica nodes to the cluster configuration file](#2-add-replica-nodes-to-the-cluster-configuration-file).
1. [Review an example configuration](#3-review-an-example-configuration).
### 1. Assign active nodes to the primary datacenter
Before you define a secondary datacenter for your replica nodes, ensure that you assign your active nodes to the primary datacenter.
@@ -100,7 +127,7 @@ Before you define a secondary datacenter for your replica nodes, ensure that you
After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished assigning your nodes to the cluster's primary datacenter.
### Adding replica nodes to the cluster configuration file
### 2. Add replica nodes to the cluster configuration file
To configure high availability, you must define a corresponding replica node for every active node in your cluster. To create a new cluster configuration that defines both active and replica nodes, you'll complete the following tasks.
@@ -231,7 +258,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
You've finished configuring high availability replication for the nodes in your cluster. Each active node begins replicating configuration and data to its corresponding replica node, and you can direct traffic to the load balancer for the secondary datacenter in the event of a failure. For more information about failing over, see "[AUTOTITLE](/enterprise/admin/enterprise-management/initiating-a-failover-to-your-replica-cluster)."
### Example configuration
### 3. Review an example configuration
The top-level `[cluster]` configuration should look like the following example.
@@ -295,6 +322,8 @@ The configuration for the corresponding replica node in the storage tier should
...
```
{% endif %}
## Monitoring replication between active and replica cluster nodes
Initial replication between the active and replica nodes in your cluster takes time. The amount of time depends on the amount of data to replicate and the activity levels for {% data variables.product.prodname_ghe_server %}.
@@ -322,7 +351,24 @@ If you use the original active nodes, after reconfiguring high availability, you
## Disabling high availability replication for a cluster
You can stop replication to the replica nodes for your cluster deployment of {% data variables.product.prodname_ghe_server %}.
You can stop replication to the replica nodes for your cluster deployment of {% data variables.product.prodname_ghe_server %}{% ifversion cluster-ha-tooling-improvements %} using the `ghe-cluster-repl-teardown` utility. Alternatively, you can manually disable replication.{% else %}.{% endif %}
{% ifversion cluster-ha-tooling-improvements %}
### Disabling replication using `ghe-cluster-repl-teardown`
{% data reusables.enterprise_clustering.ssh-to-a-node %}
1. To disable replication, run the following command:
```shell copy
ghe-cluster-repl-teardown
```
{% data reusables.enterprise_clustering.configuration-finished %}
### Manually disabling replication
{% endif %}
{% data reusables.enterprise_clustering.ssh-to-a-node %}
{% data reusables.enterprise_clustering.open-configuration-file %}
@@ -330,5 +376,3 @@ You can stop replication to the replica nodes for your cluster deployment of {%
1. Delete each section for a replica node. For replica nodes, `replica` is configured as `enabled`.
{% data reusables.enterprise_clustering.apply-configuration %}
{% data reusables.enterprise_clustering.configuration-finished %}
After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished disabling high availability replication.

View File

@@ -0,0 +1,5 @@
# Reference: #13596
# Improvements to tooling for cluster HA
versions:
ghes: '>= 3.12'

View File

@@ -22,6 +22,14 @@ sections:
# https://github.com/github/releases/issues/3676
- |
On an instance in a cluster configuration, administrators can use the `ghe-remove-node` command-line utility to remove a node from a cluster. This command evacuates data from the node's data services, marks the node as offline, and stops traffic being routed to the node, replacing the manual steps previously required to remove a node. For more information, see "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-remove-node)." [Updated: 2024-02-28]
# https://github.com/github/releases/issues/3802
- |
On an instance in a cluster configuration, administrators can more easily configure or tear down a high availability replica of the cluster. For more information, see the documentation for the following utilities in the "Command-line utilities" article:
- [`ghe-cluster-repl-bootstrap`](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-cluster-repl-bootstrap)
- [`ghe-cluster-repl-teardown`](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-cluster-repl-teardown)
[Updated: 2024-03-25]
- heading: Authentication
notes: