This topic describes how to deploy an OceanBase Cloud Platform (OCP) cluster in multi-zone mode.
Deployment in multi-zone mode
Check if the obcluster.conf file exists in the
/root/t-oceanbase-antman/directory.If yes, directly go to Step 4.
Otherwise, proceed to the next step.
Log on to the OCP-Server as the root user and run the following commands:
[root@hostname /]# cd /root/t-oceanbase-antman/ [root@hostname clonescripts]# bash init_obcluster_conf.shDuring mode selection, enter 3 for multi-node deployment.
The system will then generate the corresponding configuration file template.
Example:
################## OCP multi-zone configurations ###################### OCP_MAZ_ENABLED=TRUE #If multi-zone mode is enabled and no global virtual IP address (VIP) is available, the configured OCP_VIP and OBPROXY_VIP can be changed to the VIP of the primary zone or the IP address of any OCP node. OCP_MAZ_AZ_NAME_LIST=(az1 az1 az2) #The zone names that you specified for az_name for OCP 1, OCP 2, and OCP 3. OCP_MAZ_OCP_VIP_LIST=(192.168.0.1 192.168.0.2 192.168.0.3) #The IP addresses that you specified for site-url for OCP 1, OCP 2, and OCP 3. OCP_MAZ_OCP_VPORT_LIST=(8080 8080 8080) #The port numbers that you specified for site-url for OCP 1, OCP 2, and OCP 3. OCP_MAZ_METAPROXY_VIP_LIST=(192.168.0.1 192.168.0.2 192.168.0.3) #The IP addresses of OCP 1, OCP 2, and OCP 3 for accessing the MetaDB. OCP_MAZ_METAPROXY_VPORT_LIST=(2883 2883 2883) #The port numbers of OCP 1, OCP 2, and OCP 3 for accessing the MetaDB.When you deploy OCP in multi-zone mode, refer to the "OCP multi-zone configurations" paragraph of the preceding example..
The following information needs to be modified:
Note
By default, the template for multi-zone OCP deployment has 3 zones. You can add or delete the number of parameter values as needed. For example, if you want to deploy the OCP cluster across two zones, set OCP_MAZ_AZ_NAME_LIST=(az1 az2).
OCP_MAZ_ENABLED: specifies whether to enable the multi-zone mode. Default value: FALSE. Set the value to TRUE when you need to enable the multi-zone mode.
OCP_MAZ_AZ_NAME_LIST: specifies the zone names of the OCP nodes. For example, (az1 az2 az3). The zone names of different OCP nodes can be the same. For example, (az1 az1 az2).
OCP_MAZ_OCP_VIP_LIST: specifies the server addresses of the OCP nodes, namely, the host part of SiteUrl. For example, (10.1.1.1 10.1.1.2 10.1.1.3).
OCP_MAZ_OCP_VPORT_LIST: specifies the server ports of the OCP nodes, namely, the part of SiteUrl for the port. For example, (80 80 80).
OCP_MAZ_METAPROXY_VIP_LIST: specifies the IP addresses of the MetaDB for the OCP nodes to access it.
OCP_MAZ_METAPROXY_VPORT_LIST: specifies the port numbers of the MetaDB for the OCP nodes to access it.