Skip to content

Commit 585567a

Browse files
committed
优化部署,清理冗余代码
1 parent 9df8f0d commit 585567a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1333
-1130
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Large diffs are not rendered by default.

install/docker/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ docker pull ccr.ccs.tencentyun.com/cube-studio/kubeflow-dashboard-frontend:2025.
5252
注意:前后端代码生产环境均在容器中运行。
5353

5454
后端开发调试:代码通过挂载,在本机ide中修改,在docker-compose中运行调试,debug模式自动热更新。
55-
5655
前端调试:大部分功能在本机ide开发调试即可,支持热更新。完整的平台前端调试需要本地ide开发完成后打包编译为静态文件,也可以在docker中编译成静态文件,在docker-compose中运行验证,不同于后端,这种docker中调试的话前端不支持热更新。
5756

5857
#### 本地后端python代码开发
@@ -82,7 +81,6 @@ docker-compose.yaml文件在install/docker目录下,这里提供了mac和linux
8281
1) debug backend
8382
```
8483
STAGE: 'dev'
85-
cd install/docker/
8684
docker-compose -f docker-compose.yml up
8785
```
8886

@@ -153,7 +151,7 @@ yarn: npm install yarn -g
153151

154152
- `cd myapp/frontend` 进入目录
155153
- `npm run start` 进入调试模式。
156-
- - 首次进入 http://localhost:3000/login?username=admin&login_url=http://localhost:3000/frontend/
154+
- - 首次进入 http://localhost:3000/login?username=admin&login_url=http://localhost:3000/frontend/ 跳转后页面可直接关闭
157155
- - 后面可直接进入 前端 http://localhost:3000/frontend/
158156

159157
### vision 任务流编排
@@ -167,7 +165,8 @@ yarn: npm install yarn -g
167165
2、前端启动
168166
- `cd myapp/vision` 进入目录
169167
- `npm run dev` 进入调试模式。
170-
- - vision启动访问地址:http://localhost:3000/ 或者某个pipeline的id, http://localhost:3000/?pipeline_id=1#/
168+
- - 首次进入 http://localhost:3000/login?username=admin&login_url=http://localhost:3000/frontend/ 跳转后页面可直接关闭
169+
- - vision启动 首页访问地址:http://localhost:3000/#/home/ 或者某个pipeline的id, http://localhost:3000/?pipeline_id=1#/
171170

172171
### visionPlus 任务流编排
173172

@@ -180,6 +179,7 @@ yarn: npm install yarn -g
180179
2、前端启动
181180
- `cd myapp/visionPlus` 进入目录
182181
- `npm run dev` 进入调试模式。
182+
- - 首次进入 http://localhost:3000/login?username=admin&login_url=http://localhost:3000/frontend/ 跳转后页面可直接关闭
183183
- - visionPLus启动访问地址:http://localhost:3000/?scenes=etl_pipeline&pipeline_id=1
184184

185185

install/docker/docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
redis:
4-
image: bitnami/redis:7.4
4+
image: ccr.ccs.tencentyun.com/cube-studio/redis:7.4
55
restart: unless-stopped
66
environment:
77
REDIS_PASSWORD: admin
@@ -14,13 +14,12 @@ services:
1414
environment:
1515
MYSQL_ROOT_PASSWORD: admin
1616
MYSQL_DATABASE: kubeflow
17-
MYSQL_ALLOW_EMPTY_PASSWORD: true
1817
TZ: Asia/Shanghai
1918
ports:
2019
- "3306:3306"
2120
volumes:
2221
- ./data/mysql:/var/lib/mysql
23-
- ./docker-add-file/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
22+
- ./docker-add-file/mysqld.cnf:/etc/mysql/conf.d/mysqld.cnf
2423
healthcheck:
2524
test: "/usr/bin/mysql --user=root --password=admin --execute \"SHOW DATABASES;\""
2625
timeout: 45s
@@ -46,13 +45,13 @@ services:
4645
myapp: # 后端容器
4746
image: ccr.ccs.tencentyun.com/cube-studio/kubeflow-dashboard:2025.09.01
4847
restart: unless-stopped
49-
command: [ 'bash','-c','/entrypoint.sh' ]
48+
command: [ 'bash','-c','/entrypoint.sh' ] # 在容器内使用sleep 命令启动,然后exec进入myapp容器,手动执行/entrypoint.sh 或 python myapp/run.py
5049
environment:
5150
STAGE: 'dev'
5251
REDIS_HOST: 'redis'
5352
REDIS_PORT: '6379'
5453
REDIS_PASSWORD: admin
55-
MYSQL_SERVICE: 'mysql+pymysql://root:admin@host.docker.internal:3306/kubeflow?charset=utf8'
54+
MYSQL_SERVICE: 'mysql+pymysql://root:admin@mysql:3306/kubeflow?charset=utf8mb4'
5655
ENVIRONMENT: DEV
5756
depends_on:
5857
redis:

install/docker/dockerFrontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN mkdir ./frontend ./static
2727

2828
# 拷贝dist包文件
2929
COPY ./myapp/static/appbuilder/frontend ./frontend
30-
COPY ./myapp/chatgpt-web/distChat ./frontend/distChat
30+
#COPY ./myapp/chatgpt-web/distChat ./frontend/distChat
3131
COPY ./myapp/static ./static
3232
# 安全风险去除
3333
RUN rm -rf frontend/manifest.json frontend/robots.txt

install/kubernetes/all_image.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# 所需要的所有镜像
44
kubeflow = [
55
'mysql:8.0.32', # 数据库
6-
'bitnami/redis:7.4', # 缓存
6+
'ccr.ccs.tencentyun.com/cube-studio/redis:7.4', # 缓存
77
"busybox:1.36.0",
88
"kubeflow/training-operator:v1-8a066f9", # 分布式训练
99
'alpine:3.10',
@@ -26,7 +26,7 @@
2626

2727
'quay.io/prometheus-operator/prometheus-config-reloader:v0.46.0', # prometheus配置翻译
2828
"quay.io/prometheus-operator/prometheus-operator:v0.46.0", # prometheus 部署工具
29-
'bitnami/kube-rbac-proxy:0.14.1', # 指标
29+
'ccr.ccs.tencentyun.com/cube-studio/kube-rbac-proxy:0.14.1', # 指标
3030
'carlosedp/addon-resizer:v1.8.4', # 指标
3131

3232
'grafana/grafana:9.5.20', # 监控看板
@@ -45,9 +45,9 @@
4545

4646
pipeline = [
4747
'minio/minio:RELEASE.2023-04-20T17-56-55Z',
48-
'argoproj/argoexec:v3.4.3',
49-
'argoproj/workflow-controller:v3.4.3',
50-
'argoproj/argocli:v3.4.3'
48+
'ccr.ccs.tencentyun.com/cube-argoproj/argoexec:v3.4.3',
49+
'ccr.ccs.tencentyun.com/cube-argoproj/workflow-controller:v3.4.3',
50+
'ccr.ccs.tencentyun.com/cube-argoproj/argocli:v3.4.3'
5151
]
5252
cube_studio = [
5353
# 前后端

install/kubernetes/argo/install-3.4.3-all.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,14 +1177,14 @@ spec:
11771177
- workflow-controller
11781178
args:
11791179
- '--executor-image'
1180-
- argoproj/argoexec:v3.4.3
1180+
- ccr.ccs.tencentyun.com/cube-argoproj/argoexec:v3.4.3
11811181
env:
11821182
- name: LEADER_ELECTION_IDENTITY
11831183
valueFrom:
11841184
fieldRef:
11851185
apiVersion: v1
11861186
fieldPath: metadata.name
1187-
image: argoproj/workflow-controller:v3.4.3
1187+
image: ccr.ccs.tencentyun.com/cube-argoproj/workflow-controller:v3.4.3
11881188
livenessProbe:
11891189
failureThreshold: 3
11901190
httpGet:

install/kubernetes/argo/workflow.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,8 @@ metadata:
10951095
name: my-minio-cred
10961096
namespace: infra
10971097
stringData:
1098-
accesskey: admin
1099-
secretkey: password
1098+
accesskey: minio
1099+
secretkey: minio123
11001100
type: Opaque
11011101
---
11021102
apiVersion: v1
@@ -1185,7 +1185,7 @@ spec:
11851185
# value: 'true'
11861186
- name: ARGO_SECURE
11871187
value: 'false'
1188-
image: argoproj/argocli:v3.4.3 # v3.3.5
1188+
image: ccr.ccs.tencentyun.com/cube-argoproj/argocli:v3.4.3 # v3.3.5
11891189
imagePullPolicy: IfNotPresent
11901190
name: argo-server
11911191
ports:
@@ -1304,7 +1304,7 @@ spec:
13041304
fieldRef:
13051305
apiVersion: v1
13061306
fieldPath: metadata.name
1307-
image: argoproj/workflow-controller:v3.4.3
1307+
image: ccr.ccs.tencentyun.com/cube-argoproj/workflow-controller:v3.4.3
13081308
imagePullPolicy: IfNotPresent
13091309
livenessProbe:
13101310
failureThreshold: 3

install/kubernetes/cube/overlays/config/config.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@
7979
# 认证相关的配置
8080
# ----------------------------------------------------
8181
# 认证类型
82-
# AUTH_OID : OpenID认证
8382
# AUTH_DB : 数据库账号密码配置
8483
# AUTH_LDAP : LDAP认证
85-
# AUTH_REMOTE_USER : 远程用户认证
84+
# AUTH_REMOTE_USER : 远程用户认证,或者OpenID认证,或者公司内部自定义的接口获取用户信息方法
8685
AUTH_TYPE = AUTH_DB
8786

8887
# AUTH_TYPE = AUTH_REMOTE_USER
@@ -94,7 +93,8 @@
9493

9594
# 是否允许用户注册
9695
AUTH_USER_REGISTRATION = False
97-
96+
# 是否允许其他平台的接入,允许后,其他平台可设置cookie在本平台登录,并可跳过登录api调用
97+
AUTH_PLATFORM_ACCESS = False
9898
# 注册用户的默认角色
9999
AUTH_USER_REGISTRATION_ROLE = "Gamma"
100100

@@ -302,13 +302,6 @@
302302
# 任务的最小执行间隔min
303303
PIPELINE_TASK_CRON_RESOLUTION = 10
304304

305-
# 右上角导航
306-
# NAVBAR_RIGHT=[
307-
# {
308-
# "icon": '<svg t="1699698387046" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11066" width="200" height="200"><path d="M512 85.333333c235.648 0 426.666667 191.018667 426.666667 426.666667s-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512 276.352 85.333333 512 85.333333z m0 85.333334a341.333333 341.333333 0 1 0 0 682.666666 341.333333 341.333333 0 0 0 0-682.666666z m-40.405333 156.586666l121.856 369.706667h-83.968l-27.050667-89.685333H361.898667l-27.648 89.685333H256L378.453333 327.253333h93.141334z m256.213333 0v369.706667h-78.549333V327.253333h78.506666z m-303.36 75.562667H420.693333l-43.306666 144.64h89.898666L424.448 402.773333z" fill="#333333" p-id="11067"></path></svg>',
309-
# "link": "/frontend/ai_hub/model_market/model_visual"
310-
# }
311-
# ]
312305

313306

314307
EMAIL_REPORTS_USER = "admin"
@@ -386,6 +379,7 @@ def get_env_variable(var_name, default=None):
386379
# 当前控制器所在的集群
387380
ENVIRONMENT=get_env_variable('ENVIRONMENT','DEV').lower()
388381

382+
# 数据库链接相关配置
389383
SQLALCHEMY_POOL_SIZE = 300
390384
SQLALCHEMY_POOL_RECYCLE = 300 # 超时重连, 必须小于数据库的超时终端时间
391385
SQLALCHEMY_MAX_OVERFLOW = 800
@@ -404,6 +398,7 @@ def get_env_variable(var_name, default=None):
404398
SQLALCHEMY_BINDS = {}
405399
from celery.schedules import crontab
406400

401+
# 缓存配置
407402
CACHE_DEFAULT_TIMEOUT = 60 * 60 * 24 # cache默认超时是24小时,一天才过期
408403

409404
CACHE_CONFIG = {
@@ -412,7 +407,7 @@ def get_env_variable(var_name, default=None):
412407
'CACHE_REDIS_PORT': int(REDIS_PORT), # 配置端口号
413408
'CACHE_REDIS_URL':'redis://:%s@%s:%s/1'%(REDIS_PASSWORD,REDIS_HOST,str(REDIS_PORT)) if REDIS_PASSWORD else 'redis://%s:%s/1'%(REDIS_HOST,str(REDIS_PORT)) # 0,1为数据库编号(redis有0-16个数据库)
414409
}
415-
410+
# 异步任务和定时任务配置
416411
class CeleryConfig(object):
417412
# 任务队列
418413
broker_url = 'redis://:%s@%s:%s/0'%(REDIS_PASSWORD,REDIS_HOST,str(REDIS_PORT)) if REDIS_PASSWORD else 'redis://%s:%s/0'%(REDIS_HOST,str(REDIS_PORT))
@@ -812,7 +807,7 @@ class CeleryConfig(object):
812807
{
813808
"label": "K8s Dashboard",
814809
"name": "kubernetes_dashboard",
815-
"url": "/k8s/dashboard/user1/#/pod?namespace=infra"
810+
"url": "/k8s/dashboard/cluster/#/pod?namespace=infra"
816811
},
817812
{
818813
"label":"Grafana",
@@ -858,7 +853,6 @@ class CeleryConfig(object):
858853
"data_blood":"/frontend/data/metadata/data_blood",
859854
"metadata_metric":"/frontend/data/metadata/metadata_metric",
860855
"dimension": "/frontend/data/metadata/metadata_dimension",
861-
"feast":"/frontend/data/feast/feast",
862856
"dataset":"/frontend/data/media_data/dataset",
863857
"label_platform":"/frontend/data/media_data/label_platform",
864858

install/kubernetes/harbor/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ wget https://githubfast.com/goharbor/harbor/releases/download/v2.11.1/harbor-off
88
wget https://githubfast.com/wise2c-devops/build-harbor-aarch64/releases/download/v2.13.0/harbor-offline-installer-aarch64-v2.13.0.tgz
99

1010
解压
11+
rm -rf /usr/local/harbor
1112
tar xf harbor-offline-installer-v2.11.1.tgz -C /usr/local/
1213
cd /usr/local/harbor
1314

install/kubernetes/init_node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ chmod -R 777 /data/k8s/monitoring/grafana/ /data/k8s/monitoring/prometheus/ /dat
2121
# 关闭swap分区
2222
swapoff -a
2323
# 拉取镜像
24-
sh pull_images.sh
24+
sh pull_images_mini.sh
2525

2626

0 commit comments

Comments
 (0)