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 d667d2fe
authored
Mar 19, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务的2-replace-file改成修改configmap模板的形式
1 parent
89cfac1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
55 deletions
script/autodl/2-replace-file.sh.bak
script/autodl/2-replace-file.sh.bak
deleted
100755 → 0
View file @
89cfac1
#!/bin/bash
#wangtingwei
#用于autodl服务配置文件渲染
workspace
=
/workspace/autodl
core_nginx
=
http://PUBLIC_IP:30099
#30099
################################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
mysql_host
=
INTRANET_IP:3306
mysql_user
=
root
mysql_password
=
seetatech
redis_host
=
INTRANET_IP:6379
redis_password
=
seetatech
mongo_host
=
'mongodb://admin:admin@INTRANET_IP:27017/seetaas?authSource=admin'
#&号前记得加转义
harbor_host
=
INTRANET_IP:5000
hb_host
=
INTRANET_IP:5000
#如果是私有部署则共用一个私有harbor,如果是 公用部署则改成hb.seetatech.com
###############################修改后端app.yaml################################
sudo sed -i s/redis_host/
$redis_host
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s/mysql_host/
$mysql_host
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s/mysql_user/
$mysql_user
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s#mongo_host#
$mongo_host
#g `find $workspace -type f -name app.yaml`
sudo sed -i s/harbor_host/
$harbor_host
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s/hb_host/
$hb_host
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s/redis_password/
$redis_password
/g
`
find
$workspace
-type f -name app.yaml
`
sudo sed -i s/mysql_password/
$mysql_password
/g
`
find
$workspace
-type f -name app.yaml
`
###################################################################################
sudo sed -i s#core_nginx#
$core_nginx
#g `find $workspace -type f -name app.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服务向镜像仓库推送镜像所添加的认证文件。
#########################################################################################################
sudo sed -i s#autodl_es#
$autodl_es
#g `find $workspace -type f -name app.yaml`
sudo sed -i s#deploy_is_private#
$deploy_is_private
#g `find $workspace -type f -name app.yaml`
sudo sed -i s#autodl_backend#
$autodl_backend
#g `find $workspace -type f -name app.yaml`
sudo sed -i s#autodl_admin_backend#
$autodl_admin_backend
#g `find $workspace -type f -name app.yaml`
#################################################################################################
sudo sed -i s#autodl_backend#
$autodl_backend
#g `find $workspace -type f -name production-base.js`
sudo sed -i s#autodl_back_socket#
$autodl_back_socket
#g `find $workspace -type f -name production-base.js`
sudo sed -i s#autodl_file#
$autodl_file
#g `find $workspace -type f -name production-base.js`
sudo sed -i s#autodl_admin_backend#
$autodl_admin_backend
#g `find $workspace -type f -name production-base.js`
sudo sed -i s#autodl_admin_back_socket#
$autodl_admin_back_socket
#g `find $workspace -type f -name production-base.js`
sudo sed -i s#custom_source#
$custom_source
#g `find $workspace -type f -name production-base.js`
##################################修改Dockerfile#######################################################
sed -i s#hb.seetatech.com/k8s/ubuntu-basic:16.04#
$harbor_host
/k8s/ubuntu-basic:16.04#g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s#hb.seetatech.com/k8s/image-proxy:v0.9.0#
$harbor_host
/k8s/image-proxy:v0.9.0#g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s#FROM
\
nginx#FROM
\
$harbor_host
/k8s/nginx#g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
sed -i s#hb.seetatech.com/k8s/cuda:10.0-base-ubuntu16.04#
$harbor_host
/k8s/cuda:10.0-base-ubuntu16.04#g
`
find
$workspace
-maxdepth 5 -name Dockerfile -type f
`
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