首批通过分布式安全可靠测评,为关键业务系统打造
部署 OCP
更新时间:2023-08-09 10:10:56
本页面为您介绍部署单节点 OCP 的操作及异常情况的处理。
部署 OCP
在 OCP 服务器上执行以下命令,获取脚本帮助。
[root@hostname /]# cd /root/t-oceanbase-antman [root@hostname t-oceanbase-antman]# ./install.sh -h Usage: ./install.sh [OPTIONS] Options: -h, --help Print help and exit -d, --debug Print debug information -V, --version Print version -i, --install-steps string For example 1,3-5,7- -c, --clear-steps string For example 1,3-5,7- -f, --config-file string Read in a config file -l, --load-balance dns | haproxy Steps: 1. ssh authorization 2. install load balancer (default: dns) 3. install ob server 4. init ocp metadb 5. install temp OCP 6. install obproxy 7. install OCP 8. POSTCHECK 9. install OMS (optional) 10. install ODC (optional)根据返回结果,确认 OCP 的部署步骤为 1~8。
执行以下命令,部署 OCP。
其中,
1-8表示执行第 1 步到第 8 步。[root@hostname t-oceanbase-antman]# bash install.sh -i 1-8
异常处理
如果某一步部署失败,只需要清除当前失败的步骤,根据日志的报错内容修复后,从当前步骤继续安装。例如,第 5 步安装失败了,查看日志,由于配置文件配置错误。则只需要修改正确后,执行以下命令。
[root@hostname t-oceanbase-antman]# bash install.sh -c 5 -i 5-
如果日志中返回如下信息,则表示 OCP 的部署即已完成。
[2020-02-11 22:53:20.978315] INFO [192.168.0.1 post_check_ocp_service start]
[2020-02-11 22:53:20.980821] INFO [Curl 192.168.0.1 -> http://192.168.0.1:8080/services?Action=GetObProxyConfig&User_ID=admin&UID=alibaba]
[2020-02-11 22:53:21.194190] INFO [192.168.0.1: post_check_ocp_service done]
[2020-02-11 22:53:21.201536] INFO [step8: post check done]