This topic describes how to deploy OceanBase Cloud Platform (OCP) Community Edition.
Prerequisites
- A Docker container is installed on the host in which you want to deploy OCP. You can search for relevant information about how to install a Docker container on the Internet.
The ocp-3.1.1-ce.tar.gz software package is obtained. For more information, see Prepare for the installation.
Upload the ocp_installer.sh file in the software package to any directory of the host as the root user.
Upload the OCP image file
ocp3.1.1-1931448.tar.gzin the software package to any directory of the host as the root user.
Procedure
Log on to the OCP host as the root user and go to the directory where the ocp_installer.sh file is located.
Run the following command to make the ocp_installer.sh file executable:
chmod +x ocp_installer.shUse the ocp_installer.sh file to generate a configuration file, whose name is specified after -c.
./ocp_installer.sh genconf -c ocp.yamlModify the ocp.yaml configuration file generated by the ocp_installer.sh file.
OCP_IP_ARRAY=(xxx.xxx.xxx.xxx) SSH_USER=root SSH_PORT=22 SSH_AUTH='password' SSH_PASSWORD='******' SSH_KEY_FILE='/root/.ssh/id_rsa.pub' OCP_METADB_HOST=xxx.xxx.xxx.xxx OCP_METADB_PORT=2881 OCP_METADB_USER=<METADB username> OCP_METADB_PASSWORD='******' OCP_METADB_DBNAME=<METADB name> OCP_MONITORDB_USER=<MONITORDB username> OCP_MONITORDB_PASSWORD='******' OCP_MONITORDB_DBNAME=<MONITORDB name> OCP_WEB_PORT=8080 OCP_LB_VIP= OCP_LB_VPORT= OCP_IMAGE=/root/ocp3.1.1-1931448.tar.gz OCP_CPU=16 OCP_MEMORY=20G OCP_LOG_DIR=/tmp/ocp_logsParameters in the file:
OCP_IP_ARRAY: the IP address of the OCP host.
SSH_USER: the user used to install OCP. Default value: root.
SSH_PASSWORD: the password of the root user of the OCP host.
OCP_METADB_HOST: the IP address of the MetaDB host. The value must be the same value that you specified for servers in the mini-single-example.yaml file when you deploy OceanBase Database. For more information, see Deploy OceanBase Database.
OCP_METADB_PORT: the port number for MetaDB. The value must be the same value that you specified for mysql_port in the mini-single-example.yaml file when you deploy OceanBase Database. For more information, see Deploy OceanBase Database.
OCP_METADB_USER: the MetaDB user created in Create tenants, which is ocp@ocp_meta.
OCP_METADB_PASSWORD: the password of the ocp@ocp_meta user specified in Create tenants.
OCP_METADB_DBNAME: the name of MetaDB.
OCP_MONITORDB_USER: the MonitorDB user created in Create tenants, which is ocp@ocp_monitor.
OCP_MONITORDB_PASSWORD: the password of the ocp@ocp_monitor user specified in Create tenants.
OCP_MONITORDB_DBNAME: the name of MonitorDB.
OCP_IMAGE: the path of the OCP image. You must set this parameter to the actual path used in Prerequisites.
Run the following command to install OCP Community Edition:
./ocp_installer.sh install -c ocp.yaml