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 5e25bd41
authored
Mar 26, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seetaas关键字更新为kpl
1 parent
f0cc0780
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
46 deletions
script/autodl/2-replace-file.sh
script/autodl/3-set-mysql.sh
script/autodl/4-set-label-pv.sh
script/seetaas/2-replace-file.sh
script/seetaas/4-set-label-pv.sh
script/seetaas/5-seetaas-start.sh
script/seetaas/reset_mysql.sh
script/autodl/2-replace-file.sh
View file @
5e25bd4
#!/bin/bash
workspace
=
/workspace/autodl
config_workspace
=
/root/configmap/
config_workspace
=
/root/configmap
-kpl
/
######################autodl组件变量信息####################################
autodl_backend
=
http://PUBLIC_IP:30091
#30091
autodl_back_socket
=
ws://PUBLIC_IP:30091
#如果是域名 https此处需要为wss ,如果是ip 则改成ws
...
...
script/autodl/3-set-mysql.sh
View file @
5e25bd4
...
...
@@ -22,7 +22,7 @@ mysql -u $mysql_user -p$mysql_password autodl-core <$workspace/src/autodl-core/s
mysql -u
$mysql_user
-p
$mysql_password
autodl-core <
$workspace
/src/autodl-core/sql/190321.sql
mysql -u
$mysql_user
-p
$mysql_password
autodl-core <
$workspace
/src/autodl-core/sql/190402.sql
echo
"为autodl-core设置seetaas的 service记录"
mysql -u
$mysql_user
-p
$mysql_password
-e
'INSERT INTO `autodl-core`.`service` (`service_id`, `noti_api`) VALUES ("seetaas3", "http://
seetaas--monitor.seetaas
.svc.cluster.local:8920/status");'
mysql -u
$mysql_user
-p
$mysql_password
-e
'INSERT INTO `autodl-core`.`service` (`service_id`, `noti_api`) VALUES ("seetaas3", "http://
kpl--monitor.kpl
.svc.cluster.local:8920/status");'
echo
"为autodl-core设置autodl的 service记录"
mysql -u
$mysql_user
-p
$mysql_password
-e
'INSERT INTO `autodl-core`.`service` (`service_id`, `noti_api`) VALUES ("autodl", "http://autodl--monitor.autodl.svc.cluster.local:8920/status");'
########################autocnn数据库自动跑sql###################################################
script/autodl/4-set-label-pv.sh
View file @
5e25bd4
...
...
@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs
sleep 5
########################################节点打lable#############################################
#cpu节点标签
kubectl label node xxxx
autodl
=
true
seetaas
=
true
cpu
=
true
user_job_node
=
true
internal_service_node
=
true
kubectl label node xxxx
autodl
=
true
kpl
=
true
cpu
=
true
user_job_node
=
true
internal_service_node
=
true
#gpu节点标签
kubectl label node xxxx
autodl
=
true
seetaas
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
kubectl label node xxxx
autodl
=
true
kpl
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
script/seetaas/2-replace-file.sh
View file @
5e25bd4
#!/bin/bash
workspace
=
/workspace/seetaas
config_workspace
=
/root/configmap/
######################autodl组件变量信息####################################
#autodl_backend=http://PUBLIC_IP:30091 #30091
#autodl_back_socket=ws://PUBLIC_IP:30091 #如果是域名 https此处需要为wss ,如果是ip 则改成ws
#autodl_file=http://PUBLIC_IP:30093 #30093
#autodl_admin_backend=http://PUBLIC_IP:30092 # 30092
#deploy_is_private=true # true代表私有部署
#autodl_admin_back_socket=ws://PUBLIC_IP:30092 # 30092
#custom_source= #智源项目改成zhiyuan,其他为空。
#autodl_es=http://INTRANET_IP:9200
################seetaas组件变量信息##########################
seetaas_frontend
=
http://PUBLIC_IP:30180
#30180
seetaas_backend
=
http://PUBLIC_IP:30200
#30200
seetaas_back_socket
=
ws://PUBLIC_IP:30200
# 30200 https对应wss
seetaas_imageproxy
=
http://PUBLIC_IP:30202
#30202
seetaas_deploy
=
http://PUBLIC_IP:30201
#30201
config_workspace
=
/root/kpl_workspace/configmap-kpl
################kpl组件变量信息##########################
kpl_frontend
=
http://PUBLIC_IP:30180
#30180
kpl_backend
=
http://PUBLIC_IP:30200
#30200
kpl_back_socket
=
ws://PUBLIC_IP:30200
# 30200 https对应wss
kpl_imageproxy
=
http://PUBLIC_IP:30202
#30202
kpl_deploy
=
http://PUBLIC_IP:30201
#30201
usercenter_frontend
=
http://PUBLIC_IP:30302
#30302
usercenter_backend
=
http://PUBLIC_IP:30300
#30300
core_nginx
=
http://PUBLIC_IP:30099
#30099
...
...
@@ -25,12 +16,16 @@ mobile_frontend=http://PUBLIC_IP:30181 #30181
mysql_host
=
INTRANET_IP:3306
mysql_user
=
root
mysql_password
=
seetatech
kpl_db_name
=
seetaas
#
seetaas
服务数据库名字
kpl_db_name
=
seetaas
#
kpl
服务数据库名字
redis_host
=
INTRANET_IP:6379
redis_password
=
seetatech
mongo_host
=
'mongodb://admin:admin@INTRANET_IP:27017/
seetaas
?authSource=admin'
#&号前记得加转义
mongo_host
=
'mongodb://admin:admin@INTRANET_IP:27017/
kpl
?authSource=admin'
#&号前记得加转义
harbor_host
=
INTRANET_IP:5000
hb_host
=
INTRANET_IP:5000
#如果是私有部署则共用一个私有harbor,如果是 公用部署则改成hb.seetatech.com
############################kpl关键字整改#################################################
kpl_service_id
=
seetaas3
kpl_realy_path
=
seetaas
kpl_db_name
=
seetaas
#kpl服务数据库名字
####################################公共##################################################
sudo sed -i s/redis_host/
$redis_host
/g
`
find
$config_workspace
-type f -name
"*.yaml"
`
sudo sed -i s/mysql_host/
$mysql_host
/g
`
find
$config_workspace
-type f -name
"*.yaml"
`
...
...
@@ -41,30 +36,21 @@ sudo sed -i s/hb_host/$hb_host/g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s/redis_password/
$redis_password
/g
`
find
$config_workspace
-type f -name
"*.yaml"
`
sudo sed -i s/mysql_password/
$mysql_password
/g
`
find
$config_workspace
-type f -name
"*.yaml"
`
sudo sed -i s/kpl_db_name/
$kpl_db_name
/g
`
find
$config_workspace
-type f -name
"*.yaml"
`
#####################################
seetaas
修改后端##############################################
sudo sed -i s#
seetaas_deploy#
$seetaas
_deploy
#g `find $config_workspace -type f -name "*.yaml"`
#####################################
kpl
修改后端##############################################
sudo sed -i s#
kpl_deploy#
$kpl
_deploy
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#core_nginx#
$core_nginx
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
seetaas_frontend#
$seetaas
_frontend
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
kpl_frontend#
$kpl
_frontend
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#visit_uc_frontend#
$visit_uc_frontend
#g `find $config_workspace -type f -name "*.yaml"`
#############################
seetaas
修改前端app.yaml#######################################
sudo sed -i s#
seetaas_backend#
$seetaas
_backend
#g `find $config_workspace -type f -name "*.yaml"`
#############################
kpl
修改前端app.yaml#######################################
sudo sed -i s#
kpl_backend#
$kpl
_backend
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#usercenter_frontend#
$usercenter_frontend
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#usercenter_backend#
$usercenter_backend
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
seetaas_back_socket#
$seetaas
_back_socket
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
seetaas_imageproxy#
$seetaas
_imageproxy
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
kpl_back_socket#
$kpl
_back_socket
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#
kpl_imageproxy#
$kpl
_imageproxy
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#mobile_frontend#
$mobile_frontend
#g `find $config_workspace -type f -name "*.yaml"`
###############################autodl修改后端app.yaml#############################################
#sudo sed -i s#autodl_es#$autodl_es#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#deploy_is_private#$deploy_is_private#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_backend#$autodl_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_backend#$autodl_admin_backend#g `find $config_workspace -type f -name "*.yaml"`
###############################autodl修改前端###########################################
#sudo sed -i s#autodl_backend#$autodl_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_back_socket#$autodl_back_socket#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_file#$autodl_file#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_backend#$autodl_admin_backend#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#autodl_admin_back_socket#$autodl_admin_back_socket#g `find $config_workspace -type f -name "*.yaml"`
#sudo sed -i s#custom_source#$custom_source#g `find $config_workspace -type f -name "*.yaml"`
###################################################################################################
sudo sed -i s#kpl_service_id#
$kpl_service_id
#g `find $config_workspace -type f -name "*.yaml"`
sudo sed -i s#kpl_realy_path#
$kpl_realy_path
#g `find $config_workspace -type f -name "*.yaml"`
########################################修改Makefile与########################################################
sudo sed -i s/harbor_host/
$harbor_host
/g
`
find
$workspace
-maxdepth 3 -type f -name Makefile
`
cp ~/.docker/config.json
$workspace
/src/autodl-core/conf/
#用于生产环境以及私有部署autodl-core服务向镜像仓库推送镜像所添加的认证文件。
...
...
script/seetaas/4-set-label-pv.sh
View file @
5e25bd4
...
...
@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs
sleep 5
########################################节点打lable#############################################
#cpu节点标签
kubectl label node xxxx
autodl
=
true
seetaas
=
true
cpu
=
true
user_job_node
=
true
internal_service_node
=
true
kubectl label node xxxx
autodl
=
true
kpl
=
true
cpu
=
true
user_job_node
=
true
internal_service_node
=
true
#gpu节点标签
kubectl label node xxxx
autodl
=
true
seetaas
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
kubectl label node xxxx
autodl
=
true
kpl
=
true
gpu
=
true
user_job_node
=
true
internal_service_node
=
true
script/seetaas/5-seetaas-start.sh
View file @
5e25bd4
...
...
@@ -17,4 +17,4 @@ echo "部署seetaas-backend"
cd
$workspace
/src/seetaas-backend
&&
make private_deploy
mode
=
dev
##################################################################
watch kubectl get pod -n autodl
watch kubectl get pod -n
seetaas
watch kubectl get pod -n
kpl
script/seetaas/reset_mysql.sh
View file @
5e25bd4
...
...
@@ -6,11 +6,11 @@ mysql -u $user -p$password -e 'drop database `autodl-core`'
echo
"删除数据库user-center"
mysql -u
$user
-p
$password
-e
'drop database `user-center`'
echo
"删除数据库seetaas"
mysql -u
$user
-p
$password
-e
'drop database `
seetaas
`'
mysql -u
$user
-p
$password
-e
'drop database `
kpl
`'
#################################################
echo
"重新创建数据库autodl-core"
mysql -u
$user
-p
$password
-e
'create database `autodl-core`'
echo
"重新创建数据库user-center"
mysql -u
$user
-p
$password
-e
'create database `user-center`'
echo
"重新创建数据库seetaas"
mysql -u
$user
-p
$password
-e
'create database `
seetaas
`'
mysql -u
$user
-p
$password
-e
'create database `
kpl
`'
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