This topic describes how to deploy OceanBase Admin Toolkit (OAT).
Prerequisite
Docker CE 17.03 or later has been installed on the server.
Procedure
Run the scp command to upload the OAT installation package to the server.
In the following command,
oat_serverindicates the IP address of the server where OAT is 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 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 imagescommand 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 following Docker command to start OAT:
[root@oat_server /]# docker run -d -e DEPLOY_MODE=generic -v /oat/data_dir:/data -v /oat/db_dir:/var/lib/mysql -p 7000:7000 --restart on-failure:5 $oat_image