大量更新

This commit is contained in:
zeaslity
2025-02-21 14:00:16 +08:00
parent 20c4f57715
commit c5780f90d7
85 changed files with 50718 additions and 67 deletions

View File

@@ -5,37 +5,45 @@ 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"
for server in "${host_list[@]}";do
echo "current ip is $server"
ssh root@${server} "curl 172.24.152.72"
done
disk
10.129.80.245
mv /root/wdd/octopus-agent_linux_amd64 /usr/local/bin/octopus-agent
wget http://42.192.52.227:9000/octopus/octopus-agent_linux_amd64
mv octopus-agent_linux_amd64 /usr/local/bin/octopus-agent
chmod +x /usr/local/bin/octopus-agent
wget http://42.192.52.227:9000/octopus/docker-amd64-20.10.15.tgz
ssh root@${server} "mkdir /root/wdd"
scp /usr/local/bin/octopus-agent root@${server}:/usr/local/bin/octopus-agent
scp /root/wdd/docker-amd64-20.10.15.tgz root@${server}:/root/wdd/docker-amd64-20.10.15.tgz
scp /root/wdd/docker-compose-linux-x86_64-v2.18.0 root@${server}:/root/wdd/
scp /root/wdd/nfs_client_22.04.4_amd64.tar.gz root@${server}:/root/wdd/
scp /root/wdd/nfs_server_22.04.4_amd64.tar.gz root@${server}:/root/wdd/
scp /root/wdd/docker-compose-linux-x86_64-v2.18.0 root@${server}:/root/wdd/
scp /root/wdd/disk.sh root@${server}:/root/wdd/
ssh root@${server} "bash /root/wdd/disk.sh && lsblk"
ssh root@${server} "chmod +x /usr/local/bin/octopus-agent"
ssh root@${server} "printf 'firewall\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'sysconfig\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'swap\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'selinux\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'sshkey\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'docker\n' | octopus-agent --mode=bastion"
ssh root@${server} "printf 'dockercompose\n' | octopus-agent --mode=bastion"
printf 'dockerconfig\n' | octopus-agent --mode=bastion
scp /etc/docker/daemon.json root@${server}:/etc/docker/
ssh root@${server} "systemctl restart docker && sleep 3 && docker info"
sed -i '/^$/d' ~/.ssh/*
@@ -43,7 +51,12 @@ sed -i '/^$/d' ~/.ssh/*
chmod +x /usr/local/bin/octopus-agent
printf 'firewall\n' | octopus-agent --mode=bastion
printf 'sysconfig\n' | octopus-agent --mode=bastion
printf 'sshkey\n' | octopus-agent --mode=bastion
printf 'sshconfig\n' | octopus-agent --mode=bastion
printf 'swap\n' | octopus-agent --mode=bastion
printf 'selinux\n' | octopus-agent --mode=bastion
printf 'docker\n' | octopus-agent --mode=bastion
printf 'dockercompose\n' | octopus-agent --mode=bastion
printf 'dockerconfig\n' | octopus-agent --mode=bastion