Skip to content

Commit ff84116

Browse files
Update instructions on how to move from single deployment to cluster (#1758)
1 parent e211317 commit ff84116

File tree

1 file changed

+81
-2
lines changed

1 file changed

+81
-2
lines changed

modules/ROOT/pages/clustering/setup/single-to-cluster.adoc

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ See xref:clustering/setup/analytics-cluster.adoc[] for more information on analy
1515
====
1616

1717
.Move from a single `system` database to a cluster with three `system` primaries
18-
====
18+
19+
[.tabbed-example]
20+
=====
21+
[role=include-with-Discovery-service-v1 label--deprecated-5.23]
22+
======
23+
1924
In this example, a standalone server named `server01` is running and two additional servers, `server02` and `server03`, are to be added to form a cluster.
2025
The two additional servers are configured according to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] and are _not_ running.
2126
Neo4j Enterprise Edition is installed on all three servers.
@@ -73,5 +78,79 @@ The last step is to enable the `Free` servers using `ENABLE SERVER` (see xref:cl
7378
7479
Once all servers are enabled, you can scale up user databases using xref:clustering/databases.adoc#alter-topology[`ALTER DATABASE`], if desired.
7580
76-
====
81+
======
82+
[role=include-with-Discovery-service-v2 label--new-5.23]
83+
======
84+
85+
In this example, a standalone server named `server01` is running and two additional servers, `server02` and `server03`, are to be added to form a cluster.
86+
The two additional servers are configured according to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] and are _not_ running.
87+
Neo4j Enterprise Edition is installed on all three servers.
88+
89+
Start by stopping the standalone server.
90+
Once it is stopped, edit the xref:configuration/file-locations.adoc[_neo4j.conf_] file to include the discovery endpoints of itself and the servers that will form the cluster.
91+
92+
Starting with Neo4j 5.23, it is recommended to use v2 of the discovery service.
93+
For more details on discovery services, see xref:clustering/setup/discovery.adoc[].
94+
95+
To use the discovery service v2:
96+
97+
* You have to set the configuration of `dbms.cluster.discovery.version` to `V2_ONLY`.
98+
* Instead of `dbms.cluster.discovery.endpoints`, use `dbms.cluster.discovery.v2.endpoints`.
99+
100+
The example below uses `dbms.cluster.discovery.resolver_type=LIST`.
101+
102+
._neo4j.conf_ on server01.example.com:
103+
[source, properties]
104+
----
105+
server.default_listen_address=0.0.0.0
106+
server.default_advertised_address=server01.example.com
107+
dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000
108+
dbms.cluster.discovery.version=V2_ONLY
109+
initial.dbms.default_primaries_count=3
110+
----
111+
(The xref:configuration/file-locations.adoc[_neo4j.conf_] file looks identical except for the `server.default_advertised_address` on all three servers. Please refer to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] for more information.)
112+
113+
On `server01` (the standalone server) dump the `system` database using the `neo4j-admin database dump` command.
114+
115+
[source, shell, role="nocopy"]
116+
----
117+
bin/neo4j-admin database dump system --to-path=/full/path/to/dumps/
118+
----
119+
See xref:backup-restore/offline-backup.adoc[] for more information on the dump command.
120+
121+
Use the `neo4j-admin database load` command to load the `system` database dump from `server01` to `server02` and `server03`.
122+
123+
[source,shell, role="nocopy"]
124+
----
125+
bin/neo4j-admin database load --from-path=/full-path/data/dumps system
126+
----
127+
See xref:backup-restore/restore-dump.adoc[] for more information on the load command.
128+
129+
Once the `system` database has been loaded on `server02` and `server03`, start all servers.
130+
The newly added servers should be in the `Free` state (`server02` and `server03`) and this can be verified using `SHOW SERVERS`.
131+
132+
[source, cypher, role=noplay]
133+
----
134+
SHOW SERVERS;
135+
----
136+
137+
[queryresult]
138+
----
139+
+-----------------------------------------------------------------------------------------------------------+
140+
| name | address | state | health | hosting |
141+
+-----------------------------------------------------------------------------------------------------------+
142+
| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] |
143+
| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Free" | "Available" | ["system"] |
144+
| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Free" | "Available" | ["system"] |
145+
+-----------------------------------------------------------------------------------------------------------+
146+
----
147+
148+
On `server01` (the previously standalone server) verify that all user databases are still running using `SHOW DATABASES`.
149+
150+
The last step is to enable the `Free` servers using `ENABLE SERVER` (see xref:clustering/servers.adoc[] for more information on server states).
151+
152+
Once all servers are enabled, you can scale up user databases using xref:clustering/databases.adoc#alter-topology[`ALTER DATABASE`], if desired.
153+
======
154+
=====
155+
77156

0 commit comments

Comments
 (0)