安装

  1. 在 OCP 服务器节点上,执行以下命令,获取脚本帮助。

    1. cd /root/t-oceanbase-antman
    2. ./install.sh -h
    3. Usage: ./install.sh [OPTIONS]
    4. Options:
    5. -h, --help Print help and exit
    6. -d, --debug Print debug information
    7. -V, --version Print version
    8. -i, --install-steps string For example 1,3-5,7-
    9. -c, --clear-steps string For example 1,3-5,7-
    10. -f, --config-file string Read in a config file
    11. -l, --load-balance dns | haproxy
    12. Steps:
    13. 1. ssh authorization
    14. 2. install load balancer (default: dns)
    15. 3. install ob server
    16. 4. init ocp metadb
    17. 5. install temp OCP
    18. 6. install obproxy
    19. 7. install OCP
    20. 8. POSTCHECK
    21. 9. install OMS (optional)
    22. 10. install ODC (optional)

    根据返回结果,确认 OCP 的安装步骤为 1~8。

  2. 执行以下命令,安装 OCP。

    1. # n-m 执行第 n 步到第 m 步,-c 清除步骤,-s 安装步骤 -f 指定使用文件
    2. bash install.sh -i 1-8

    说明

    在一台服务器上执行安装命令后,安装脚本会根据配置文件中提供的 IP 地址与连接信息,自动将 OCP 安装到三台服务器上。

异常处理

如果某一步部署失败了,只需要清除当前失败的步骤,根据日志的报错内容修复后,从当前步骤继续安装。

例如,第 5 步安装失败了,查看日志,由于配置文件配置错误,只需要修改正确后,执行以下命令:

  1. bash install.sh -c 5 -i 5-

如果日志中返回如下信息,则表示 OCP 的部署即已完成。

  1. [2020-02-11 22:53:20.978315] INFO [xxx.xxx.xxx.xxx post_check_ocp_service start]
  2. [2020-02-11 22:53:20.980821] INFO [Curl xxx.xxx.xxx.xxx -> http://xxx.xxx.xxx.xxx:8080/services?Action=GetObProxyConfig&User_ID=admin&UID=alibaba]
  3. [2020-02-11 22:53:21.194190] INFO [xxx.xxx.xxx.xxx: post_check_ocp_service done]
  4. [2020-02-11 22:53:21.201536] INFO [step8: post check done]