This topic describes how to deploy OAT using Docker.
Prerequisites
Before you deploy OAT, confirm the following:
Your operating system meets the following requirements:
Server typeOperating systemSupported versionx86_64/ARM aarch64 RHEL (and compatible RockyLinux, CentOS, etc.) 7.2 and later x86_64/ARM aarch64 Anolis (and compatible Alibaba Cloud Linux, Kylin V10, Unity Operating System (UOS), China Mobile BC-Linux, NeoKylin OS, Zhongke Fangde OS, etc.) 8.4 and later x86_64/ARM aarch64 Debian (and compatible Ubuntu, etc.) 11 and later x86_64/ARM aarch64 openSUSE 12 SP3 and later x86_64/ARM aarch64 openSUSE 12 SP3 and later x86_64/ARM aarch64 NeoKylin V6.0.99 and later You have installed and started Docker. Docker Community Edition 17.03 or later is recommended. If you install OAT using the all-in-one package, the
install.shscript in the package automatically installs Docker.The default OAT port
7000is not occupied.
Install OAT using the oat-all-in-one package
Note
We recommend that you install OAT using the oat-all-in-one package.
To install OAT, perform the following steps:
Contact technical support to obtain the oat-all-in-one package for OAT.
Extract the oat-all-in-one package.
tar -xf oat-all-in-one-x86.tarRun the installation script
install.sh.sh oat-all-in-one-x86/install.shRunning this command automatically installs Docker (if Docker is not present in your environment), deploys OAT, and scans for existing images and tool software packages.
As prompted, enter settings such as the Docker root directory, OAT data directory (these directories do not need to be manually created), OAT HTTP listening port (default 7000), OAT database port (default 3306), and the initial OAT password.
Access OAT at the returned URL to verify the availability of the OAT service.
Note
The
install.shscript starts the OAT container by default using--net host(host network mode). If you need to configure it to use another network mode, download the OAT container and start it manually.The x86 (aarch64) version of
oat-all-in-oneincludes only the x86 (aarch64) and noarch images and software packages by default. To include the aarch64 (x86) architecture, download it yourself and copy it to the corresponding directory mounted in the OAT container, then initiate a scan task to add it.
Install using the OAT installation package
Download the OAT installation package.
You need to contact OceanBase technical personnel to download the installation package.
Use the
scpcommand to upload the OAT installation package to the server.Here,
oat_serveris the IP address of the server where OAT is deployed.scp oat.tgz <oat_server_user>@<oat_server_ip>:~/Mount the OAT directory.
Create a
/data_dirdirectory on the server to store persistent data for OAT.After the
/data_dirdirectory is mounted to the OAT container, OAT automatically creates the/data_dir/logs,/data_dir/images, and/data_dir/dbdirectories to store OAT system logs, Docker images for components and products, and OAT database files, respectively.mkdir -p /data_dirLoad the OAT installation package as a Docker image.
docker load -i oat.tarRun the
docker imagescommand to obtain the tag of the OAT image.Note
If only one OAT installation package is loaded, use the example command. If multiple installation packages are loaded, run the
docker imagescommand to view the output, and concatenate the contents of the first two columns with a colon (:).oat_image=`docker images | grep oat | awk '{printf $1":"$2"\n"}'`Run the
docker runcommand 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_imageNote
The HTTP service of OAT listens on port 7000 by default. You can specify the
-e HTTP_PORT=7001parameter to change it to another port.You can specify the
-e OAT_INITIAL_ADMIN_PASSWORD=xxxparameter to change the password of OAT.OAT uses MariaDB as its built-in data store, which listens on port 3306 by default. You can specify the
-e DB_PORT=3307parameter to change it to another port.We recommend that you use the
--net hostparameter to start OAT, because a container started in bridge network mode may be affected bydocker0bridge failures or the operating system parameterip_forward.
After OAT starts successfully, enter
http://<<oat_server_ip>:7000in the browser address bar.If the login page appears in the browser window, OAT is successfully installed and started.
