Briefs on ADBMGR
adbmgr is a management tool for AntDB cluster, which has all the functions of managing AntDB cluster, including the initialization, starting and stopping of AntDB cluster, the parameter setting of all cluster nodes, and the expansion and contraction of AntDB cluster.
AntDB cluster can be deployed on multiple machines. adbmgr needs to start a process called agent on each host in order to achieve the function of managing AntDB cluster. adbmgr achieves the management of AntDB cluster through the agent process. adbmgr includes the management of the agent process.
For example, if a user executes a start command to start a cluster node on host1, adbmgr will pass the start command to the agent process on host1, and the agent process will execute the start command; then the agent will pass the execution result of the start command to adbmgr and display it as the execution result of the user command. So, an agent process should be started on each host where AntDB cluster is located.
For the purpose of managing AntDB cluster, there are 4 tables in adbmgr, which are used to store the basic configurations of AntDB cluster, and all the operation commands of adbmgr are operated based on these 4 tables, so it is necessary to introduce these 4 tables in detail.
Host table
The host table is used to store the host and agent process information of the deployed AntDB cluster. The following figure shows the host table with 2 host information:
For example: Connect to adbmgr and execute:
postgres=# list host;
The output results are listed in the following table:
name | user | port | protocol | agentport | address | adbhome |
localhost1 | gd | 22 | ssh | 10906 | 10.21.20.175 | /data/antdb/app |
localhost2 | gd | 22 | ssh | 10906 | 10.21.20.176 | /data/antdb/app |
The detailed explanation of each column of the host table is as follows:
Column name. | Description |
name | Hostname, the hostname corresponding to the IP address in the address column. |
user | Username, the username to deploy the AntDB cluster. |
port | The port of the protocol used by protocol column, ssh protocol uses port 22 by default. |
protocol | The protocol used for the communications between adbmgr and agent. ssh protocol is used by defult. |
agentport | The port used by agent process. It requires a port number that has no conflict with other processes specified by user. |
address | IP address, the IP address of the host. |
pghome | The path on the host where the executable (binary) files for the AntDB cluster is deployed. |
• Use the add host command to add a row to the host table.
• Use the alter host command to modify a field in a row.
• Use drop host to delete a row in the host table.
• Use the list host command to display the information of the specified host in the host table.
For details of the above commands, please refer to the commands related to the host table in Chapter 4.
The following are examples of commands commonly used to operate on the host table:
add host localhost1( user=gd, protocol=ssh, address='10.21.20.175', agentport=10906, adbhome='/data/antdb/app');
alter host localhost1(adbhome='/opt/antdb/app');
drop host localhost1;
list host;