Files
CmiiDeploy/41-202410-珠海横琴/同步资料.sh
zeaslity 437acbeb63 add
2024-10-30 16:30:51 +08:00

38 lines
1.6 KiB
Bash

#!/bin/bash
host_list=(10.129.80.217)
host_list=(10.129.80.218 10.129.80.245 10.129.80.222 10.129.80.223)
host_list=(10.129.80.217 10.129.80.245 10.129.80.222 10.129.80.223)
for ip in "${host_list[@]}";do
echo "current ip is $ip"
ssh root@${ip} "curl 172.24.152.72"
done
disk
10.129.80.245
# ssh root@${ip} "mkdir /root/wdd"
# scp /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 root@${ip}:/root/wdd/
# scp /root/wdd/docker-amd64-20.10.15.tgz root@${ip}:/root/wdd/
# scp /root/wdd/nfs_client_22.04.4_amd64.tar.gz root@${ip}:/root/wdd/
# scp /root/wdd/nfs_server_22.04.4_amd64.tar.gz root@${ip}:/root/wdd/
# scp /root/wdd/docker-compose-linux-x86_64-v2.18.0 root@${ip}:/root/wdd/
# ssh root@${ip} "chmod +x /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44"
# ssh root@${ip} "printf 'firewall\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
# ssh root@${ip} "printf 'sysconfig\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
# ssh root@${ip} "printf 'swap\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
# ssh root@${ip} "printf 'selinux\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
# ssh root@${ip} "printf 'docker\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
# ssh root@${ip} "printf 'dockercompose\n' | /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 --mode=bastion"
scp /etc/docker/daemon.json root@${ip}:/etc/docker/
ssh root@${ip} "systemctl restart docker && sleep 3 && docker info"