Skip to content

Instantly share code, notes, and snippets.

@oldarmyc
Last active November 27, 2018 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oldarmyc/aaf26f4226bc227188461bdd3423a840 to your computer and use it in GitHub Desktop.
Save oldarmyc/aaf26f4226bc227188461bdd3423a840 to your computer and use it in GitHub Desktop.
Join cluster via command line

Joining additional node to AE5 master through command line

Download the corresponding gravity binary from S3

# For AE 5.2.1
curl -O https://s3.amazonaws.com/ae-support/gravity-binary-5.2.1

# For AE 5.2.2
curl -O https://s3.amazonaws.com/ae-support/gravity-binary-5.2.2

Rename the file to make things easier.

# For AE 5.2.1
mv gravity-binary-5.2.1 gravity

# For AE 5.2.2
mv gravity-binary-5.2.2 gravity

Make it executable

chmod +x gravity

Decide what type of node to add to the AE5 master.

  • ae-worker - General worker
  • gpu-worker - GPU based worker
  • k8s-master - Kubernetes master node

From the AE5 master server you would want to get the join token and IP address for the AE5 master.

gravity status

Copy the join token for the cluster, and it will be used for every worker add. Also grab the IP address for the AE5 master that is listed as well. It will look similarly to the example below.

On the worker server that you want to add you should have all of the information.

./gravity join --token JOIN-TOKEN --advertise-addr=NODE-IP --role=NODE-ROLE --cloud-provider=CLOUD-PROVIDER MASTER-IP-ADDR
  • JOIN-TOKEN: Join token that you copied from the AE5 master gravity status command

  • NODE-IP: Worker IP address that has access to the AE5 master. This can be a private IP address as long as the network that the IP address is on has access to the AE5 master.

  • NODE-ROLE: The role for the node that was chosen from the previous step above.

  • CLOUD-PROVIDER: Optional flag that can be 'aws', 'gce', and 'generic'. Cloud provider will autodetect environment if not specified and is the preferred method.

    Note: If using cloud and not providing public access from the server, then use option 'generic' so that it does not try to autodetect environment as that would require public access.

  • MASTER-IP-ADDR: IP address of master server that was obtained from the gravity status command run on the master AE5 server.

You can watch the status on the AE5 master using the command gravity status during the join, and you will see something like the following example.

You can see that the status is expanding and the new node that you are adding is listed at the bottom in an offline state.

On the worker you will see similar steps being done in order to add the worker in this working example.

From the master after the add has completed you can see the following status on the master node with a gravity status command.

The status is now in an active state, and the worker is shown as healthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment