
120.205.80.23
FJNFEI@hbfr769

1	核心服务	16	32		192.168.5.207
2	web服务Master节点	4	8		192.168.5.41
3	存储节点	4	8	100+2000	192.168.5.141
4	数据库服务	4	8		192.168.5.195



mv agent-wdd_linux_arm64 /usr/local/bin/agent-wdd
chmod +x /usr/local/bin/agent-wdd

# 主节点安装ssh-key
/usr/local/bin/agent-wdd base ssh config
/usr/local/bin/agent-wdd base ssh key

DEFAULT_HTTP_BACKEND_IP=$(kubectl -n ingress-nginx get svc default-http-backend -o jsonpath='{.spec.clusterIP}')

192.168.5.41

# 批量执行命令
host_list=(
   192.168.5.41
   192.168.5.207
   192.168.5.141
   192.168.5.195
)

for server in "${host_list[@]}";do
   echo " ---> current ip is $server - $(hostname)"

   ssh root@"$server" "DEFAULT_HTTP_BACKEND_IP='$DEFAULT_HTTP_BACKEND_IP' bash -s" <<'EOF'
   echo "DEFAULT_HTTP_BACKEND_IP=$DEFAULT_HTTP_BACKEND_IP"

   curl -s "http://${DEFAULT_HTTP_BACKEND_IP}"
   echo
EOF

   echo ""
done


scp /usr/local/bin/agent-wdd root@${server}:/usr/local/bin/agent-wdd
ssh root@${server} "/usr/local/bin/agent-wdd base ssh config && /usr/local/bin/agent-wdd base ssh key"
ssh root@${server} "echo yes"


scp /root/wdd/docker-arm64-20.10.15.tgz root@${server}:/root/wdd/docker-arm64-20.10.15.tgz
ssh root@${server} "cd /root/wdd/ && tar -zvxf docker-arm64-20.10.15.tgz"
scp /root/wdd/docker-compose-v2.18.0-linux-arm64  root@${server}:/root/wdd/

ssh root@${server} "/usr/local/bin/agent-wdd base docker local"
ssh root@${server} "/usr/local/bin/agent-wdd base dockercompose local"