#!/bin/bash


all_ip_list=(172.18.10.8 172.18.10.239 172.18.10.231 172.18.10.198)


install_octopus_agent(){
  local server
   for server in "${all_ip_list[@]}";do
      echo "current servr is ${server}"
      ssh root@"${server}" "echo yes"
      scp /etc/sysctl.conf root@${server}:/etc/sysctl.conf
      ssh root@"${server}" "sysctl -p"
  done
}

clean_octopus_agent(){
  local server
   for server in "${all_ip_list[@]}";do
      echo "the current server is ${server}"
      ssh root@"${server}" "echo yes"
      scp 123.sh root@${server}:/root/123.sh
      ssh root@"${server}" "bash 123.sh"
      echo ""
  done
}



clean_octopus_agent


bash /root/123.sh && docker-compose  -f /root/wdd/harbor/docker-compose.yml up -d

cp /root/wdd/kube_config_cluster.yml /root/.kube/config

kubectl get pods -A

kubectl get svc -A

kubectl -n kube-system logs -f --tail 50