Commit b8eead73 by tingweiwang

Update deploy-gpu-k8s.sh

1 parent ca07a4f7
Showing with 2 additions and 3 deletions
......@@ -173,7 +173,6 @@ ETCD_PEER_CA_FILE="/opt/kubernetes/ssl/ca.pem"
ETCD_PEER_CERT_FILE="/opt/kubernetes/ssl/etcd.pem"
ETCD_PEER_KEY_FILE="/opt/kubernetes/ssl/etcd-key.pem"
EOF
echo "+++++++++++++++++++"
ansible etcd -m copy -a "src=etcd.conf dest=/opt/kubernetes/cfg/"
rm -rf etcd.conf
ansible etcd -m copy -a "src=/root/k8s//service/etcd.service dest=/lib/systemd/system/ mode=755"
......@@ -204,7 +203,7 @@ ansible master -m shell -a "systemctl daemon-reload && service flanneld restart
echo "判断当前节点是gpu,还是cpu节点,根据节点不同,完成不同操作&& sleep 2"
lspci |grep -i vga |grep -v ASPEED >/dev/null
if [ $? -eq 0 ];then
echo "当前节点是GPU节点,开始按照docker" && sleep 2 && apt install nvidia-docker2 --allow-unauthenticated -y
echo "当前节点是GPU节点,开始安装gpu docker" && sleep 2 && apt install nvidia-docker2 --allow-unauthenticated -y
echo "当前harbor仓库地址为$harbor_host"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_gpu
echo "开始安装docker"
......@@ -219,7 +218,7 @@ if [ $? -eq 0 ];then
echo "还原daemon.json模板文件"
sed -i s/$harbor_host/harbor_host/g /root/k8s/config/daemon.json_gpu
else
echo "当前节点是CPU节点,开始安装配置docker && sleep 2"
echo "当前节点是CPU节点,开始安装配置cpu docker && sleep 2"
echo "当前harbor仓库地址为$harbor_host,"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_cpu
echo "开始安装docker"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!