Install OAT

2024-07-09 02:06:37  Updated

This topic describes how to deploy OceanBase Admin Toolkit (OAT) in a Docker container.

Prerequisites

Before you deploy OAT, make sure that the following conditions are met:

  • Your operating system meets the conditions listed in the following table.

    Server architecture Operating system Supported version
    x86_64 or AArch64 Red Hat Enterprise Linux (RHEL) and its compatible operating systems, such as Rocky Linux and CentOS 7.2 and later
    x86_64 or AArch64 Anolis and its compatible operating systems, such as Alibaba Cloud Linux, Kylin V10, Unity Operating System (UOS), BC-Linux of China Mobile, Linx, and NFSChina 8.4 and later
    x86_64 or AArch64 Debian and its compatible operating systems, such as Ubuntu 11 and later
    x86_64 or AArch64 openSUSE 12SP3 and later
  • You have installed and started Docker. Docker Community Edition 17.03 or later is recommended. If you use the oat-all-in-one installation package to deploy OAT, the install.sh script in the package will automatically install Docker.

  • The default port 7000 of OAT is not occupied.

Use the oat-all-in-one installation package to install OAT

Note

We recommend that you use the oat-all-in-one installation package to install OAT.

The oat-all-in-one package provides the Docker 18.09.9, OAT V4.2.0, MetaDB V4.2.1, and NLB 4.0.0 images, and software packages of common tools. To obtain the oat-all-in-one installation package, contact OceanBase Technical Support. To install OAT, perform the following steps:

  1. Decompress the oat-all-in-one installation package.

    tar -xf oat-all-in-one-x86.tar
    
  2. Run the install.sh installation script.

    sh oat-all-in-one-x86/install.sh
    

    If Docker is not installed in your environment, this command automatically installs Docker, deploys OAT, and scans for existing images and tool packages.

  3. Specify the parameters as prompted, such as docker root dir and OAT data dir whose values are paths of two directories that you do not need to manually create, OAT HTTP listen port whose default value is 7000, OAT database port whose default value is 3306, and the initial logon password of OAT.

  4. Use the returned URL to access OAT and verify the availability of the OAT service.

Note

  • By default, the install.sh script starts the OAT container in host mode by specifying --net host. If you want to use another mode, download the OAT container and start it manually.

  • By default, the oat-all-in-one installation package for x86 contains only the OAT image and software packages for the x86_64 and Noarch architectures, and the oat-all-in-one installation package for AArch64 contains only the OAT image and software packages for AArch64 and Noarch architectures. If you have only the oat-all-in-one installation package for x86 or AArch64 and you want to use the OAT image and software packages for the AArch64 or x86_64 architecture, download and copy the required OAT image and software packages to the directory to which the OAT container is mounted, and then initiate a scan task to add the packages.

Use the installation package to install OAT

  1. Download the installation package of OAT.

    Contact OceanBase Technical Support to obtain the installation package.

  2. 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 to be deployed:

    scp oat.tgz <oat_server_user>@<oat_server_ip>:~/
    
  3. Mount the OAT directory.

    Create a directory named /data_dir on the server to save persistent data of OAT.

    After the /data_dir directory is mounted to the OAT container, OAT will automatically create the /data_dir/logs, /data_dir/images, and /data_dir/db directories respectively for storing OAT system logs, component and product Docker images in OAT, as well as database files of OAT.

    mkdir -p /data_dir
    
  4. Load the OAT installation package as an image.

    docker load -i oat.tar
    
  5. Run the docker images command to obtain the tag of the OAT image.

    Note

    If only one OAT installation package is loaded, run the sample command. If multiple installation packages are loaded, run the docker images command to view the loaded images and then concatenate the first two columns with a colon (:) in the command output.

    oat_image=`docker images | grep oat | awk '{printf $1":"$2"\n"}'`
    
  6. Run the docker run command to start OAT.

    docker run -d --net host --name oat  -v /data_dir:/data -e OAT_INITIAL_ADMIN_PASSWORD=xxx --restart on-failure:5 $oat_image
    

    Note

    • By default, the HTTP server of OAT listens on port 7000. You can specify the -e HTTP_PORT=7001 parameter to modify the port.

    • You can use the -e OAT_INITIAL_ADMIN_PASSWORD=xxx statement to change the password of OAT.

    • By default, the built-in MariaDB of OAT listens on port 3306. You can specify the -e DB_PORT=3307 parameter to modify the port.

    • We recommend that you start OAT by specifying the --net host parameter, because a container started in bridge mode can be affected by docker0 bridge failures or the ip_forward parameter of the operating system.

  7. After OAT is started, enter http://<<oat_server_ip>:7000 in the address bar of the browser.

    If the logon page appears, OAT is installed and started.

Contact Us