Adding a control plane node (IBM Cloud Pak for AIOps on Linux)
Learn how to add a control plane node to a Linux® cluster that has a deployment of IBM Cloud Pak® for AIOps running on it.
Procedure
-
Set environment variables.
-
Run the following command to source the shell script
aiops_var.sh
that you created when you installed IBM Cloud Pak for AIOps on your Linux cluster.. ./aiops_var.sh
For more information about
aiops_var.sh
, see Create environment variables in Online installation of IBM Cloud Pak for AIOps on Linux or Offline installation of IBM Cloud Pak for AIOps on Linux. -
Set an environment variable for the new control plane node that you want to add.
export NEW_CP_NODE="<new_cp_node>"
Where
<new_cp_node>
is the FQDN or IP address of the control plane node to be added, for exampletest-server4.acme.com
. -
If the main control plane node is down or offline, then run the following command:
export CONTROL_PLANE_NODE="<other_cp_node>"
Where
<other_cp_node>
is the FQDN or IP address of a working control plane node that is an entry in theADDITIONAL_CONTROL_PLANE_NODES
array inaiops_var.sh
.
-
-
Configure a new control plane node.
Run the commands in one of the following codeblocks, depending on whether your deployment is online or offline.
Online deployments
K3S_TOKEN=$(ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} aiopsctl cluster node info --token-only) K3S_HOST=$(ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} aiopsctl cluster node info --server-url-only) ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} ssh ${TARGET_USER}@${NEW_CP_NODE} curl -LO "${AIOPSCTL_INSTALL_URL}" ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} ssh ${TARGET_USER}@${NEW_CP_NODE} tar xvf "${AIOPSCTL_TAR}" ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} ssh ${TARGET_USER}@${NEW_CP_NODE} mv aiopsctl /usr/local/bin/aiopsctl ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} ssh ${TARGET_USER}@${NEW_CP_NODE} aiopsctl cluster node up --accept-license=${ACCEPT_LICENSE} --role=control-plane --server-url="${K3S_HOST}" --token="${K3S_TOKEN}" --registry-token="${IBM_ENTITLEMENT_KEY}" --app-storage "${APP_STORAGE_PATH}" --platform-storage "${PLATFORM_STORAGE_PATH}" --load-balancer-host="${LOAD_BALANCER_HOST}"
Offline deployments
Run the following commands from your bastion host:
K3S_TOKEN=$(ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} aiopsctl cluster node info --token-only) K3S_HOST=$(ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} aiopsctl cluster node info --server-url-only) ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} scp /usr/local/bin/aiopsctl ${TARGET_USER}@${NEW_CP_NODE}:/usr/local/bin/aiopsctl ssh ${TARGET_USER}@${CONTROL_PLANE_NODE} ssh ${TARGET_USER}@${NEW_CP_NODE} aiopsctl cluster node up --accept-license=${ACCEPT_LICENSE} --role=control-plane --server-url="${K3S_HOST}" --token="${K3S_TOKEN}" registry="${TARGET_REGISTRY}" --registry-user="${TARGET_REGISTRY_USER}" --registry-token="${TARGET_REGISTRY_PASSWORD}" --app-storage "${APP_STORAGE_PATH}" --platform-storage "${PLATFORM_STORAGE_PATH}" --load-balancer-host="${LOAD_BALANCER_HOST}"
-
Update the environment variables script
aiops_var.sh
. This is to maintain the accuracy of the environment variables file.When your new control plane node is succesfully added and configured, update the
aiops_var.sh
file.- If you added the new control plane node as an additional control plane node, then add an entry for it to the
ADDITIONAL_CONTROL_PLANES
array. - If you added the new control plane node as the main control plane node, then set the value of
CONTROL_PLANE_NODE
to be your new control plane node.
- If you added the new control plane node as an additional control plane node, then add an entry for it to the
-
Update your load balancer's configuration for the control plane node that you just added.