测试环境或者 POC 测试中,为提高性能测试的结果,需要将 ODP 和 observer 分开部署,将 ODP 部署到发起压测的客户机上,同时该客户机也是安装 MetaOB 的机器。但是 MetaOB 容器内自带有 obproxy 进程,因此无法通过 OCP 白屏界面来部署 ODP,只能黑屏手工安装并启动 ODP。
适用版本
ODP 的各个版本
操作方法
安装 ODP RPM 包。
[root@localhost ~]# rpm -ivh obproxy-4.0.0-20230130103527.el7.x86_64.rpm
2. 配置 3883 端口以及 ConfigURL,并启动 ODP。
```
[root@localhost ~]# su - admin
[admin@localhost ~]$ export OBPROXY_PORT=3883
[admin@localhost ~]$ export OBPROXY_CONFIG_SERVER_URL="http://192.xxx.xxx.xx:8080/services?Action=GetObProxyConfig&User_ID=alibaba&UID=ocpmaster"
[admin@localhost ~]$ cd /opt/taobao/install/obproxy-4.0.0/ && ./bin/obproxyd.sh -c start -e offline -n obcluster
use OBPROXY_CONFIG_SERVER_URL
obproxy config server url:http://192.xxx.xxx.xx:8080/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=ocpmaster&ObRegion=obcluster
port is: 3883
app name is: obcluster
unknown idc name
env WORK_THREAD_NUM not set, use default 8
obproxy work_thread_num:8
obproxy started
[admin@obproxy obproxy-4.0.0]$
```
测试连接。
[root@localhost ~]# mysql -h127.1 -uroot@sys#obcluster -P3883 -pxxx -Doceanbase -A -c Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 4799 Server version: 5.6.25 OceanBase 4.0.0.0 (r102010012023021520-1815eb1c30f0d4cd489ce0099f8758dbcd112393) (Built Feb 15 2023 20:49:24) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [oceanbase]>