Once you have a Central Management SPS node in place, then you can join other nodes to your cluster.
To join nodes to your cluster, complete the following steps for each node that you want to join to the cluster:
-
Create a join request.
POST the IP address of the Central Management node as a JSON object to the https://<IP-address-of-node-to-join-to-cluster>/api/cluster/join_request endpoint. The body of the POST request should be the following:
{ "central_management_address": "<IP-address-of-Central-Management-node>" }
For example:
curl -X POST -H "Content-Type: application/json" --cookie cookies https://<IP-address-of-node-to-join-to-cluster>/api/cluster/join_request --data '{"central_management_address": "<IP-address-of-Central-Management-node>"}'
The following is a sample response received.
By default, no role is assigned to a non-management node, that is why the "roles" array is empty.
{ "body": { "address": "<IP-address-of-node-joined-to-cluster>", "node_id": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "psk": "Ler7HZDFmZCxnLLgHNRfZYfORhlZS99l9vEVr5UKtJEb1d4WeaHcBmQJLs4VDWIn", "roles": [] }, "meta": { "href": "/api/cluster/join_request", "parent": "/api/cluster", "remaining_seconds": 600 } }
Elements Type Description body Top-level element (JSON object) Contains the JSON object of the node. address string The IP address of the node. node_id string A reference ID for the node. psk string The pre-shared key of the node used for authentication. roles string The role of the node. -
Join the node to the cluster.
POST the "body" object of the response to the https://<IP-address-of-Central-Management-node>/api/cluster/nodes endpoint as a JSON object. The body of the POST request should be the following:
{ "address": "<IP-address-of-node-joined-to-cluster>", "node_id": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "psk": "Ler7HZDFmZCxnLLgHNRfZYfORhlZS99l9vEVr5UKtJEb1d4WeaHcBmQJLs4VDWIn", "roles": [] },
For example:
POST -H "Content-Type: application/json" --cookie cookies https://<IP-address-of-Central-Management-node>/api/cluster/nodes --data '{"address": "<IP-address-of-node-joined-to-cluster>", "node_id": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "psk": "Ler7HZDFmZCxnLLgHNRfZYfORhlZS99l9vEVr5UKtJEb1d4WeaHcBmQJLs4VDWIn","roles": []}'
If the POST request is successful, the response includes:
{ "body": { "address": "<IP-address-of-node-joined-to-cluster>", "roles": [] }, "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "meta": { "href": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c", "parent": "/api/cluster/nodes", "remaining_seconds": 28800 } }
-
Commit your changes on both the Central Management node and the node you joined to the cluster.
For details, see Commit a transaction.