This topic describes how to deploy OAT using Docker.
Prerequisites
Before you deploy OAT, confirm the following information:
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 OS V6.0.99 and later If you use an OAT image package for installation, you must have already installed and started Docker. Docker Community Edition 18.09.9 or later is recommended.
Notice
If you deploy OAT using the oat-all-in-one installation package, the
install.shscript in oat-all-in-one will automatically install Docker. You do not need to install Docker separately.The default OAT port
7000is not occupied.
Install OAT using the oat-all-in-one installation package
Note
We recommend that you install OAT using the oat-all-in-one installation package.
To install OAT, perform the following steps:
Contact technical support to obtain the oat-all-in-one installation package for OAT.
Extract the oat-all-in-one installation package.
Example:
tar -xf oat-all-in-one-arm-xxx.tarRun the installation script
install.sh.Example:
sh oat-all-in-one-arm/install.shRunning this command automatically installs Docker (if it is not already present in your environment), deploys OAT, and scans the images and tool software packages included in oat-all-in-one.
As prompted, confirm the following information:
- Enter the root directory of Docker (it is recommended to set it as a separately mounted directory). The default value is
/docker. You can customize this. If Docker is already installed, this step is skipped. - Enter the path for the OAT data directory. The default value is
/oat_data. You can customize this. - Enter the OAT HTTP listening port. The default value is
7000. You can customize this. - Enter the OAT database port. The default value is
3306. You can customize this. - Enter the password for the OAT administrator account (set an initial login password). You can customize this.
- Access OAT using the returned URL to verify the availability of the OAT service.
Example:
Note
Docker is already installed on the server, so the Docker installation step is skipped this time.
Change the OAT data directory path to
/data/oat_dataand press Enter.Input the OAT data dir: /data/oat_dataUse the default value for the OAT HTTP listening port and press Enter directly.
Input the OAT HTTP listen port: 7000Use the default value for the OAT database port and press Enter directly.
Input the OAT database port: 3306After modifying the password for the OAT administrator admin user (initial login password), press Enter.
Input the OAT admin user password(login password): ******Access OAT using the returned URL to verify the availability of the OAT service.
The return result is as follows:
Start prepare docker Docker is already exists, start check... Already installed docker check healthy, skip install docker Start prepare OAT Loaded image: xxx/oceanbase/oat:x.x.x_20241025_arm 45fd5a9b31b0af6aeb07b3e485503ad4c64629170b91d1d3c9e8128e8e532125 check OAT url http://127.0.0.1:7000/hc OAT API not ready, please wait, sleep 5s retry... OAT API not ready, please wait, sleep 5s retry... OAT API not ready, please wait, sleep 5s retry... OAT API not ready, please wait, sleep 5s retry... OAT API not ready, please wait, sleep 5s retry... OAT API not ready, please wait, sleep 5s retry... OAT API ready Copy images and binary_packages to OAT data dir Trigger OAT scan api to find images and binary_packages Trigger scan task success, please visit OAT web site and wait for scan task finished OAT is ready for visit url is: http://<current_ip>:7000 user/password is: admin/******
- Enter the root directory of Docker (it is recommended to set it as a separately mounted directory). The default value is
Note
- The
install.shscript starts the OAT container by default using--net host(host network mode). If you need to configure it to another network mode, manually start the container using the OAT image. - The x86 (aarch64) version of
oat-all-in-oneby default only contains images and software packages for x86 (aarch64) and noarch architectures. If you need the aarch64 (x86) architecture, download it yourself and copy it to the corresponding directory mounted by the OAT container, then initiate a scan task to add it.
Install OAT using the OAT Docker image
Obtain the OAT installation package.
Notice
Contact OAT technical support to obtain 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 to be deployed.scp oat.tgz <oat_server_user>@<oat_server_ip>:~/Example:
scp oat_x.x.x_20241025_arm.tgz root@xxx.xxx.xxx.xxx:/home/admin/oat_rpmMount the OAT directory.
Create a
/data_dirdirectory on the server (the path can be customized; this example uses/data_dir) 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_xxx_xxxxxxxx_xxx.tgzHere,
oat_xxx_xxxxxxxx_xxx.tgzis the name of the installation package.Example:
docker load -i oat_x.x.x_20241025_arm.tgzThe return result is as follows:
Loaded image: xxx/oceanbase/oat:x.x.x_20241025_armRun 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.Here,
$oat_imageis the tag of the OAT image.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 data store by default. It 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.
Here is an example:
docker run -d --net host --name oat -v /data_dir:/data -e OAT_INITIAL_ADMIN_PASSWORD=****** --restart on-failure:5 $oat_imageThe return result is as follows:
490344724bfcb2801da271196ebc38b5c15547b796178dc7660553ae62b668c2- The HTTP service of OAT listens on port 7000 by default. You can specify the
After OAT starts successfully, enter
http://<oat_server_ip>:7000in the browser address bar.Replace
<oat_server_ip>with the IP address of the server where OAT is deployed.If the login page appears in the browser window, OAT has been installed and started successfully.
