Skip to content

Commit e86ad10

Browse files
authored
Merge pull request #32211 from github/repo-sync
Repo sync
2 parents 98e48df + aa8dfd9 commit e86ad10

File tree

4 files changed

+110
-33
lines changed

4 files changed

+110
-33
lines changed

content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -664,38 +664,23 @@ $ ghe-cluster-maintenance -u
664664
# Unsets maintenance mode
665665
```
666666

667-
{% ifversion cluster-node-removal %}
668-
669-
### ghe-remove-node
667+
{% ifversion cluster-ha-tooling-improvements %}
670668

671-
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)."
669+
### ghe-cluster-repl-bootstrap
672670

673-
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)."
671+
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)."
674672

675673
```shell
676-
ghe-remove-node HOSTNAME
674+
ghe-cluster-repl-bootstrap
677675
```
678676

679-
The command does the following things:
680-
- Evacuates data from any data services running on the node, so that the remaining nodes in your cluster contain copies of the data
681-
- 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
682-
683-
You can run the command with the following flags.
677+
### ghe-cluster-repl-teardown
684678

685-
Flag | Description
686-
---- | ----------
687-
`-ne/--no-evacuate` | Skips evacuation of data services (warning: may result in data loss).
688-
`-v/--verbose` | Prints additional information to the console.
689-
`-h/--help` | Displays help text for the command.
679+
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)."
690680

691-
{% note %}
692-
693-
**Notes:**
694-
695-
- 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.
696-
- 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.
697-
698-
{% endnote %}
681+
```shell
682+
ghe-cluster-repl-teardown
683+
```
699684

700685
{% endif %}
701686

@@ -763,6 +748,41 @@ To evacuate a {% data variables.product.prodname_pages %} storage service before
763748
ghe-dpages evacuate pages-server-UUID
764749
```
765750
751+
{% ifversion cluster-node-removal %}
752+
753+
### ghe-remove-node
754+
755+
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)."
756+
757+
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)."
758+
759+
```shell
760+
ghe-remove-node HOSTNAME
761+
```
762+
763+
The command does the following things:
764+
- Evacuates data from any data services running on the node, so that the remaining nodes in your cluster contain copies of the data
765+
- 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
766+
767+
You can run the command with the following flags.
768+
769+
Flag | Description
770+
---- | ----------
771+
`-ne/--no-evacuate` | Skips evacuation of data services (warning: may result in data loss).
772+
`-v/--verbose` | Prints additional information to the console.
773+
`-h/--help` | Displays help text for the command.
774+
775+
{% note %}
776+
777+
**Notes:**
778+
779+
- 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.
780+
- 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.
781+
782+
{% endnote %}
783+
784+
{% endif %}
785+
766786
{% ifversion ghe-spokes-deprecation-phase-1 %}
767787
768788
### ghe-spokesctl

content/admin/monitoring-managing-and-updating-your-instance/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,38 @@ You must assign a static IP address to each new node that you provision, and you
4747

4848
## Creating a high availability replica for a cluster
4949

50-
- [Assigning active nodes to the primary datacenter](#assigning-active-nodes-to-the-primary-datacenter)
51-
- [Adding replica nodes to the cluster configuration file](#adding-replica-nodes-to-the-cluster-configuration-file)
52-
- [Example configuration](#example-configuration)
50+
{% ifversion cluster-ha-tooling-improvements %}
5351

54-
### Assigning active nodes to the primary datacenter
52+
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.
53+
54+
{% data reusables.enterprise_clustering.ssh-to-a-node %}
55+
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.
56+
57+
{% note %}
58+
59+
**Notes:**
60+
61+
- By default, the utility will use the name of the primary datacenter in `cluster.conf`.
62+
- If no name for the primary datacenter is defined, the utility will use `mona`.
63+
- If no name for the secondary datacenter is defined, the utility will use `hubot`.
64+
65+
{% endnote %}
66+
67+
```shell copy
68+
ghe-cluster-repl-bootstrap -p PRIMARY-DATACENTER -s SECONDARY-DATACENTER
69+
```
70+
71+
1. After the utility runs, you will see output with further instructions. To finish the configuration, complete the tasks listed in the output.
72+
73+
{% else %}
74+
75+
To create a high availability replica for your cluster, you must complete the following tasks. You can also review an example configuration.
76+
77+
1. [Assign active nodes to the primary datacenter](#1-assign-active-nodes-to-the-primary-datacenter).
78+
1. [Add replica nodes to the cluster configuration file](#2-add-replica-nodes-to-the-cluster-configuration-file).
79+
1. [Review an example configuration](#3-review-an-example-configuration).
80+
81+
### 1. Assign active nodes to the primary datacenter
5582

5683
Before you define a secondary datacenter for your replica nodes, ensure that you assign your active nodes to the primary datacenter.
5784

@@ -100,7 +127,7 @@ Before you define a secondary datacenter for your replica nodes, ensure that you
100127
101128
After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished assigning your nodes to the cluster's primary datacenter.
102129
103-
### Adding replica nodes to the cluster configuration file
130+
### 2. Add replica nodes to the cluster configuration file
104131
105132
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.
106133
@@ -231,7 +258,7 @@ For an example configuration, see "[Example configuration](#example-configuratio
231258
232259
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)."
233260
234-
### Example configuration
261+
### 3. Review an example configuration
235262
236263
The top-level `[cluster]` configuration should look like the following example.
237264
@@ -295,6 +322,8 @@ The configuration for the corresponding replica node in the storage tier should
295322
...
296323
```
297324

325+
{% endif %}
326+
298327
## Monitoring replication between active and replica cluster nodes
299328

300329
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,13 +351,28 @@ If you use the original active nodes, after reconfiguring high availability, you
322351

323352
## Disabling high availability replication for a cluster
324353

325-
You can stop replication to the replica nodes for your cluster deployment of {% data variables.product.prodname_ghe_server %}.
354+
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 %}
355+
356+
{% ifversion cluster-ha-tooling-improvements %}
357+
358+
### Disabling replication using `ghe-cluster-repl-teardown`
359+
360+
{% data reusables.enterprise_clustering.ssh-to-a-node %}
361+
1. To disable replication, run the following command:
362+
363+
```shell copy
364+
ghe-cluster-repl-teardown
365+
```
366+
367+
{% data reusables.enterprise_clustering.configuration-finished %}
368+
369+
### Manually disabling replication
370+
371+
{% endif %}
326372

327373
{% data reusables.enterprise_clustering.ssh-to-a-node %}
328374
{% data reusables.enterprise_clustering.open-configuration-file %}
329375
1. In the top-level `[cluster]` section, delete the `redis-master-replica`, and `mysql-master-replica` key-value pairs.
330376
1. Delete each section for a replica node. For replica nodes, `replica` is configured as `enabled`.
331377
{% data reusables.enterprise_clustering.apply-configuration %}
332378
{% data reusables.enterprise_clustering.configuration-finished %}
333-
334-
After {% data variables.product.prodname_ghe_server %} returns you to the prompt, you've finished disabling high availability replication.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reference: #13596
2+
# Improvements to tooling for cluster HA
3+
4+
versions:
5+
ghes: '>= 3.12'

data/release-notes/enterprise-server/3-12/0.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ sections:
2222
# https://github.com/github/releases/issues/3676
2323
- |
2424
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]
25+
# https://github.com/github/releases/issues/3802
26+
- |
27+
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:
28+
29+
- [`ghe-cluster-repl-bootstrap`](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-cluster-repl-bootstrap)
30+
- [`ghe-cluster-repl-teardown`](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-cluster-repl-teardown)
31+
32+
[Updated: 2024-03-25]
2533
2634
- heading: Authentication
2735
notes:

0 commit comments

Comments
 (0)