大量更新
This commit is contained in:
31
54-202501-深圳规自-ARM/批量执行脚本.sh
Normal file
31
54-202501-深圳规自-ARM/批量执行脚本.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
|
||||
|
||||
yum remove docker net-tools iputils bind-utils lsof curl wget vim mtr htop
|
||||
|
||||
mv octopus-agent_linux_arm64 /usr/local/bin/octopus-agent
|
||||
chmod +x /usr/local/bin/octopus-agent
|
||||
|
||||
host_list=(172.31.2.7 172.31.2.8 172.31.2.9)
|
||||
|
||||
host_list=(172.31.2.8 172.31.2.9)
|
||||
for server in "${host_list[@]}";do
|
||||
echo "current ip is $server"
|
||||
# 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} "mkdir /root/wdd"
|
||||
# scp /root/wdd/disk.sh root@${server}:/root/wdd/
|
||||
# ssh root@${server} "bash /root/wdd/disk.sh && lsblk"
|
||||
# ssh root@${server} "yum install -y rpcbind net-tools iputils bind-utils lsof curl wget vim mtr htop docker docker-compose"
|
||||
scp /etc/docker/daemon.json root@${server}:/etc/docker/
|
||||
ssh root@${server} "systemctl restart docker && sleep 3 && docker info"
|
||||
done
|
||||
|
||||
docker container stop $(docker ps -qa)
|
||||
printf "y/n" | docker container prune
|
||||
docker image rmi $(docker image ls -qa) --force
|
||||
Reference in New Issue
Block a user