To add a node using the new hardened APIs, follow the steps below.
- Log into the new node that you want to join to the cluster as root via SSH or Console.
- Run the following command to get an authentication token from the cluster:
curl -k -X POST -H “Content-Type: application/json” -d ‘{“username”:“admin”, “password”:“######“}’ https://primary_ip:9543/api/v2/sessions
Note: Replace password with the password of the local admin user, and replace primary_ip with the IP address of the Primary node.
Example: curl -k -X POST -H “Content-Type: application/json” -d ‘{“username”:“admin”, “password”:“######“}’ https://XXX.XXX.XXX.XXX:9543/api/v2/sessions
- Run the following command to get a join token from the cluster:
curl -k -X GET -H “Authorization: Bearer authentication_token” -H ‘Content-Type: application/json’ https://primary_ip:9543/api/v2/deployment/token
Note: Replace authentication_token with the Authentication token returned in step 2, and replace primary_ip with the IP address of the Primary node.
Example: curl -k -X GET -H “Authorization: Bearer authentication_token” -H ‘Content-Type: application/json’ https://XXX.XXX.XXX.XXX:9543/api/v2/deployment/token
- Run the following command to join the new node to the cluster:
curl -k -X POST -H “Authorization: Bearer join_token” -H ‘Content-Type: application/json’ -d ‘{“masterFQDN”: “primary_ip“}’ https://new_node_ip:9543/api/v2/deployment/join
Note: Replace join_token with the Join token returned in step 3, replace primary_ip with the IP address of the Primary node, and replace new_node_ip with the IP address of the new node you want to join to the cluster.
Example: curl -k -X POST -H “Authorization: Bearer join_token” -H ‘Content-Type: application/json’ -d ‘{“masterFQDN”: “XXX.XXX.XXX.XXX“}’ https://YYY.YYY.YYY.YYY:9543/api/v2/deployment/join