This topic describes how to deploy OceanBase Admin Toolkit (OAT).
Prerequisites
Docker CE 17.03 or later has been installed on the server.
Procedure
Run the
scpcommand to upload the OAT installation package to the server.In the following command,
oat_serverindicates the IP address of the server where OAT is to be deployed.[root@hostname /]# scp oat.tar <oat_server>:/oat.tarCreate two directories on the server to mount the OAT directories.
In these two directories, the
/datadirectory in the container stores the OAT system log files and the files generated by DataX and OceanBase Log Analyze (OBLA), and the/var/lib/mysqldirectory in the container stores the OAT database files.[root@oat_server /]# mkdir -p /oat/data_dir /oat/db_dirLoad the OAT installation package as an image.
[root@oat_server /]# docker load -i oat.tarRun the
docker imagescommand to obtain the tag of the OAT image.Note
The following command applies to the server where only one OAT installation package is loaded locally. If multiple installation packages are loaded, you can run the `docker images` command to view the display content and connect the first two columns with a colon (:).
[root@oat_server /]# oat_image=`docker images | grep oat | awk '{printf $1":"$2"\n"}'`Run the
docker runcommand to start OAT.Note
The environment variable DEPLOY_MODE specifies the deployment mode. Valid values are:
- generic: OAT is deployed in a generic hardware environment.
- apsara: OAT is deployed in an Apsara Stack environment.
- oio: OAT is deployed on an OceanBase Data Machine (ODM).
[root@oat_server /]# docker run -d -v /oat/data_dir:/data -p 7000:7000 --restart on-failure:5 $oat_image