This repository has been archived by the owner on May 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig-example.py
127 lines (115 loc) · 4.04 KB
/
config-example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy
# SCOW is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
# encoding: utf-8
# ------- 全局通用配置 -------
#
# COMMON.PORT: 整个系统的入口端口
# COMMON.BASE_PATH: 整个系统的部署根路径。以/开头,不要以/结尾,如果是根路径写"/"
# COMMON.IMAGE: 镜像地址,据实际情况填写
# COMMON.IMAGE_TAG: 镜像tag,据实际情况填写
# 如果您的镜像是本地构建的,IMAGE和IMAGE_TAG必须和构建时的镜像名和tag保持一致。
COMMON = {
"PORT": 80,
"BASE_PATH": "/",
"IMAGE": "ghcr.io/pkuhpc/scow/scow",
"IMAGE_TAG": "master",
}
# ------- 网关配置 -------
#
# GATEWAY.UPLOAD_FILE_SIZE_LIMIT:限制整个系统上传(请求)文件的大小,可接受的格式为nginx的client_max_body_size可接受的值,默认为1G
# GATEWAY = {
# "UPLOAD_FILE_SIZE_LIMIT": "1G",
# }
# ------- 日志配置 -------
#
# LOG.LEVEL: 日志等级,可选trace, debug, info, warn, error。默认info
# LOG.PRETTY: 是否输出更适合直接读的log。如果为False,则输出json格式的日志。默认False
# LOG = {
# # "LEVEL": "info",
# # "PRETTY": False,
# }
#
# ------- 门户系统 -------
#
# PORTAL.BASE_PATH: 非必须,默认值为"/"
# 若设置则/开头,不要以/结尾.
# 如果BASE_PATH为/root1,PORTAL.BASE_PATH为/root2,那么最终访问门户系统的路径是/root1/root2
# PORTAL.NOVNC_IMAGE: novnc客户端的镜像地址。一般无需修改
PORTAL = {
# "BASE_PATH": "/",
# "NOVNC_IMAGE": "ghcr.io/pkuhpc/novnc-client-docker:master"
}
# 若不部署门户系统,设置PORTAL = False
# PORTAL = False
#
# ------- 管理系统 -------
#
# MIS.BASE_PATH: 非必须,默认值为"/mis"
# 若设置则以/开头,不要以/结尾.
# 如果BASE_PATH为/root1,MIS.BASE_PATH为/root2,那么最终访问管理系统的路径是/root1/root2
# MIS.DB_PASSWORD:管理系统数据库的密码. 第一次启动管理系统时会使用此密码初始化管理系统数据库,之后如需修改需要手动在数据库中修改
MIS = {
# "BASE_PATH": "/mis",
"DB_PASSWORD": "must!chang3this"
}
# 若不部署管理系统,设置MIS = False
# MIS = False
#
# ------- 日志收集服务 -------
#
# FLUENTD.LOG_DIR:收集日志的目录,不存在会自动创建
FLUENTD = {
"LOG_DIR": "/var/log/fluentd",
}
# 若不部署日志收集服务,FLUENTD = False
# FLUENTD = False
#
# ------ 自定义认证系统 -------
# 如果使用自带认证系统,请注释整个AUTH部分
# 默认使用自带认证系统
#
# AUTH = {
# # 镜像地址。必填,只要是能访问的镜像地址即可。
# "IMAGE": "ghcr.io/pkuhpc/scow-auth:master",
# # 端口映射(可选)
# # "PORTS": ["80:80", "3302:3302"],
# # 环境变量(可选)
# # "ENV": {
# # "KEY": "123"
# # },
# # 卷映射(可选)
# # 默认添加/etc/hosts:/etc/hosts和./config:/etc/scow
# # 可选添加其他映射
# # "VOLUMES": {
# # "./test.py": "/etc/test.py" ,
# # }
# }
#
# ------ 调试模式 ---------
# DEBUG = {
# # # 将一些内部服务的端口映射到localhost
# # "OPEN_PORTS": {
# # # 数据库的3306端口映射到...
# # "DB": 3308,
# #
# # # redis的6379端口映射到...
# # "REDIS": 6379,
# #
# # # mis-server的5000端口映射到...
# # "MIS_SERVER": 7571,
# #
# # # portal-server的5000端口映射到...
# # "PORTAL_SERVER": 7572,
# #
# # # 认证系统的5000端口映射到...
# # # 对自定义认证系统无效
# # "AUTH": 7575,
# # }
# }