Deploy OAT

2023-08-18 09:26:34  Updated

This topic describes how to deploy OceanBase Admin Toolkit (OAT).

Prerequisite

Docker CE 17.03 or later has been installed on the server.

Procedure

  1. Run the scp command to upload the OAT installation package to the server.

    In the following command, oat_server indicates the IP address of the server where OAT is deployed.

    [root@hostname /]# scp oat.tar <oat_server>:/oat.tar
    
  2. Create two directories on the server to mount the OAT directories.

    In these two directories, the /data directory in the container stores the OAT system log files and the files generated by Datax and OBLA, and the /var/lib/mysql directory in the container stores the OAT database files.

    [root@oat_server /]# mkdir -p /oat/data_dir /oat/db_dir
    
  3. Load the OAT installation package as an image.

    [root@oat_server /]# docker load -i oat.tar
    
  4. Run the docker images command 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"}'`
    
  5. 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
    

Contact Us