ansible clickhouse -m copy -a "src=/root/.bashrc dest=/root/.bashrc " ansible clickhouse -m shell -a "java -version "
1 2 3
ansible clickhouse -m shell -a "yum install -y rsync " ansible clickhouse -m synchronize -a "src=/opt/module/StarRocks dest=/opt/module/" ansible clickhouse -m shell -a " ls /opt/module/StarRocks "
fe部署
第一次启动需指定–helper参数,后续再启动无需指定此参数
sh /opt/module/StarRocks/fe/bin/start_fe.sh --helper 172.20.85.111:9010 --daemon
1 2
ansible fe -m shell -a " sh /opt/module/StarRocks/fe/bin/stop_fe.sh " ansible fe -m shell -a " sh /opt/module/StarRocks/fe/bin/start_fe.sh --daemon "
1 2 3 4 5 6
mysql -h 127.0.0.1 -P9030 -uroot -p mysql> SHOW PROC '/frontends'\G ALTERSYSTEMADD FOLLOWER "172.20.85.112:9010"; ALTERSYSTEMADD FOLLOWER "172.20.85.142:9010"; # ALTER SYSTEM DROP FOLLOWER "172.20.85.142:9010"; ALTERSYSTEMADD OBSERVER "172.20.85.113:9010";
supervisorctl status //查看所有进程的状态 supervisorctl stop be //停止 supervisorctl start be //启动 supervisorctl restart be //重启 supervisorctl update be //配置文件修改后使用该命令加载新的配置 supervisorctl reload //重新启动配置中的所有程序
官网升级
升级 BE 前的准备
1 2 3 4 5 6 7 8 9 10 11 12 13
#为了避免 BE 重启期间不必要的 Tablet 修复,进而影响升级后的集群性能,建议在升级前先在 FE Leader 上执行如下命令以禁用 Tablet 调度功能, > mysql -h 127.0.0.1 -P9030 -uroot -p
admin set frontend config ("max_scheduling_tablets"="0"); admin set frontend config ("disable_balance"="true"); admin set frontend config ("disable_colocate_balance"="true");
# 在所有 BE 重启升级完成后,通过 show backends 命令确认所有 BE 的 Alive 状态为 true 后,启用 Tablet 调度功能,
admin set frontend config ("max_scheduling_tablets"="2000"); admin set frontend config ("disable_balance"="false"); admin set frontend config ("disable_colocate_balance"="false");