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
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?
You can log on to the server where Java environment is to be deployed and install the Java environment 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
How do I manage the original MetaDB cluster of OCP after upgrading OCP by using obd?
To manage the original MetaDB cluster of OCP after upgrading OCP by using obd, you can copy the information of the original MetaDB cluster to the obd directory /.obd/cluster/ by running the following command:
cp -rf ~/.ocp-installer/cluster/<metadb_cluster_name> ~/.obd/cluster/
Note that metadb_cluster_name specifies the name of the original MetaDB cluster. You must replace it with the actual name of your original MetaDB cluster.
I install obd after I have installed the all-in-one package, and obd cannot work properly. What should I do?
If you attempt to install OceanBase Deployer (obd) by using the RPM package after you have installed the all-in-one installation package, the following message is displayed:
Detected residual environment variables of oceanbase-all-in-one in the system. Please execute `rm -rf ~/.obd/version && rm -rf ~/.oceanbase-all-in-one/obd && obd env set OBD_INSTALL_PRE / ` under the user who installed all-in-one and rerun.
To ensure normal operation of obd, we recommend that you run the command provided in the message to change the value of the OBD_INSTALL_PRE environment variable.
rm -rf ~/.obd/version && rm -rf ~/.oceanbase-all-in-one/obd && obd env set OBD_INSTALL_PRE /
Note
We recommend that you do not install the RPM package of obd again after you have installed the all-in-one installation package. If you want to use obd of another version, we recommend that you install the all-in-one package of the corresponding version. For more information about how to install the all-in-one package, see the (Recommend) Install obd by using the OceanBase All in One package section in the Install obd topic.