Commit 5e25bd41 by tingweiwang

seetaas关键字更新为kpl

1 parent f0cc0780
#!/bin/bash #!/bin/bash
workspace=/workspace/autodl workspace=/workspace/autodl
config_workspace=/root/configmap/ config_workspace=/root/configmap-kpl/
######################autodl组件变量信息#################################### ######################autodl组件变量信息####################################
autodl_backend=http://PUBLIC_IP:30091 #30091 autodl_backend=http://PUBLIC_IP:30091 #30091
autodl_back_socket=ws://PUBLIC_IP:30091 #如果是域名 https此处需要为wss ,如果是ip 则改成ws autodl_back_socket=ws://PUBLIC_IP:30091 #如果是域名 https此处需要为wss ,如果是ip 则改成ws
......
...@@ -22,7 +22,7 @@ mysql -u $mysql_user -p$mysql_password autodl-core <$workspace/src/autodl-core/s ...@@ -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/190321.sql
mysql -u $mysql_user -p$mysql_password autodl-core <$workspace/src/autodl-core/sql/190402.sql mysql -u $mysql_user -p$mysql_password autodl-core <$workspace/src/autodl-core/sql/190402.sql
echo "为autodl-core设置seetaas的 service记录" 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记录" 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");' 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################################################### ########################autocnn数据库自动跑sql###################################################
...@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs ...@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs
sleep 5 sleep 5
########################################节点打lable############################################# ########################################节点打lable#############################################
#cpu节点标签 #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节点标签 #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
#!/bin/bash #!/bin/bash
workspace=/workspace/seetaas workspace=/workspace/seetaas
config_workspace=/root/configmap/ config_workspace=/root/kpl_workspace/configmap-kpl
######################autodl组件变量信息#################################### ################kpl组件变量信息##########################
#autodl_backend=http://PUBLIC_IP:30091 #30091 kpl_frontend=http://PUBLIC_IP:30180 #30180
#autodl_back_socket=ws://PUBLIC_IP:30091 #如果是域名 https此处需要为wss ,如果是ip 则改成ws kpl_backend=http://PUBLIC_IP:30200 #30200
#autodl_file=http://PUBLIC_IP:30093 #30093 kpl_back_socket=ws://PUBLIC_IP:30200 # 30200 https对应wss
#autodl_admin_backend=http://PUBLIC_IP:30092 # 30092 kpl_imageproxy=http://PUBLIC_IP:30202 #30202
#deploy_is_private=true # true代表私有部署 kpl_deploy=http://PUBLIC_IP:30201 #30201
#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
usercenter_frontend=http://PUBLIC_IP:30302 #30302 usercenter_frontend=http://PUBLIC_IP:30302 #30302
usercenter_backend=http://PUBLIC_IP:30300 #30300 usercenter_backend=http://PUBLIC_IP:30300 #30300
core_nginx=http://PUBLIC_IP:30099 #30099 core_nginx=http://PUBLIC_IP:30099 #30099
...@@ -25,12 +16,16 @@ mobile_frontend=http://PUBLIC_IP:30181 #30181 ...@@ -25,12 +16,16 @@ mobile_frontend=http://PUBLIC_IP:30181 #30181
mysql_host=INTRANET_IP:3306 mysql_host=INTRANET_IP:3306
mysql_user=root mysql_user=root
mysql_password=seetatech mysql_password=seetatech
kpl_db_name=seetaas #seetaas服务数据库名字 kpl_db_name=seetaas #kpl服务数据库名字
redis_host=INTRANET_IP:6379 redis_host=INTRANET_IP:6379
redis_password=seetatech 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 harbor_host=INTRANET_IP:5000
hb_host=INTRANET_IP:5000 #如果是私有部署则共用一个私有harbor,如果是 公用部署则改成hb.seetatech.com 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/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"` 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"` ...@@ -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/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/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"` sudo sed -i s/kpl_db_name/$kpl_db_name/g `find $config_workspace -type f -name "*.yaml"`
#####################################seetaas修改后端############################################## #####################################kpl修改后端##############################################
sudo sed -i s#seetaas_deploy#$seetaas_deploy#g `find $config_workspace -type f -name "*.yaml"` 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#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"` sudo sed -i s#visit_uc_frontend#$visit_uc_frontend#g `find $config_workspace -type f -name "*.yaml"`
#############################seetaas修改前端app.yaml####################################### #############################kpl修改前端app.yaml#######################################
sudo sed -i s#seetaas_backend#$seetaas_backend#g `find $config_workspace -type f -name "*.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_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#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#kpl_back_socket#$kpl_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_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"` 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#kpl_service_id#$kpl_service_id#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#kpl_realy_path#$kpl_realy_path#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"`
########################################修改Makefile与######################################################## ########################################修改Makefile与########################################################
sudo sed -i s/harbor_host/$harbor_host/g `find $workspace -maxdepth 3 -type f -name 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服务向镜像仓库推送镜像所添加的认证文件。 cp ~/.docker/config.json $workspace/src/autodl-core/conf/ #用于生产环境以及私有部署autodl-core服务向镜像仓库推送镜像所添加的认证文件。
......
...@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs ...@@ -4,7 +4,7 @@ kubectl create -f /root/k8s/autodl_seetaas_base/seetaas-nfs
sleep 5 sleep 5
########################################节点打lable############################################# ########################################节点打lable#############################################
#cpu节点标签 #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节点标签 #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
...@@ -17,4 +17,4 @@ echo "部署seetaas-backend" ...@@ -17,4 +17,4 @@ echo "部署seetaas-backend"
cd $workspace/src/seetaas-backend && make private_deploy mode=dev cd $workspace/src/seetaas-backend && make private_deploy mode=dev
################################################################## ##################################################################
watch kubectl get pod -n autodl watch kubectl get pod -n autodl
watch kubectl get pod -n seetaas watch kubectl get pod -n kpl
...@@ -6,11 +6,11 @@ mysql -u $user -p$password -e 'drop database `autodl-core`' ...@@ -6,11 +6,11 @@ mysql -u $user -p$password -e 'drop database `autodl-core`'
echo "删除数据库user-center" echo "删除数据库user-center"
mysql -u $user -p$password -e 'drop database `user-center`' mysql -u $user -p$password -e 'drop database `user-center`'
echo "删除数据库seetaas" echo "删除数据库seetaas"
mysql -u $user -p$password -e 'drop database `seetaas`' mysql -u $user -p$password -e 'drop database `kpl`'
################################################# #################################################
echo "重新创建数据库autodl-core" echo "重新创建数据库autodl-core"
mysql -u $user -p$password -e 'create database `autodl-core`' mysql -u $user -p$password -e 'create database `autodl-core`'
echo "重新创建数据库user-center" echo "重新创建数据库user-center"
mysql -u $user -p$password -e 'create database `user-center`' mysql -u $user -p$password -e 'create database `user-center`'
echo "重新创建数据库seetaas" echo "重新创建数据库seetaas"
mysql -u $user -p$password -e 'create database `seetaas`' mysql -u $user -p$password -e 'create database `kpl`'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!