> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding and removing nodes

export const Danger = ({children}) => {
  return <div class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border danger-admonition dark:danger-admonition" data-callout-type="danger">
      <div class="mt-0.5 w-4">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="rgb(239, 68, 68)" xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-sky-500" aria-label="Danger">
          <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path>
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

You can view, add, edit and delete server nodes from Data Science & AI Workbench using
the Admin Console’s Operations Center. If you would prefer to use a command
line to join additional nodes to the Workbench master, follow [the instructions
provided below](#using-the-command-line-to-add-nodes).

**NOTES:**

* Workbench does not support running heterogeneous versions in the same
  cluster. Before adding a new node, *verify that the node is operating the same
  version of the OS as the rest of the cluster*.
* If you’re adding a GPU node, make sure it meets the [GPU requirements](/docs/data-science/latest/environment-prep/gravity-prep#gpu-requirements).
* Each installation can only support a single Workbench master node, as this node
  includes storage for the platform. **DO NOT add an additional Workbench master node
  to your installation**.

***

**To manage the servers on your system:**

1. Log in to Workbench, select <Icon icon="circle-user" iconType="regular" /> **Menu** in the top
   right corner and click the **Administrative Console** link displayed at the
   bottom of the slide out window. You must be logged in with a user assigned to
   the `ae-admin` role.
2. Click **Manage Resources**.
3. Log in to the Operations Center using the Administrator credentials
   [configured after installation](/docs/data-science/latest/install/config).
4. Select **Nodes** from the menu on the left to display the configured nodes
   in your cluster, their IP address, hostname and profile.

**To add an existing server to Workbench:**

1. Click the **Add Node** button at the top right.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/IBO7780zo4xe9zAp/images/add_node.png?fit=max&auto=format&n=IBO7780zo4xe9zAp&q=85&s=9dea1f9e63a40d6f769795fd642b8d78" alt="" width="2540" height="1182" data-path="images/add_node.png" />
   </Frame>

2. Select an appropriate profile for the server and click **Continue**.

3. Copy and paste the command provided into a terminal window to add the server.

   When you refresh the page, your server will appear in the list.

**To remove a server node:**

Click <Icon icon="ellipsis-stroke" iconType="regular" /> **Actions** at the far right of the node you want to remove and select **Delete…**.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/SgtHPGS_3WUV3NOk/images/server-delete.png?fit=max&auto=format&n=SgtHPGS_3WUV3NOk&q=85&s=a8ba602a0319e61e44530b82cb56fc33" alt="" width="440" height="294" data-path="images/server-delete.png" />
</Frame>

**To log on to a server:**

Click the <Icon icon="terminal" iconType="solid" /> terminal of the server you want to work with, and select **root** to open a terminal window. It will open a new tab in your browser.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/SgtHPGS_3WUV3NOk/images/server-log-in.png?fit=max&auto=format&n=SgtHPGS_3WUV3NOk&q=85&s=7062e08e77a953347e985bc8f8ee9181" alt="" width="452" height="400" data-path="images/server-log-in.png" />
</Frame>

When you are finished, simply close the console window by clicking <Icon icon="square-xmark" iconType="sharp-solid" color="red" /> **Close**.

***

## Using the command line to add nodes

1. Download the gravity binary that corresponds to your version of Workbench
   from the S3 location provided to you by Anaconda onto the server
   you’re adding to the cluster.

2. Rename the file to something simpler, then make it executable. For example:

   ```sh theme={null}
   mv gravity-binary-6.1.9 gravity
   chmod +x gravity
   ```

3. *On the Workbench master*, run the following command to obtain the join token and
   IP address for the Workbench master node:

   ```sh theme={null}
   gravity status
   ```

   The results should look similar to the following:

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/QCWY8EsGZWJYinOU/images/join-token.png?fit=max&auto=format&n=QCWY8EsGZWJYinOU&q=85&s=ea157f69547bb47ddea5478d23826836" alt="" width="1606" height="904" data-path="images/join-token.png" />
   </Frame>

4. Copy and paste the join token for the cluster and the IP address for the Workbench
   master somewhere accessible. You’ll need to provide this information when you
   add a new worker node. You’ll also need the IP address of the server node
   you’re adding.

5. *On the worker node*, run the following command to add the node to the cluster:

   ```sh theme={null}
   ./gravity join --token JOIN-TOKEN --advertise-addr=NODE-IP --role=NODE-ROLE --cloud-provider=CLOUD-PROVIDER MASTER-IP-ADDR
   ```

   Where:

   `JOIN-TOKEN` = The join token that you obtained in Step 3.

   `NODE-IP` = The IP address of the worker node. This can be a private IP address, as long as the network it’s on can access the Workbench master.

   `NODE-ROLE` = The type of node you’re adding: `ae-worker`, `gpu-worker`, or `k8s-master`.

   `CLOUD-PROVIDER` = This is auto-detected, and can therefore be excluded unless you don’t have Internet access. In this case, use `generic`.

   `MASTER-IP-ADDR` = The IP address of the Workbench master that you obtained in Step 3.

   <Danger>
     The `--role` flag must be provided and assigned to either `ae-worker`, `gpu-worker`, or `k8s-master`. Without it, the node will be added with the role `ae-master` and may cause your cluster to crash.
   </Danger>

   The progress of the join operation is displayed:

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/QCWY8EsGZWJYinOU/images/join-status2.png?fit=max&auto=format&n=QCWY8EsGZWJYinOU&q=85&s=eab0ba75146089d01027cd6123a6c2f9" alt="" width="1231" height="190" data-path="images/join-status2.png" />
   </Frame>

6. To monitor the impact of the join operation on the cluster, run the `gravity status` command *on the Workbench master*.

The output will look similar to the following:

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/QCWY8EsGZWJYinOU/images/join-status.png?fit=max&auto=format&n=QCWY8EsGZWJYinOU&q=85&s=101e78f061439c4db6625a379062604c" alt="" width="1442" height="1050" data-path="images/join-status.png" />
</Frame>

Note that the size of the cluster is `expanding` and the status of the new node being added is `offline`. When the node has successfully joined, the cluster returns to an `active` state, and the status of the new node changes to `healthy`:

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/QCWY8EsGZWJYinOU/images/join-complete.png?fit=max&auto=format&n=QCWY8EsGZWJYinOU&q=85&s=bee3209efc214a4ed2e309397919a620" alt="" width="1438" height="892" data-path="images/join-complete.png" />
</Frame>
