Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b3e166b
authored
Jun 10, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复label拼写错误,修复sed/为分隔符的错误
1 parent
d8fa2e67
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
80 deletions
autodl_kpl_base/kpl-ssl-configmap-autodl.yaml
autodl_kpl_base/kpl-ssl-configmap.yaml
script/k8s/deploy-gpu-k8s.sh
autodl_kpl_base/kpl-ssl-configmap-autodl.yaml
deleted
100644 → 0
View file @
d8fa2e6
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
autodl_kpl_base/kpl-ssl-configmap.yaml
deleted
100644 → 0
View file @
d8fa2e6
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
script/k8s/deploy-gpu-k8s.sh
View file @
4b3e166
...
...
@@ -13,8 +13,8 @@ interface=eno1 #本机IP的物理网卡名称,用于flannel的配置。
image_list
=
`
cat
$image_path
/image_list.txt
`
image_list_ksy
=
`
cat
$image_path
/image_list_ksy.txt
`
host_name
=
`
hostname
`
NFS_PATH
=
NFS_SERVER
=
NFS_PATH
=
192.168.1.53
NFS_SERVER
=
/opt/registry
########################################################################################
#ssh-keygen -y -f id_rsa > id_rsa.pub 私钥生成公钥
#echo "判断是否允许root登陆"
...
...
@@ -449,22 +449,19 @@ echo "请手动在master节点 设置命令自动补全,命令在脚本最后
#source <(kubectl completion bash) && echo "source <(kubectl completion bash)" >> ~/.bashrc"
##############################################################################
echo
"为gpu节点打标签"
kubectl lab
le
node
$host_name
autodl
=
true
kpl
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
kubectl lab
el
node
$host_name
autodl
=
true
kpl
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
echo
"###################创建pv pvc#############"
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/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/kpl-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_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
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 /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_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
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
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_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
echo
"创建autodl push 镜像所需secret证书,用于configmap"
sh /root/k8s/autodl_kpl_base/create-harbor-secret.sh
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment