Q: How can I specify the version of a component?
A: You can add the version declaration to the deployment configuration file. For example, you can specify the version of OceanBase-CE V3.1.0 in the deployment configuration file in the following format:
oceanbase-ce:
version: 3.1.3
You can use the following command to obtain the version of the component, depending on the deployment method (online or offline):
If the deployment method is online deployment, the command to obtain the version of the component is as follows. The version number can be found in the output.
obd mirror list oceanbase.community.stableIf the deployment method is offline deployment, the command to obtain the version of the component is as follows. The version number can be found in the output.
obd mirror list local
Q: How can I use a component of a specific version?
A: You can add the package_hash or tag declaration to the deployment configuration file. For example, if you have tagged your compiled OceanBase-CE, you can specify it by tag. For example:
oceanbase-ce:
tag: my-oceanbase
You can also use package_hash to specify a specific version. When you run an obd mirror command, OBD will return an MD5 value of the component. The MD5 value is the value of package_hash.
oceanbase-ce:
package_hash: 589c4f8ed2662835148a95d5c1b46a07e36c2d346804791364a757aef4f7b60d
You can use the following command to obtain the hash value of the package, depending on the deployment method (online or offline):
If the deployment method is online deployment, the command to obtain the hash value of the package is as follows. The
md5value in the output is the hash value of the package.obd mirror list oceanbase.community.stableIf the deployment method is offline deployment, the command to obtain the hash value of the package is as follows. The
md5value in the output is the hash value of the package.obd mirror list local
Q: How can I modify the startup process after I modify the code of OceanBase-CE?
A: You can modify the startup plug-ins in the ~/.obd/plugins/oceanbase-ce/ directory. For example, after you add a new startup configuration item for OceanBase-CE V3.1.0, you can modify the start.py file in the ~/.obd/plugins/oceanbase-ce/3.1.0 directory.
Q: How to update OBD local mirror in offline mode?
A: When your machine with OBD installed cannot connect to the public network, but you need to update OBD or other components, you can download the RPM package you need on another machine that can connect to the public network, copy the RPM package to the machine where OBD installed, and then add the new RPM package to the local mirror through obd mirror clone command.
The following shows how to update the OBD mirror in the local repository:
# First, download the latest RPM package of OBD on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/obdeploy/releases/download/vx.x.x/ob-deploy-x.x.x-xxx.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh ob-deploy-x.x.x-xxx.rpm obd_server:~
# Add the downloaded mirror to local.
obd mirror clone ob-deploy-x.x.x-xxx.rpm
# Close the remote mirror source.
obd mirror disable remote
Q: How to update OBD?
A: There are two ways to update your OBD, which you can choose from depending on your situation:
- If your machine can connect to the public network or have the RPM package for the updated OBD in the mirror you configured, you can directly use the
obd updatecommand to update the OBD. When you finish with the update, use theobd --versioncommand to check the version of OBD and confirm whether the update is successful. - If your machine cannot connect to the public network and there is no RPM package for the updated OBD in the mirror you configured. Please add the RPM package that used to update OBD to the local mirror via
obd mirror clonecommand first, and then use theobd updatecommand to update the OBD.
The following shows how to update OBD to the latest version in centos7 system:
# First, download the latest RPM package of OBD on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/obdeploy/releases/download/vx.x.x/ob-deploy-x.x.x-xxx.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh ob-deploy-x.x.x-xxx.rpm obd_server:~
# Execute the following command on the OBD machine to complete the upgrade.
# 1.Add the downloaded mirror to local.
obd mirror clone ob-deploy-x.x.x-xxx.rpm
# 2.Close the remote mirror source.
obd mirror disable remote
# 3.Update.
obd update
Q: How to upgrade OceanBase with OBD?
A: There are two ways to upgrade OceanBase with OBD, which you can choose from depending on your situation:
- If your machine can connect to the public network or have the RPM package for the updated OceanBase in the mirror you configured, you can directly use the
obd cluster upgradecommand to upgrade the OceanBase. - If your machine cannot connect to the public network and there is no RPM package for the updated OceanBase in the mirror you configured. Please add the RPM package that used to update OceanBase to the local mirror via
obd mirror clonecommand first, and then use theobd cluster upgradecommand to upgrade the OceanBase.
The following shows how to upgrade OceanBase-CE from V3.1.1 to V3.1.2 with OBD on CentOS7 offline mode:
# First, you should check your OBD version, and if the version is lower than V1.2.1, please update the OBD version.
# Download the OceanBase-CE RPM package on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/oceanbase/releases/download/v3.1.2_CE/oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm obd_server:~
# Execute the following command on the OBD machine to complete the upgrade.
# 1.Add the downloaded mirror to local.
obd mirror clone oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# 2.Close the remote mirror source.
obd mirror disable remote
# 3.Upgrade.
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2
error processing
You may encounter a Too many match error, just select a hash on Candidates. For example:
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2 --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
How do I upgrade an OBProxy to obproxy-ce 3.2.3?
The open source OBProxy component is formally renamed as obproxy-ce after v3.2.3. Therefore, you need to modify the metadata as the execution user of OBD. For more information, see Execute the script. Then, run the following command for upgrade:
obd cluster upgrade <deploy name> -c obproxy-ce -V 3.2.3
What should I do if an exception occurs when I use OBD to upgrade an OBProxy?
The following problem may occur during the upgrade of OBProxy:
Stop obproxy ok
Start obproxy ok
obproxy program health check ok
Connect to obproxy x
The problem indicates that OBD cannot connect to the OBProxy, the reason may be either of the following:
The access from other IP addresses except 127.0.0.1 is disabled by proxysys. As a result, the OBD server cannot establish a connection. In this case, run the following command to connect to proxysys:
obclient -h<obproxy_ip> -uroot@proxysys -P<obproxy_port> -p<obproxy_pwd>Note
If the connection fails with a password set by yourself, change the password to empty or to
proxysys.Then, run the
alter proxyconfig set skip_proxy_sys_private_check = truecommand.The password of proxysys is inconsistent with the one stored in OBD. In this case, run the corresponding command to connect to proxysys, and then run the
alter proxyconfig set obproxy_sys_password = <obproxy_pwd>command to change the password of proxysys.You can change the password to empty (
obproxy_sys_password = '') or to the password stored in the configuration file of OBD.
If the problem persists, submit an issue on GitHub (https://github.com/oceanbase/obdeploy/issues), and designated professionals will help you fix the issue.
What should I do if the OBProxy service cannot be started after OBD is upgraded?
An OBD upgrade will initialize the OBProxy password. If obproxy_sys_password is specified, run the following command to connect to proxysys:
obclient -h<obproxy_ip> -uroot@proxysys -P<obproxy_port> -p<obproxy_pwd>
Note
If the connection fails with a password set by yourself, change the password to empty or to
proxysys.
Then, run the alter proxyconfig set obproxy_sys_password = '' command to set the password of proxysys to empty, or set the password to the one specified by obproxy_sys_password in the configuration file.
How do I configure the Java environment before I deploy OCP Express?
You can log on to the server where OCP Express is to be deployed and install the Java environment for OCP Express in the following ways based on the actual situation.
Online installation
On CentOS or RedHat, run the following command:
sudo yum install java-1.8.0-openjdk
On Ubuntu or Debian, run the following commands:
sudo apt-get update
sudo apt-get install openjdk-8-jre
Offline installation
Click the installation package for the x86_64 architecture or ARM architecture.
Upload the downloaded installation package to the corresponding server. In the directory where the installation package is located, run the following commands to decompress and install the package.
# Decompress the package. tar -zxvf Alibaba_Dragonwell_Extended_8*.tar.gz # Go to the directory generated after the decompression. cd dragonwell* # Create a soft link. ln -s `pwd`/bin/java /usr/bin/java