Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
kpl-launcher
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 367f9b00
authored
Jun 10, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add annotion脚本注释&& review
1 parent
21474a74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
deploy.sh
deploy.sh
View file @
367f9b0
#!/bin/bash
#!/bin/bash
#wangtingwei
#wangtingwei
IMAGE_NAME
=
`
cat image_list.txt
`
IMAGE_NAME
=
`
cat image_list.txt
`
#获取最新launcher镜像完整名字
PRI_IMAGE_NAME
=
`
echo
$IMAGE_NAME
|awk -F
'/'
'{print $3}'
`
PRI_IMAGE_NAME
=
`
echo
$IMAGE_NAME
|awk -F
'/'
'{print $3}'
`
#截断只保留镜像名字和tag部分
################################
################################
####################################
kubectl get ns |grep volcano-system
kubectl get ns |grep volcano-system
if
[
$?
-eq 0
]
;
then
if
[
$?
-eq 0
]
;
then
echo
"volcano-system namespace already exit,continue operation"
echo
"volcano-system namespace already exit,continue operation"
else
else
echo
"namespace not found, autocreate namespace volcano-system"
&&
kubectl create namespace volcano-system
echo
"namespace not found, autocreate namespace volcano-system"
&&
kubectl create namespace volcano-system
fi
fi
#############################################
#############################################
#######################
sed_image_name
()
{
sed_image_name
()
{
echo
"#
sed image name
##"
echo
"#
##############sed修改部署在公有环境的镜像名字###################
##"
sleep 2
sleep 2
sed -i s@IMAGE_NAME@
$IMAGE_NAME
@g k8s_yaml/kpl-launcher/deployment.yaml
sed -i s@IMAGE_NAME@
$IMAGE_NAME
@g k8s_yaml/kpl-launcher/deployment.yaml
}
}
recover_image_name
()
{
recover_image_name
()
{
echo
"##
recover image name model
##"
echo
"##
##############恢复launcher镜像模板#########################
##"
sleep 2
sleep 2
sed -i s@
$IMAGE_NAME
@IMAGE_NAME@g k8s_yaml/kpl-launcher/deployment.yaml
sed -i s@
$IMAGE_NAME
@IMAGE_NAME@g k8s_yaml/kpl-launcher/deployment.yaml
}
}
####################################################################
private_sed_image_name
()
{
private_sed_image_name
()
{
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-scheduler:latest@
$harbor_host
/k8s/vc-scheduler:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-scheduler:latest@
$harbor_host
/k8s/vc-scheduler:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-webhook-manager:latest@
$harbor_host
/k8s/vc-webhook-manager:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-webhook-manager:latest@
$harbor_host
/k8s/vc-webhook-manager:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-controller-manager:latest@
$harbor_host
/k8s/vc-controller-manager:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@hub.kce.ksyun.com/aivc/volcanosh/vc-controller-manager:latest@
$harbor_host
/k8s/vc-controller-manager:latest@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@IMAGE_NAME@
$harbor_host
/k8s/PRI_IMAGE_NAME@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s@IMAGE_NAME@
$harbor_host
/k8s/PRI_IMAGE_NAME@g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
}
}
######################################################################
delete_server
()
{
delete_server
()
{
kubectl delete -f k8s_yaml/kpl-ssl-configmap.yaml
kubectl delete -f k8s_yaml/kpl-ssl-configmap.yaml
kubectl delete -f k8s_yaml/kpl-ssl-configmap-autodl.yaml
kubectl delete -f k8s_yaml/kpl-ssl-configmap-autodl.yaml
...
...
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