Skip to main content

Remove Nodes

Learn, step by step, how to remove a node from your Promote cluster.

Avvertimento

To add or remove nodes, you should be an advanced user. If this is the first time you add or remove nodes, we recommend that you make an appointment with an Alteryx Customer Support Engineer who guides you through the process.

Importante

You can only remove a node from your cluster if it contains more than three nodes.

Requirements

Before you remove a node from your Promote cluster, make sure you have a couple things:

  • You must have SSH access to every node in your Promote cluster.

  • Your cluster must currently run on at least version 2021.4.0 of Promote.

Avvertimento

The node you remove must not be the master node, which holds the core Promote services. The remove_nodes script checks to make sure you don't try to remove the master node.

If you increased the number of replicas of your models after you added nodes to your cluster, you may want to reduce the number of replicas.

Remove Node

Navigate to the node_maintenance_2022.3.0 directory on your local machine, which is a folder located within the original downloaded and extracted archive you've used to install or upgrade Promote.

Open the remove_node script with a text editor, such as vi (if you're unfamiliar with text editors, visit this vi tutorial):

vi remove_node.sh

After you open the file, you should see this:

#!/bin/bash
set -uea

# see README.md for more information
# List ALL your nodes IPs (including your removal node) in bash array format here:
# Ensure both sets of IPs are in the same relative order
EXISTING_NODES_IPS=('' '' '' '')

# Internal IPS
EXISTING_NODES_INT_IPS=('' '' '' '')

# Add the node removal IP again here:
NODE_REMOVAL_IP=''
NODE_REMOVAL_INT_IP=''

# Add your Promote credentials here:
QUAY_PROMOTE_USERNAME=''
QUAY_PROMOTE_PW=''

# Add your ssh user and key path here:
SSH_USER=''
KEY_PATH=''

Within each set of single quotation marks, use vi to insert this information:

  • External IP addresses of the nodes that are a part of your Promote cluster

  • Internal IP addresses of the nodes that are a part of your Promote cluster

  • External IP address of the node you want to remove from your Promote cluster

  • Internal IP address of the node you want to remove from your Promote cluster

  • QUAY credentials, provided by your account executive or Alteryx Fulfillment

  • SSH user and key

When you finish updating the empty fields with needed information, the file should look like this:

#!/bin/bash

set -uea

# see README.md for more information

# List ALL your nodes IPs (including your removal node) in bash array format here:
# Ensure both sets of IPs are in the same relative order

EXISTING_NODES_IPS=('NODE1_EXTERNAL_IP' 'NODE2_EXTERNAL_IP' 'NODE3_EXTERNAL_IP' 'NODE4_EXTERNALIP')
# Internal IPS
EXISTING_NODES_INT_IPS=('NODE1_INTERNAL_IP' 'NODE2_INTERNAL_IP' 'NODE3_INTERNAL_IP' 'NODE4_INTERNAL_IP')

# Add the node removal IP again here:

NODE_REMOVAL_IP='NODE4_EXTERNAL_IP'
NODE_REMOVAL_INT_IP='NODE4_INTERNAL_IP'

# Add your Promote credentials here:

QUAY_PROMOTE_USERNAME='QUAY_USERNAME'
QUAY_PROMOTE_PW='QUAY_PASSWORD'

# Add your ssh user and key path here:

SSH_USER='SSH_USERNAME'
KEY_PATH='PATH/TO/SSH/KEY'

Write to the remove-node file and then exit the text editor.

Run the remove-node script:

# Make sure you're still working in the node-maintenance directory.

sh remove_node.sh

That script automatically runs preflight checks on all your machines to make sure that you've satisfied these requirements:

  • You have SSH access to all nodes.

  • You are not trying to remove the master node.

  • After removing the node, you have at least three active nodes in your cluster.

  • Memory usage is below 80% on all worker nodes. (You can override this requirement, but we do not recommend you do that.)

After the preflight checks finish, the script removes the node from the swarm.

Watch your terminal for updates. If you experience any issues during removal, follow any on-screen instructions. Wait several minutes before you attempt to rerun the remove-node script.

You successfully removed a node from your Promote cluster. See Add Nodes if you want to add other nodes.