{question}
How do I add toolbox on a child aggregator node?
{question}
{answer}
SingleStore Toolbox is essentially an SSH frontend for interfacing withmemsqlctl
on individual nodes. Toolbox is not needed to keep the cluster running, but it allows us to manage the cluster. Toolbox can also be configured on a standalone host to manage a cluster.
This article explains the Toolbox configuration in the Aggregator node so that we will have a toolbox to manage the cluster in case we lose MA.
This is straightforward: install SingleStore tools on the aggregator server and register the cluster nodes to manage them.
Important Note: If there have been changes to the cluster via Toolbox on MA, like register/unregister of a node. We need to make sure to register/unregister the node on the CA toolbox well. Toolbox would not share information with the other separate instances of Toolbox. Avoid using both the Toolbox simultaneously. Manage the cluster only with one Toolbox. If we lose the toolbox server and the MA node, we can use the Toolbox on CA to manage the cluster.
Steps needed to be performed on the Child Aggregator node:
1. Install Toolbox on the aggregator host. Click here to learn about how to install the SingleStore Toolbox.
2. Register all the hosts which are part of the cluster with the new Toolbox. Click here to learn about how to register hosts.
For Example: Let's take the below cluster, which has 3 Nodes - 1 MA, 1 CA, 1 Leaf.
From Current MA, we can see three nodes:
MA-10.0.3.146 $ sdb-admin list-nodes
+------------+------------+------------+------+---------------+--------------+---------+----------------+--------------------+--------------+
| MemSQL ID | Role | Host | Port | Process State | Connectable? | Version | Recovery State | Availability Group | Bind Address |
+------------+------------+------------+------+---------------+--------------+---------+----------------+--------------------+--------------+
| 28613E8F5B | Master | 10.0.3.146 | 3306 | Running | True | 7.3.8 | Online | | 0.0.0.0 |
| 9E22875E43 | Aggregator | 10.0.3.115 | 3306 | Running | True | 7.3.8 | Online | | 0.0.0.0 |
| D2930A4677 | Leaf | 10.0.3.78 | 3307 | Running | True | 7.3.8 | Online | 1 | 0.0.0.0 |
+------------+------------+------------+------+---------------+--------------+---------+----------------+--------------------+--------------+
Now we are going to configure aggregator node 10.0.3.115 with Toolbox to manage the cluster, which is possible after installing Toolbox on 10.0.3.115, as mentioned here.
After installing it, let's register the current nodes on this new Toolbox.
To know the list of hosts you have to register, from the MA (10.0.3.146) execute sdb-toolbox-config list-hosts
.
MA-10.0.3.146 $ sdb-toolbox-config list-hosts
+------------+------------+-------------+---------------+--------------------+--------------+
| Host | Local Host | SSH address | Identity File |
+------------+------------+-------------+---------------+--------------------+--------------+
| 10.0.3.146 | Yes | | |
| 10.0.3.115 | No | admin@10.0.3.115:22 | /tmp/ssh_private_key.pem|
| 10.0.3.78 | No | admin@10.0.3.78:22 | /tmp/ssh_private_key.pem|
+------------+------------+-------------+---------------+--------------------+--------------+
Based on the output of the above command, register the same list of hosts on the new Toolbox, which is installed on CA (10.0.3.115). Register like below by providing hostname and ssh key so that CA can connect with the nodes.
CA-10.0.3.115 $ sdb-toolbox-config register-host --host admin@10.0.3.146:22 --identity-file /tmp/ssh_private_key.pem
CA-10.0.3.115 $ sdb-toolbox-config register-host --host admin@10.0.3.115:22 --identity-file /tmp/ssh_private_key.pem
CA-10.0.3.115 $ sdb-toolbox-config register-host --host admin@10.0.3.78:22 --identity-file /tmp/ssh_private_key.pem
After registering, you will be able to manage clusters from this Toolbox as well.
If the installation method is using a tarball method, then register the host with the flag: --tar-install-dir /path/to/singlestore/here
.
i.e.
sdb-toolbox-config register-host --host <ip-address> --tar-install-dir /path/to/singlestore/here
{answer}