Loading... 11:00 合并代码,将ping和程序内限速合并到master分支。 13:40 准备上线。 ``` 准备容器标签: nls 老:202306252209 新:202312041057 ncs 老:202308211638 新:202312041129 ``` 13:50 共6台,每台一次升级 ``` #!/bin/bash #Name: zcyun update ncs shell script #Author:Jacky #Date: 2023-12-04 17:31 #Description: #1. On the ulb web page, disable two nls ulb,and use the first one for tmp nls haproxy. #2. Running on the bootstrap machine. #3. Watch with the monitor page, do manually optimize. #4. Turn the nls to the origin ulb configs. ## define static parameters server_nls_tmp="xxx" server_redis3="xxx" password_redis="xxx" service_ncs_name_array=("" "" "" "" "" "") service_ncs_ipandport_array=("" "" "" "" "" "") for (( i=0; i<${#service_ncs_name_array[@]}; i++ )); do # 获取当前操作ncs节点数据,包括dcos mesos中的名称以及对应公网ip地址和端口以定位redis中的位置 service_ncs_name=${service_ncs_name_array[i]} service_ncs_ipandport=${service_ncs_ipandport_array[i]} # 停止nls负载均衡服务 ssh root@${server_nls_tmp} "systemctl stop haproxy"; echo "nls负载均衡已停止" # 关闭ncs服务 dcos marathon app stop ${service_ncs_1_name} # 删除ncs服务对应redis中的key ssh root@${server_redis3} "/opt/machtalk/redis/src/redis-cli -c -h ${server_redis3} -p 7004 -a ${password_redis} del server_id_onlines_${service_ncs_ipandport}" # 改 dcos marathon app update ${service_ncs_name} < /tmp/update.ncs.json # 启动服务 dcos marathon app start ${service_ncs_name} ; echo "ncs服务已启动" # 打开nls负载均衡服务 sleep 30; ssh root@${server_nls_tmp} "systemctl start haproxy"; echo "nls负载均衡服务已启动" done ``` 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏