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 e04a72e7
authored
Jun 10, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve 私有镜像模板
1 parent
3aea80d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
deploy.sh
deploy.sh
View file @
e04a72e
#!/bin/bash
#!/bin/bash
#wangtingwei
#wangtingwei
IMAGE_NAME
=
`
cat image_list.txt
`
IMAGE_NAME
=
`
cat image_list.txt
`
PRI_IMAGE_NAME
=
`
echo
$IMAGE_NAME
|awk -F
'/'
'{print $3}'
`
################################
################################
kubectl get ns |grep volcano-system
kubectl get ns |grep volcano-system
if
[
$?
-eq 0
]
;
then
if
[
$?
-eq 0
]
;
then
...
@@ -19,12 +20,19 @@ echo "#sed image name##"
...
@@ -19,12 +20,19 @@ echo "#sed image name##"
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
"##recover image name model##"
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
()
{
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-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
`
}
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
...
@@ -47,16 +55,21 @@ create_server
...
@@ -47,16 +55,21 @@ create_server
recover_image_name
recover_image_name
}
}
private_deploy
()
{
delete_server
private_sed_image_name
create_server
}
case
$1
in
case
$1
in
redeploy_all
)
redeploy_all
)
redeploy_all
redeploy_all
;;
;;
update
)
private_deploy
)
update
private_deploy
;;
;;
*
)
*
)
echo
"please input (redeploy_all or
update
)"
echo
"please input (redeploy_all or
private_deploy
)"
esac
esac
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