Commit 6ea598cc by tingweiwang

Update deploy-gpu-k8s.sh

1 parent 2a12debb
Showing with 12 additions and 12 deletions
......@@ -16,10 +16,10 @@ host_name=`hostname`
#############################单节点nfs,则nfs server和nfs path配置一致,如果是三节点nfs,则配置nfs真实信息################
NFS_SERVER=192.168.1.53
NFS_PATH=/opt/registry/
NFS_SERVER_2=192.168.1.53
NFS_PATH_2=/opt/registry/
NFS_SERVER_3=192.168.1.53
NFS_PATH_3=/opt/registry/
NFS_2_SERVER=192.168.1.53
NFS_2_PATH=/opt/registry/
NFS_3_SERVER_3=192.168.1.53
NFS_3_PATH=/opt/registry/
########################################################################################
#ssh-keygen -y -f id_rsa > id_rsa.pub 私钥生成公钥
#echo "判断是否允许root登陆"
......@@ -459,19 +459,19 @@ kubectl label node $host_name autodl=true kpl=true gpu=true cpu=true user_job_no
echo "###################创建pv pvc#############"
echo "########################修改pv模板#######################" && sleep 3
sed -i s@NFS_PATH@$NFS_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_PATH_2@$NFS_PATH_2@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_PATH_3@$NFS_PATH_3@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_2_PATH@$NFS_2_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_3_PATH@$NFS_3_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_SERVER@$NFS_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_SERVER_2@$NFS_SERVER_2@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_SERVER_3@$NFS_SERVER_3@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_2_SERVER@$NFS_2_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@NFS_3_SERVER@$NFS_3_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
kubectl apply -f /root/k8s/autodl_kpl_base/autodl-nfs
kubectl apply -f /root/k8s/autodl_kpl_base/kpl-nfs
echo "###################还原pv pvc模板配置#############" && sleep 2
sed -i s@$NFS_PATH@NFS_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_PATH_2@NFS_PATH_2@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_PATH_3@NFS_PATH_3@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_2_PATH@NFS_2_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_3_PATH@NFS_3_PATH@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_SERVER@NFS_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_SERVER_2@NFS_SERVER_2@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_SERVER_3@NFS_SERVER_3@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_2_SERVER@NFS_2_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
sed -i s@$NFS_3_SERVER@NFS_3_SERVER@g `find /root/k8s/autodl_kpl_base/ -maxdepth 2 -name "*.yaml" -type f`
echo "创建autodl push 镜像所需secret证书,用于configmap"
sh /root/k8s/autodl_kpl_base/create-harbor-secret.sh
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!