oceanbase/ocp-ce

By oceanbase

Updated 20 days ago

OceanBase Cloud Platform (OCP) Community Edition

Image
API Management
Databases & Storage
Web Servers
1

1.7K

Introduction

OceanBase Cloud Platform (OCP) is an enterprise-level management platform specifically designed for OceanBase database clusters, compatible with all mainstream versions of OceanBase. OCP offers graphical management capabilities for OceanBase clusters, including full lifecycle management of database components and related resources such as hosts, networks, and software packages. It also provides features for fault recovery, performance diagnosis, and monitoring and alerting. The primary goal of OCP is to assist customers in efficiently managing their OceanBase clusters, reducing IT operational costs and user learning curves.

How to use this image

preparation

OCP requires two OceanBase MySQL mode connection to store meta and monitor data, we recommend using two separate tenant for that, you can refer to the following document for create oceanbase cluster and create oceanbase tenant

start

Start ocp-ce container is pretty simple, with some environment values to specify the metadb and monitordb connection and several essential system parameters, simply run the following command to start the ocp-ce container, please change the environment values and image tag according to your environment.

# set environment parameters
export OCP_CPU_COUNT=4
export OCP_MEMORY_GB=8
export OCP_METADB_HOST=1.1.1.1 # do not use 127.0.0.1 or localhsot
export OCP_METADB_PORT=2881
export OCP_METADB_USER=root@ocp_meta
export OCP_METADB_PASSWORD=ocp_meta_password
export OCP_METADB_DBNAME=ocp_meta
export OCP_MONITORDB_USER=root@ocp_monitor
export OCP_MONITORDB_PASSWORD=ocp_monitor_password
export OCP_MONITORDB_DBNAME=ocp_monitor
export OCP_INITIAL_ADMIN_PASSWORD=initial_password
export TAG=latest
export OCP_CONFIG_PROPERTIES=`cat << EOF
server.port:8080
ocp.site.url:http://1.1.1.1:8080
obsdk.ob.connection.mode:direct
EOF
`

# start ocp container
docker run -d --name ocp-421 \
--network host \ 
--cpu-period 100000 --cpu-quota ${OCP_CPU_COUNT}00000 --memory=${OCP_MEMORY_GB}G \
 -e OCP_METADB_HOST="${OCP_METADB_HOST}" \
 -e OCP_METADB_PORT="${OCP_METADB_PORT}" \
 -e OCP_METADB_DBNAME="${OCP_METADB_DBNAME}" \
 -e OCP_METADB_USER="${OCP_METADB_USER}" \
 -e OCP_METADB_PASSWORD="${OCP_METADB_PASSWORD}" \
 -e OCP_MONITORDB_DBNAME="${OCP_MONITORDB_DBNAME}" \
 -e OCP_MONITORDB_USER="${OCP_MONITORDB_USER}" \
 -e OCP_MONITORDB_PASSWORD="${OCP_MONITORDB_PASSWORD}" \
 -e OCP_INITIAL_ADMIN_PASSWORD="${OCP_INITIAL_ADMIN_PASSWORD}" \
 -e OCP_CONFIG_PROPERTIES="${OCP_CONFIG_PROPERTIES}" \
oceanbase/ocp-ce:${TAG}

Available environment variables

environment variabledescriptionrequired
OCP_METADB_HOSTaddress of metadb cluster, it can be a proxy's address or an observer's addressyes
OCP_METADB_PORTport of metadb clusteryes
OCP_METADB_DBNAMEdatabase name of metadbyes
OCP_METADB_USERusername of metadbyes
OCP_METADB_PASSWORDpassword of metadb useryes
OCP_MONITORDB_DBNAMEdatabase name of monitordbyes
OCP_MONITORDB_USERusername of monitordbyes
OCP_MONITORDB_PASSWORDpassword of monitordb useryes
OCP_INITIAL_ADMIN_PASSWORDthe initial password of admin user, it should match the follwing rules:
1. 8 to 32 characters in length
2. contain at least two digits, two uppercase letters, two lowercase letters, and two of the following special characters
available characters are: ~!@#%^&*_-+=|(){}[]:;,.?/
if this is not set, you need to set the password at login page using the default password
no
OCP_CONFIG_PROPERTIESocp system parameters, one parameter in each line, name and value are sepreated by ':'no

Docker Pull Command

docker pull oceanbase/ocp-ce