Commit 67b66ed8 by tingweiwang

fix node type 逻辑

1 parent 07e84df5
Showing with 2 additions and 2 deletions
...@@ -52,8 +52,8 @@ ansible new_node -m shell -a "service flanneld status" ...@@ -52,8 +52,8 @@ ansible new_node -m shell -a "service flanneld status"
ansible new_node -m shell -a "systemctl enable flanneld.service" ansible new_node -m shell -a "systemctl enable flanneld.service"
#############################安装docker############################################ #############################安装docker############################################
echo "判断当前节点是gpu,还是cpu节点,根据节点不同,完成不同操作&& sleep 2" echo "判断当前节点是gpu,还是cpu节点,根据节点不同,完成不同操作&& sleep 2"
lspci |grep -i vga |grep -v ASPEED >/dev/null test=`lspci |grep -i vga |wc -l >/dev/null`
if [ $? -eq 0 ];then if [ $test -gt 1 ];then
echo "当前节点是GPU节点,开始按照docker" && sleep 2 && apt install nvidia-docker2 --allow-unauthenticated -y echo "当前节点是GPU节点,开始按照docker" && sleep 2 && apt install nvidia-docker2 --allow-unauthenticated -y
echo "当前harbor仓库地址为$harbor_host" echo "当前harbor仓库地址为$harbor_host"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_gpu sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json_gpu
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!