小内存玩转 OB 企业版部署

原文链接,欢迎留言交流。

  1. 如何在小内存服务器上玩转 OB 企业版部署 (qq.com)
  2. OB 企业版数据同步 OMS 部署实践 (qq.com)
  3. OCP 上传 OB 软件包问题原理分析 - 社区问答- OceanBase社区-分布式数据库
  4. OB 集群扩容问题 - 社区问答- OceanBase社区-分布式数据库
3 个赞

新增一篇部署实践,欢迎留言交流。: OB 企业版数据同步 OMS 部署实践 (qq.com)

通过OCP部署单节点OB没有问题,我也部署好了。想进一步,单节点作了三个虚拟机,可否把单节点的三个虚拟机部署在一个OB集群上?

只要 ocp 能访问三个虚拟机的 ip,就当三节点部署。

1 个赞
1 个赞

可以,OCP 进程本质是没有状态的,只是底层的metadb有状态,只要搞定了metadb,OCP 容器随便部署

1 个赞

大佬,我metadb搞定了,但OCP老是提示起不来啊,一般是啥问题呢

贴OCP日志

如果你服务器资源满足 OAT 里使用要求,大概率不会出错。
但是资源尤其是内存资源不满足的时候,可能需要修改 OAT (如果有脚本就可以修改,如果是编译后的就改不了)或者调整某个参数。本质上 OAT 部署 OCP 做的是手动搭建 OCP 的步骤。所以,不是必须的 ,可以手动部署 OCP。
OCP元数据库已经有了。剩下就是创建 OCP 两个租户,以及初始化 OCP 元数据、启动 OCP Docker 实例。

1 个赞

企业版OCP 3.3.4手工部署,按你这方法最后还是失败啊:

[root@yqocp t-oceanbase-antman]# ./install.sh -i 7
run install.sh with DEBUG=FALSE, INSTALL_STEPS=7 CLEAR_STEPS= CONFIG_FILE=/root/t-oceanbase-antman/obcluster.conf
[2023-06-28 22:10:30.678533] INFO [check conf file /root/t-oceanbase-antman/obcluster.conf format …]
[2023-06-28 22:10:30.685047] INFO [conf file is upper case format.]
[2023-06-28 22:10:32.756646] INFO [start antman API service]
[2023-06-28 22:10:32.835663] INFO [SSH_AUTH=password SSH_USER=root SSH_PORT=22 SSH_PASSWORD=ro*** SSH_KEY_FILE=/root/.ssh/id_rsa]
LB_MODE=none
[2023-06-28 22:10:33.249053] INFO [step7: installing ocp, logfile: /root/t-oceanbase-antman/logs/install_ocp.log]
[2023-06-28 22:10:33.253709] INFO [using inner Proxy with OB!]
[2023-06-28 22:10:33.259913] INFO [start ocp1 and init it…]
[2023-06-28 22:10:46.569001] INFO [obproxy is ready]
[2023-06-28 22:10:46.620517] INFO [load docker image: docker load -i /root/t-oceanbase-antman/ocp334.tar.gz]
Loaded image: reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:3.3.4-20221202162515
[2023-06-28 22:11:18.458987] INFO [replace parameters in /root/t-oceanbase-antman/config/env_ocp.yaml]
[2023-06-28 22:11:18.602998] INFO [start container: docker run -d -it --name ocp --net=host --cpu-period 100000 --cpu-quota 800000 --memory=16G --env-file=/root/t-oceanbase-antman/config/env_ocp.yaml -v /home/admin/logs:/home/admin/logs --restart on-failure:5 reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:3.3.4-20221202162515]
abb27168f1e5671c85430b438aae11eb6748c02754a421b0d0a5271fafbf65ca
[2023-06-28 22:11:49.031321] INFO [waiting ocp to be ready on host 192.168.0.68 for 1 Minites]
[2023-06-28 22:12:19.044292] INFO [waiting ocp to be ready on host 192.168.0.68 for 1 Minites]
[2023-06-28 22:12:49.058023] INFO [waiting ocp to be ready on host 192.168.0.68 for 2 Minites]
[2023-06-28 22:13:19.073651] INFO [waiting ocp to be ready on host 192.168.0.68 for 2 Minites]
[2023-06-28 22:13:49.089017] INFO [waiting ocp to be ready on host 192.168.0.68 for 3 Minites]
[2023-06-28 22:14:19.101885] INFO [waiting ocp to be ready on host 192.168.0.68 for 3 Minites]
[2023-06-28 22:14:49.116293] INFO [waiting ocp to be ready on host 192.168.0.68 for 4 Minites]
[2023-06-28 22:15:19.129521] INFO [waiting ocp to be ready on host 192.168.0.68 for 4 Minites]
[2023-06-28 22:15:49.141779] INFO [waiting ocp to be ready on host 192.168.0.68 for 5 Minites]
[2023-06-28 22:16:19.155451] INFO [waiting ocp to be ready on host 192.168.0.68 for 5 Minites]
[2023-06-28 22:16:49.169160] INFO [waiting ocp to be ready on host 192.168.0.68 for 6 Minites]
[2023-06-28 22:17:19.181276] INFO [waiting ocp to be ready on host 192.168.0.68 for 6 Minites]
[2023-06-28 22:17:49.194256] INFO [waiting ocp to be ready on host 192.168.0.68 for 7 Minites]
[2023-06-28 22:18:19.209642] INFO [waiting ocp to be ready on host 192.168.0.68 for 7 Minites]
[2023-06-28 22:18:49.224292] INFO [waiting ocp to be ready on host 192.168.0.68 for 8 Minites]
[2023-06-28 22:19:19.237266] INFO [waiting ocp to be ready on host 192.168.0.68 for 8 Minites]
[2023-06-28 22:19:49.251313] INFO [waiting ocp to be ready on host 192.168.0.68 for 9 Minites]
[2023-06-28 22:20:19.265336] INFO [waiting ocp to be ready on host 192.168.0.68 for 9 Minites]
[2023-06-28 22:20:49.279375] INFO [waiting ocp to be ready on host 192.168.0.68 for 10 Minites]
[2023-06-28 22:21:19.292359] ERROR [ANTMAN-503: timeout( 10 Minites) on waiting ocp ready, URL=http://192.168.0.68:8080/services?Action=GetObProxyConfig&User_ID=admin&UID=alibaba]
[2023-06-28 22:21:19.574419] INFO [OCP multi cluster disabled, pass.]
ocp
[2023-06-28 22:21:19.292359] ERROR [ANTMAN-503: timeout( 10 Minites) on waiting ocp ready, URL=http://192.168.0.68:8080/services?Action=GetObProxyConfig&User_ID=admin&UID=alibaba]
[2023-06-28 22:21:30.305474] ERROR [ANTMAN-314: ERROR occurred in install_ocp, install.sh exit]

其他日志看了一遍也没提示报错,不知道为什么

我ocp容器起来了。ocp的两个租户也创建了,最后install ocp那一步,提示restart ocp之后,就提示如下:

[root@yqocp t-oceanbase-antman]# ./install.sh -i 7
run install.sh with DEBUG=FALSE, INSTALL_STEPS=7 CLEAR_STEPS= CONFIG_FILE=/root/t-oceanbase-antman/obcluster.conf
[2023-06-28 22:10:30.678533] INFO [check conf file /root/t-oceanbase-antman/obcluster.conf format …]
[2023-06-28 22:10:30.685047] INFO [conf file is upper case format.]
[2023-06-28 22:10:32.756646] INFO [start antman API service]
[2023-06-28 22:10:32.835663] INFO [SSH_AUTH=password SSH_USER=root SSH_PORT=22 SSH_PASSWORD=ro*** SSH_KEY_FILE=/root/.ssh/id_rsa]
LB_MODE=none
[2023-06-28 22:10:33.249053] INFO [step7: installing ocp, logfile: /root/t-oceanbase-antman/logs/install_ocp.log]
[2023-06-28 22:10:33.253709] INFO [using inner Proxy with OB!]
[2023-06-28 22:10:33.259913] INFO [start ocp1 and init it…]
[2023-06-28 22:10:46.569001] INFO [obproxy is ready]
[2023-06-28 22:10:46.620517] INFO [load docker image: docker load -i /root/t-oceanbase-antman/ocp334.tar.gz]
Loaded image: reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:3.3.4-20221202162515
[2023-06-28 22:11:18.458987] INFO [replace parameters in /root/t-oceanbase-antman/config/env_ocp.yaml]
[2023-06-28 22:11:18.602998] INFO [start container: docker run -d -it --name ocp --net=host --cpu-period 100000 --cpu-quota 800000 --memory=16G --env-file=/root/t-oceanbase-antman/config/env_ocp.yaml -v /home/admin/logs:/home/admin/logs --restart on-failure:5 reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:3.3.4-20221202162515]
abb27168f1e5671c85430b438aae11eb6748c02754a421b0d0a5271fafbf65ca
[2023-06-28 22:11:49.031321] INFO [waiting ocp to be ready on host 192.168.0.68 for 1 Minites]
[2023-06-28 22:12:19.044292] INFO [waiting ocp to be ready on host 192.168.0.68 for 1 Minites]
[2023-06-28 22:12:49.058023] INFO [waiting ocp to be ready on host 192.168.0.68 for 2 Minites]
[2023-06-28 22:13:19.073651] INFO [waiting ocp to be ready on host 192.168.0.68 for 2 Minites]
[2023-06-28 22:13:49.089017] INFO [waiting ocp to be ready on host 192.168.0.68 for 3 Minites]
[2023-06-28 22:14:19.101885] INFO [waiting ocp to be ready on host 192.168.0.68 for 3 Minites]
[2023-06-28 22:14:49.116293] INFO [waiting ocp to be ready on host 192.168.0.68 for 4 Minites]
[2023-06-28 22:15:19.129521] INFO [waiting ocp to be ready on host 192.168.0.68 for 4 Minites]
[2023-06-28 22:15:49.141779] INFO [waiting ocp to be ready on host 192.168.0.68 for 5 Minites]
[2023-06-28 22:16:19.155451] INFO [waiting ocp to be ready on host 192.168.0.68 for 5 Minites]
[2023-06-28 22:16:49.169160] INFO [waiting ocp to be ready on host 192.168.0.68 for 6 Minites]
[2023-06-28 22:17:19.181276] INFO [waiting ocp to be ready on host 192.168.0.68 for 6 Minites]
[2023-06-28 22:17:49.194256] INFO [waiting ocp to be ready on host 192.168.0.68 for 7 Minites]
[2023-06-28 22:18:19.209642] INFO [waiting ocp to be ready on host 192.168.0.68 for 7 Minites]
[2023-06-28 22:18:49.224292] INFO [waiting ocp to be ready on host 192.168.0.68 for 8 Minites]
[2023-06-28 22:19:19.237266] INFO [waiting ocp to be ready on host 192.168.0.68 for 8 Minites]
[2023-06-28 22:19:49.251313] INFO [waiting ocp to be ready on host 192.168.0.68 for 9 Minites]
[2023-06-28 22:20:19.265336] INFO [waiting ocp to be ready on host 192.168.0.68 for 9 Minites]
[2023-06-28 22:20:49.279375] INFO [waiting ocp to be ready on host 192.168.0.68 for 10 Minites]
[2023-06-28 22:21:19.292359] ERROR [ANTMAN-503: timeout( 10 Minites) on waiting ocp ready, URL=http://192.168.0.68:8080/services?Action=GetObProxyConfig&User_ID=admin&UID=alibaba]
[2023-06-28 22:21:19.574419] INFO [OCP multi cluster disabled, pass.]

docker日志:

[root@yqocp logs]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
70507b65d5fe reg.docker.alibaba-inc.com/oceanbase/ocp-all-in-one:3.3.4-20221202162515 “/usr/bin/supervisor…” 6 minutes ago Up 6 minutes ocp
575bd77e7090 reg.docker.alibaba-inc.com/antman/ob-docker:OB2277_OBP329_x86_20230330 “/root/init.sh” 2 hours ago Up 2 hours META_OB_ZONE_1
[root@yqocp logs]# docker inspect --format ‘{{.LogPath}}’ 70507b65d5fe
/docker/containers/70507b65d5fe85c21d9e936043533bd1449f0e74505bdb0629f4c22fc578656b/70507b65d5fe85c21d9e936043533bd1449f0e74505bdb0629f4c22fc578656b-json.log
[root@yqocp logs]# cat /docker/containers/70507b65d5fe85c21d9e936043533bd1449f0e74505bdb0629f4c22fc578656b/70507b65d5fe85c21d9e936043533bd1449f0e74505bdb0629f4c22fc578656b-json.log
{“log”:“2023-06-28 22:55:58,301 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:58.30734462Z”}
{“log”:“2023-06-28 22:55:58,301 INFO Included extra file “/etc/supervisor/conf.d/base.conf” during parsing\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:58.307421501Z”}
{“log”:“2023-06-28 22:55:58,301 INFO Included extra file “/etc/supervisor/conf.d/ocp.conf” during parsing\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:58.307433321Z”}
{“log”:“2023-06-28 22:55:58,306 INFO RPC interface ‘supervisor’ initialized\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:58.307438358Z”}
{“log”:“2023-06-28 22:55:58,306 INFO supervisord started with pid 1\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:58.307443694Z”}
{“log”:“2023-06-28 22:55:59,309 INFO spawned: ‘crond’ with pid 9\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.315854489Z”}
{“log”:“2023-06-28 22:55:59,312 INFO spawned: ‘rsyslog’ with pid 10\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.315887018Z”}
{“log”:“2023-06-28 22:55:59,315 INFO spawned: ‘ocp-server_00’ with pid 11\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.317798885Z”}
{“log”:“2023-06-28 22:55:59,318 INFO spawned: ‘ocp-obproxy_00’ with pid 12\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.320705095Z”}
{“log”:“2023-06-28 22:55:59,321 INFO spawned: ‘ic-server_00’ with pid 13\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.322700384Z”}
{“log”:“2023-06-28 22:55:59,490 INFO exited: ocp-server_00 (exit status 1; not expected)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:55:59.491999954Z”}
{“log”:“2023-06-28 22:56:00,494 INFO spawned: ‘ocp-server_00’ with pid 50\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:00.496060774Z”}
{“log”:“2023-06-28 22:56:00,495 INFO success: ocp-obproxy_00 entered RUNNING state, process has stayed up for \u003e than 1 seconds (startsecs)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:00.49611427Z”}
{“log”:“2023-06-28 22:56:00,495 INFO success: ic-server_00 entered RUNNING state, process has stayed up for \u003e than 1 seconds (startsecs)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:00.496126465Z”}
{“log”:“2023-06-28 22:56:00,656 INFO exited: ocp-server_00 (exit status 1; not expected)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:00.657017248Z”}
{“log”:“2023-06-28 22:56:02,660 INFO spawned: ‘ocp-server_00’ with pid 77\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:02.662040484Z”}
{“log”:“2023-06-28 22:56:02,792 INFO exited: ocp-server_00 (exit status 1; not expected)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:02.793038531Z”}
{“log”:“2023-06-28 22:56:06,401 INFO spawned: ‘ocp-server_00’ with pid 108\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:06.403146745Z”}
{“log”:“2023-06-28 22:56:06,531 INFO exited: ocp-server_00 (exit status 1; not expected)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:06.532196443Z”}
{“log”:“2023-06-28 22:56:07,533 INFO gave up: ocp-server_00 entered FATAL state, too many start retries too quickly\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:07.534345849Z”}
{“log”:“2023-06-28 22:56:09,403 INFO success: crond entered RUNNING state, process has stayed up for \u003e than 10 seconds (startsecs)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:09.404709342Z”}
{“log”:“2023-06-28 22:56:09,404 INFO success: rsyslog entered RUNNING state, process has stayed up for \u003e than 10 seconds (startsecs)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:09.404741761Z”}
{“log”:“2023-06-28 22:56:59,354 INFO exited: ic-server_00 (exit status 0; expected)\r\n”,“stream”:“stdout”,“time”:“2023-06-28T14:56:59.355170241Z”}

这个问题后来解决了吗?

码一下

抱歉 之前忘记看到 回复了。
请问还有问题吗?