Commit af66bffb by wangtingwei

修复1-init脚本找不到问题

1 parent bb0a3813
......@@ -12,7 +12,7 @@ do
sshpass -p $password ssh-copy-id -i ~/.ssh/id_rsa.pub -p $port -o StrictHostKeyChecking=no root@$ip
done
########################################
ansible new_node -m script -a "/root/k8s/script/k8s/1-init.sh"
ansible new_node -m script -a "/root/k8s/script/k8s/backup/1-init.sh"
ansible new_node -m shell -a "mkdir /opt/kubernetes/{cfg,bin,ssl,log} -pv"
scp /opt/kubernetes/ssl/ca* $new_node:/opt/kubernetes/ssl/
#########################################flannel########################################
......
......@@ -195,9 +195,9 @@ ansible master -m copy -a "src=/opt/kubernetes/cfg/flanneld dest=/opt/kubernetes
cp /root/k8s/service/flanneld.service /lib/systemd/system/
ansible master -m copy -a "src=/lib/systemd/system/flanneld.service dest=/lib/systemd/system/ mode=755"
ansible master -m shell -a "systemctl daemon-reload && service flanneld restart && service flanneld status && systemctl enable flanneld.service"
ansible master -m copy -a "src=/root/k8s/service/docker.service dest=/lib/systemd/system/docker.service mode=755"
#ansible master -m copy -a "src=/root/k8s/service/docker.service dest=/lib/systemd/system/docker.service mode=755"
####################################安装nvidia-docker2#####################################
apt install nvidia-docker2 --allow-insecure-repositories
apt install nvidia-docker2 --allow-insecure-repositories -y
###############################安装docker###############################################
echo "当前harbor仓库地址为$harbor_host,"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_gpu
......@@ -206,6 +206,7 @@ ansible master -m shell -a "apt update --allow-insecure-repositories"
ansible master -m shell -a "apt install docker-ce -y --allow-unauthenticated"
echo "分发已修改的daemon.json文件"
ansible master -m copy -a "src=/root/k8s/config/daemon.json_gpu dest=/etc/docker/daemon.json"
ansible master -m copy -a "src=/root/k8s/service/docker.service dest=/lib/systemd/system/docker.service mode=755"
ansible master -m shell -a "service docker restart"
ansible master -m shell -a "service docker status"
ansible master -m shell -a "cat /etc/docker/daemon.json"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!