前提条件
安装前,将确认已将 OMS 的 Docker image 保存成镜像文件,存放在 /root/t-oceanbase-antman 目录下。OMS 2.x/3.x 如需要查看监控信息,需要同时准备 influxdb 镜像并与 OMS 镜像存放在相同目录。
操作步骤
以 root 用户登录曾执行过安装 OCP 的服务器。
说明
安装 OCP 时本地生成了相关用户和密码信息
执行以下命令,获取脚本帮助。
cd /root/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)根据返回结果,确认 OMS 的安装步骤为 9。
执行以下命令,开始安装。
./install.sh -i 9
后续操作
如果后续不再需要 OMS,可以将其卸载。
执行以下命令,卸载 OMS。
cd /root/t-oceanbase-antman
./install.sh -c 9
输出如下所示日志,则表示卸载成功。
run install.sh with DEBUG=FALSE, INSTALL_STEPS= CLEAR_STEPS=9 CONFFILE=/root/t-oceanbase-antman/obcluster.conf
[2019-08-16 14:26:03.135619] INFO [start antman API service]
LB_MODE=dns
[2019-08-16 14:26:03.155233] INFO [clear_step9: uninstalling oms and remove docker, logfile: /root/t-oceanbase-antman/logs/uninstall_oms.log]