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 7672412f
authored
Nov 23, 2019
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve autdodl_start
1 parent
bd828f55
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
12 deletions
script/autodl/start_autodl.sh
script/check/check_seetaas.sh → script/check/check_seetaas_autodl.sh
script/autodl/start_autodl.sh
View file @
7672412
...
...
@@ -25,16 +25,20 @@ echo "start redis"
service redis restart
echo
"start mongo"
service mongod restart
echo
"start elasticsearch"
service elasticsearch restart
###################################################################
echo
"===================== autodl-core ==================="
cd
$workspace
/src/autodl-core
&&
make private_deploy
mode
=
dev
sleep 5
echo
"===================== autodl frontend ==================="
cd
$workspace
/community-frontend
&&
make private_deploy
mode
=
dev
echo
"===================== autodl admin frontend ==================="
cd
$workspace
/autodl-admin-frontend
&&
make private_deploy
mode
=
dev
sleep 5
echo
"===================== autodl backend ==================="
cd
$workspace
/src/autodl-backend
&&
make private_deploy
mode
=
dev
###################################################
###################################################
###############
echo
"wait 20s for start all server"
sleep 20
echo
"start over"
...
...
script/check/check_seetaas.sh
→
script/check/check_seetaas
_autodl
.sh
View file @
7672412
...
...
@@ -2,27 +2,38 @@
#wangtingwei
#2019 /06/29
#用于检查autodl 以及seetaas的pod和端口情况
#################################################################################################################################
check_autodl
(){
echo
"开始检查autodl pod 状态"
echo
"autodl当前pod运行的服务为"
kubectl -n
=
autodl get pod |grep Running |grep -v coll | grep -v seetaas3 |awk
'{print $1}'
autodl_pod_num
=
`
kubectl get pod -n
=
autodl |grep Running |awk
'{print $1}'
|grep -v coll | grep -v seetaas3|wc -l
`
if
[
$autodl_pod_num
-eq 8
]
;
then
echo
-e
"
\0
33[32m autodl pod 数量正常
\0
33[0m"
else
echo
-e
"
\0
33[31m autodl pod数量不正确,开始检查异常Pod
\0
33[0m"
for
pod
in
core--nginx-svc core--servercore--serer user-center--backend user-center--frontend user-center--nginx-svc user-center--rpc-server
autodl_pod
(
autodl--admin-backend
autodl--admin-frontend
autodl--agent
autodl--backend
autodl--frontend
autodl--monitor
autodl--nginx
autodl--worker
core--collector
core--monitor
core--nginx
core--server
core--worker
)
#备注:server-user-center grep后额外匹配了 rpc-server-user-center 此处不用把rpc-server-user-center加进来
for
autodl_pod
in
${
autodl_pod
[@]
}
do
kubectl get pod -n
=
autodl |grep Running |grep -v coll |grep
$pod
||
echo
-e
"
\0
33[31m pod 不存在,请重新部署
\0
33[0m"
kubectl get pod -n
=
autodl |grep Running |grep -v coll |grep
$
autodl_
pod
||
echo
-e
"
\0
33[31m pod 不存在,请重新部署
\0
33[0m"
done
fi
#################################################################################################################################
echo
"开始检查autodl 端口状态"
for
svc
in
core--nginx-svc core--server user-center--nginx-svc user-center--rpc-server
do
kubectl get svc -n
=
autodl |grep NodePort |grep -v coll |grep
$svc
||
echo
-e
"
\0
33[31m
$svc
不存在,请重新部署
\0
33[0m"
done
}
##############################################################################################################################
check_seetaas
()
{
echo
"开始检查seetaas pod状态"
echo
"seetaas当前pod运行的服务为"
kubectl -n
=
seetaas get pod |grep Running |grep -v coll |awk
'{print $1}'
...
...
@@ -43,3 +54,16 @@ for svc in seetaas--frontend seetaas--nginx-svc
do
kubectl get svc -n
=
seetaas |grep NodePort |grep -v coll |grep
$svc
||
echo
-e
"
\0
33[31m
$svc
不存在,请重新部署
\0
33[0m"
done
}
######################################################################################
case
$1
in
check_autodl
)
check_autodl
;;
check_seetaas
)
check_seetaas
;;
*
)
echo
"please input (check_autodl|check_seetaas)"
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