前提条件

安装前,请确认已将 ODC 的 Image 保存成 odc.tar.gz 格式的文件,存放在 /root/t-oceanbase-antman 目录下。

操作步骤

  1. 以 root 用户登录曾执行过安装 OCP 的服务器(安装 OCP 时本地生成了相关用户和密码信息)。
  2. 执行以下命令,获取脚本帮助。
  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)

根据返回结果,确认 ODC 的安装步骤为 10。

  1. 执行以下命令,开始安装。
  1. ./install.sh -i 10

输出如下所示日志,表示安装成功。

  1. run install.sh with DEBUG=FALSE, INSTALL_STEPS= CLEAR_STEPS=10 CONFFILE=/root/t-oceanbase-antman/obcluster.conf
  2. [2019-08-16 14:26:03.135619] INFO [start antman API service]
  3. LB_MODE=dns
  4. [2019-08-16 14:26:03.155233] INFO [clear_step9: uninstalling odc and remove docker, logfile: /root/t-oceanbase-antman/logs/uninstall_odc.log]

后续操作

如果后续不再需要 ODC,可以将其卸载。

执行以下命令,卸载 ODC。

  1. cd /root/t-oceanbase-antman
  2. ./install.sh -c 10

输出如下所示日志,表示卸载成功。

  1. run install.sh with DEBUG=FALSE, INSTALL_STEPS= CLEAR_STEPS=10 CONFFILE=/root/t-oceanbase-antman/obcluster.conf
  2. [2019-08-16 14:26:03.135619] INFO [start antman API service]
  3. LB_MODE=dns
  4. [2019-08-16 14:26:03.155233] INFO [clear_step9: uninstalling odc and remove docker, logfile: /root/t-oceanbase-antman/logs/uninstall_odc.log]