improvment
This commit is contained in:
41
998-常用脚本/OctopusAgent运行/同步资料.sh
Normal file
41
998-常用脚本/OctopusAgent运行/同步资料.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/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
|
||||
|
||||
mv /root/wdd/octopus-agent_linux_amd64_2024-09-23-17-08-44 /usr/local/bin/octopus-agent
|
||||
chmod +x /usr/local/bin/octopus-agent
|
||||
|
||||
|
||||
# ssh root@${ip} "mkdir /root/wdd"
|
||||
# scp octopus-agent 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 octopus-agent"
|
||||
# ssh root@${ip} "printf 'firewall\n' | octopus-agent --mode=bastion"
|
||||
# ssh root@${ip} "printf 'sysconfig\n' | octopus-agent --mode=bastion"
|
||||
# ssh root@${ip} "printf 'swap\n' | octopus-agent --mode=bastion"
|
||||
# ssh root@${ip} "printf 'selinux\n' | octopus-agent --mode=bastion"
|
||||
# ssh root@${ip} "printf 'docker\n' | octopus-agent --mode=bastion"
|
||||
# ssh root@${ip} "printf 'dockercompose\n' | octopus-agent --mode=bastion"
|
||||
|
||||
scp /etc/docker/daemon.json root@${ip}:/etc/docker/
|
||||
|
||||
ssh root@${ip} "systemctl restart docker && sleep 3 && docker info"
|
||||
|
||||
sed -i '/^$/d' ~/.ssh/*
|
||||
Reference in New Issue
Block a user