开启/关闭 插件功能
控制插件功能的开启/关闭。
配置参数
配置项 | 类型 | 示例 | 描述 |
---|---|---|---|
enablePlugin | boolean | true | 是否开启插件模块 |
操作步骤
ONES 配置 开启 Plugin-插件
修改配置
进入运行中的 ones 容器
ones-ai-k8s.sh
修改配置
vim config/private.yaml
如果打开的文件中有名为 enablePlugin 的 key,则只需将它的值改为 true。如果不存在名为 enablePlugin 的 key 则需要在最后一行写入
enablePlugin: true
修改后保存并退出
应用配置
make setup-ones
当观察到如下输出则说明执行成功
bash-5.0# make setup-ones
python3 ./script/python/ones/cmd/setupapp.py --app=ones --version=v1 --ones-path=
2023-07-19 08:50:18,429 [INFO] ones_path=, k8s_root_dir=/data/ones/ones-ai-k8s
2023-07-19 08:50:18,499 [INFO] render config
2023-07-19 08:50:18,499 [INFO] merge configs
2023-07-19 08:50:22,707 [WARNING] /data/ones/ones-ai-k8s/private-overlay-templates/ones/v1 not found, skip
2023-07-19 08:50:22,708 [INFO] ones_path=, k8s_root_dir=/data/ones/ones-ai-k8s
2023-07-19 08:50:22,772 [INFO] compatible overlay
2023-07-19 08:50:23,910 [INFO] collect dir info
2023-07-19 08:50:23,932 [INFO] setup global resrouces
2023-07-19 08:50:24,179 [INFO] gen registry credentials
2023-07-19 08:50:24,183 [INFO] setup namespace, registry-secret
2023-07-19 08:50:24,517 [INFO] setup local-storage static-pvc, static-pv (cache config to tmp/config.yaml)
storageclass.storage.k8s.io/ones-local-storage unchanged
storageclass.storage.k8s.io/ones-local-storage-mock unchanged
deployment.apps/localstorage-ones-cn-server-node03 unchanged
storageclass.storage.k8s.io/ones-local-storage unchanged
storageclass.storage.k8s.io/ones-local-storage-mock unchanged
2023-07-19 08:50:29,062 [INFO] backward compatible
2023-07-19 08:50:29,216 [INFO] diff ones before setup
2023-07-19 08:50:34,218 [INFO] setup ones
2023-07-19 08:50:37,007 [INFO] record latest data
render to tmp/latest-record-setup-app-comfigmap.yaml
render to tmp/date-record-setup-app-comfigmap.yaml
2023-07-19 08:50:42,156 [INFO] remove /data/ones/ones-ai-k8s/tmp
2023-07-19 08:50:42,161 [INFO] setup ones finish
2023-07-19 08:50:42,162 [INFO] elapsed time: 23.663 seconds
验证
等待 1 分钟 登录 ONES 系统,进入 「配置中心」可以看到「插件管理」选项则正常
ONES 配置 关闭 plugin-插件
修改配置
进入运行中的 ones 容器
ones-ai-k8s.sh
修改配置
vim config/private.yaml
如果打开的文件中有名为 enablePlugin 的 key,则只需将它的值改为 false。如果不存在名为 enablePlugin 的 key 则需要在最后一行写入
enablePlugin: false
修改后保存并退出
应用配置
make setup-ones
当观察到如下输出则说明执行成功
bash-5.0# make setup-ones
python3 ./script/python/ones/cmd/setupapp.py --app=ones --version=v1 --ones-path=
2023-07-19 08:55:24,102 [INFO] ones_path=, k8s_root_dir=/data/ones/ones-ai-k8s
2023-07-19 08:55:24,167 [INFO] render config
2023-07-19 08:55:24,167 [INFO] merge configs
2023-07-19 08:55:28,490 [WARNING] /data/ones/ones-ai-k8s/private-overlay-templates/ones/v1 not found, skip
2023-07-19 08:55:28,490 [INFO] ones_path=, k8s_root_dir=/data/ones/ones-ai-k8s
2023-07-19 08:55:28,555 [INFO] compatible overlay
2023-07-19 08:55:29,700 [INFO] collect dir info
2023-07-19 08:55:29,722 [INFO] setup global resrouces
2023-07-19 08:55:29,965 [INFO] gen registry credentials
2023-07-19 08:55:29,969 [INFO] setup namespace, registry-secret
2023-07-19 08:55:30,282 [INFO] setup local-storage static-pvc, static-pv (cache config to tmp/config.yaml)
storageclass.storage.k8s.io/ones-local-storage unchanged
storageclass.storage.k8s.io/ones-local-storage-mock unchanged
deployment.apps/localstorage-ones-cn-server-node03 unchanged
storageclass.storage.k8s.io/ones-local-storage unchanged
storageclass.storage.k8s.io/ones-local-storage-mock unchanged
2023-07-19 08:55:34,582 [INFO] backward compatible
2023-07-19 08:55:34,719 [INFO] diff ones before setup
2023-07-19 08:55:39,526 [INFO] setup ones
2023-07-19 08:55:42,431 [INFO] record latest data
render to tmp/latest-record-setup-app-comfigmap.yaml
render to tmp/date-record-setup-app-comfigmap.yaml
2023-07-19 08:55:47,707 [INFO] remove /data/ones/ones-ai-k8s/tmp
2023-07-19 08:55:47,711 [INFO] setup ones finish
2023-07-19 08:55:47,712 [INFO] elapsed time: 23.545 seconds
验证
等待 1 分钟 登录 ONES 系统,进入 「配置中心」看不见「插件管理」选项则正常