Commit 4b3e166b by tingweiwang

修复label拼写错误,修复sed/为分隔符的错误

1 parent d8fa2e67
apiVersion: v1
data:
server.crt: |
-----BEGIN CERTIFICATE-----
MIICKTCCAbCgAwIBAgIJAOEzff/TB45/MAoGCCqGSM49BAMCMFMxCzAJBgNVBAYT
AkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRn
aXRzIFB0eSBMdGQxDDAKBgNVBAMMA0tQTDAeFw0yMDA2MDMwMzA2MDRaFw0zMDA2
MDEwMzA2MDRaMFMxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDDAKBgNVBAMMA0tQTDB2
MBAGByqGSM49AgEGBSuBBAAiA2IABDUlvu7GTOB4kYiqBuRqiLU3chqccZhMFL16
olmMX31M8EWA0VXj5JeMo4js7NcuBRfFp2JIdhqOroodz+Bu64nmhjbr7Qkglk14
XguoUrwycTAlba2JdBpXRXwY5uP7eqNQME4wHQYDVR0OBBYEFPQ81JjaE8UG4FyX
Hjo09H9dRkcEMB8GA1UdIwQYMBaAFPQ81JjaE8UG4FyXHjo09H9dRkcEMAwGA1Ud
EwQFMAMBAf8wCgYIKoZIzj0EAwIDZwAwZAIwSCzsAdwv5fJOlAMI6W+0s5whygR3
VQEq88EffPmjQ8Cn6rqWFzev4Cd5W18Qput9AjAjoBh5WdlK1N0sIZpRLaCYK7El
2vab3X1CbV8MkwGJU7Vnjav+w185kSNpbpF6idw=
-----END CERTIFICATE-----
server.key: |
-----BEGIN EC PARAMETERS-----
BgUrgQQAIg==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCc8hpwAUrmEZUnFeD4Fi/OnMT2fAXVtJ50FIR/HCWMD/pPDV1uKLZI
Hm6h6fRQX82gBwYFK4EEACKhZANiAAQ1Jb7uxkzgeJGIqgbkaoi1N3IanHGYTBS9
eqJZjF99TPBFgNFV4+SXjKOI7OzXLgUXxadiSHYajq6KHc/gbuuJ5oY26+0JIJZN
eF4LqFK8MnEwJW2tiXQaV0V8GObj+3o=
-----END EC PRIVATE KEY-----
kind: ConfigMap
metadata:
name: kpl-ssl
namespace: autodl
apiVersion: v1
data:
server.crt: |
-----BEGIN CERTIFICATE-----
MIICKTCCAbCgAwIBAgIJAOEzff/TB45/MAoGCCqGSM49BAMCMFMxCzAJBgNVBAYT
AkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRn
aXRzIFB0eSBMdGQxDDAKBgNVBAMMA0tQTDAeFw0yMDA2MDMwMzA2MDRaFw0zMDA2
MDEwMzA2MDRaMFMxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDDAKBgNVBAMMA0tQTDB2
MBAGByqGSM49AgEGBSuBBAAiA2IABDUlvu7GTOB4kYiqBuRqiLU3chqccZhMFL16
olmMX31M8EWA0VXj5JeMo4js7NcuBRfFp2JIdhqOroodz+Bu64nmhjbr7Qkglk14
XguoUrwycTAlba2JdBpXRXwY5uP7eqNQME4wHQYDVR0OBBYEFPQ81JjaE8UG4FyX
Hjo09H9dRkcEMB8GA1UdIwQYMBaAFPQ81JjaE8UG4FyXHjo09H9dRkcEMAwGA1Ud
EwQFMAMBAf8wCgYIKoZIzj0EAwIDZwAwZAIwSCzsAdwv5fJOlAMI6W+0s5whygR3
VQEq88EffPmjQ8Cn6rqWFzev4Cd5W18Qput9AjAjoBh5WdlK1N0sIZpRLaCYK7El
2vab3X1CbV8MkwGJU7Vnjav+w185kSNpbpF6idw=
-----END CERTIFICATE-----
server.key: |
-----BEGIN EC PARAMETERS-----
BgUrgQQAIg==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCc8hpwAUrmEZUnFeD4Fi/OnMT2fAXVtJ50FIR/HCWMD/pPDV1uKLZI
Hm6h6fRQX82gBwYFK4EEACKhZANiAAQ1Jb7uxkzgeJGIqgbkaoi1N3IanHGYTBS9
eqJZjF99TPBFgNFV4+SXjKOI7OzXLgUXxadiSHYajq6KHc/gbuuJ5oY26+0JIJZN
eF4LqFK8MnEwJW2tiXQaV0V8GObj+3o=
-----END EC PRIVATE KEY-----
kind: ConfigMap
metadata:
creationTimestamp: "2020-06-03T03:06:22Z"
name: kpl-ssl
namespace: kpl
resourceVersion: "61559587"
selfLink: /api/v1/namespaces/kpl/configmaps/kpl-ssl
uid: 4c6174b1-3847-4c29-a7e7-fcd7b6e011e9
...@@ -13,8 +13,8 @@ interface=eno1 #本机IP的物理网卡名称,用于flannel的配置。 ...@@ -13,8 +13,8 @@ interface=eno1 #本机IP的物理网卡名称,用于flannel的配置。
image_list=`cat $image_path/image_list.txt` image_list=`cat $image_path/image_list.txt`
image_list_ksy=`cat $image_path/image_list_ksy.txt` image_list_ksy=`cat $image_path/image_list_ksy.txt`
host_name=`hostname` host_name=`hostname`
NFS_PATH= NFS_PATH=192.168.1.53
NFS_SERVER= NFS_SERVER=/opt/registry
######################################################################################## ########################################################################################
#ssh-keygen -y -f id_rsa > id_rsa.pub 私钥生成公钥 #ssh-keygen -y -f id_rsa > id_rsa.pub 私钥生成公钥
#echo "判断是否允许root登陆" #echo "判断是否允许root登陆"
...@@ -449,22 +449,19 @@ echo "请手动在master节点 设置命令自动补全,命令在脚本最后 ...@@ -449,22 +449,19 @@ echo "请手动在master节点 设置命令自动补全,命令在脚本最后
#source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> ~/.bashrc" #source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> ~/.bashrc"
############################################################################## ##############################################################################
echo "为gpu节点打标签" echo "为gpu节点打标签"
kubectl lable node $host_name autodl=true kpl=true gpu=true user_job_node=true internal_service_node=true kubectl label node $host_name autodl=true kpl=true gpu=true user_job_node=true internal_service_node=true
echo "###################创建pv pvc#############" echo "###################创建pv pvc#############"
echo "########################修改pv模板#######################" && sleep 3 echo "########################修改pv模板#######################" && sleep 3
sed -i s/NFS_PATH/$NFS_PATH/g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml sed -i s@NFS_PATH@$NFS_PATH@g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml
sed -i s/NFS_PATH/$NFS_PATH/g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml sed -i s@NFS_PATH@$NFS_PATH@g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml
sed -i s/NFS_SERVER/$NFS_SERVER/g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml sed -i s@NFS_SERVER@$NFS_SERVER@g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml
sed -i s/NFS_SERVER/$NFS_SERVER/g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml sed -i s@NFS_SERVER@$NFS_SERVER@g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml
kubectl apply -f /root/k8s/autodl_kpl_base/autodl-nfs kubectl apply -f /root/k8s/autodl_kpl_base/autodl-nfs
kubectl apply -f /root/k8s/autodl_kpl_base/kpl-nfs kubectl apply -f /root/k8s/autodl_kpl_base/kpl-nfs
echo "###################还原pv pvc模板配置#############" && sleep 2 echo "###################还原pv pvc模板配置#############" && sleep 2
sed -i s/$NFS_PATH/NFS_PATH/g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml sed -i s@$NFS_PATH@NFS_PATH@g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml
sed -i s/$NFS_PATH/NFS_PATH/g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml sed -i s@$NFS_PATH@NFS_PATH@g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml
sed -i s/$NFS_SERVER/NFS_SERVER/g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml sed -i s@$NFS_SERVER@NFS_SERVER@g /root/k8s/autodl_kpl_base/autodl-nfs/4-pv_pvc.yaml
sed -i s/$NFS_SERVER/NFS_SERVER/g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml sed -i s@$NFS_SERVER@NFS_SERVER@g /root/k8s/autodl_kpl_base/kpl-nfs/4-pv_pvc.yaml
echo "kpl-launcher所需证书" && sleep 2
kubectl apply -f /root/k8s/autodl_kpl_base/kpl-ssl-configmap-autodl.yaml
kubectl apply -f /root/k8s/autodl_kpl_base/kpl-ssl-configmap.yaml
echo "创建autodl push 镜像所需secret证书,用于configmap" echo "创建autodl push 镜像所需secret证书,用于configmap"
sh /root/k8s/autodl_kpl_base/create-harbor-secret.sh 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!