1.网关组扩容

在主控机上添加 newproxy.yml 脚本
# vim newproxy.yml
添加如下内容:
- name: install newproxy beginning
hosts: newproxy
remote_user: root
gather_facts: false
roles:
- beginning

- name: install proxy_module server
hosts: newproxy
remote_user: root
gather_facts: false
roles:
- db_module

(1)修改 tdsql_hosts 文件内容
在 ansible 路径下的 tdsql_hosts 文件中添加类似如下内容

[newproxy]
newproxy1 ansible_ssh_host=1.1.1.1 <------------这里就写要添加的新的proxy机器的ip
地址
newproxy2 ansible_ssh_host=2.2.2.2
(2)后台安装 proxy
执行前确保新增的proxy机器的时间和集群中其它机器的时间同步和ansible机器到目标的免密登录
执行安装新 proxy
# ansible-playbook -i tdsql_hosts newproxy.yml

(3)前台上报 proxy 机器和网关组扩容
a.前台上报新增 proxy 机器
b.前台网关组扩容

扩容成功后验证:
后台验证 新增 proxy 机器上执行 # ps –ef|grep proxy




posted @ 2022-02-22 10:07  www.cqdba.cn  阅读(70)  评论(0编辑  收藏  举报