新一代运营商UI
.yml
配置,如.env
变量CORE_CONFIG_SEED
./config/pylon-example.yml
中找到./config/pylon.yml
Makefile
:DIRECT_IP
设置为第1行COMPOSE := docker compose
例如,在您的情况下,它可能是COMPOSE := docker-compose
up:
根据您的需要进行命令并编辑。默认情况下,它启动了无SSL和WIH本地卷的Centry。 __init__.py
在plugin
目录中制作新的软件包文件夹metadata.json
以下结构: {
"name" : " My new awesome plugin " ,
"version" : " 0.1 " ,
"module" : " plugins.plugin_name " ,
"extract" : false ,
"depends_on" : [ " required_plugin " ],
"init_after" : []
}
config.yml
就在插件目录中ModuleModel
创建module.py
class Module ( module . ModuleModel ):
""" Pylon module """
init
和deinit
方法__init__
方法应该看起来像: def __init__ ( self , settings , root_path , context ):
self . settings = settings
self . root_path = root_path
self . context = context
settings
-包含来自config.yml
的配置数据context
-包含来自塔的数据。全局塔设置可通过context.settings
访问。root_path
插件蓝图的前缀def deinit(self): ...
只是一个破坏者,所以将插件需要的任何东西放在那里requirements.txt
,带有插件要求的特殊模块./site-packages
文件夹中git
和http
所有设置位于.yml中
plugin_repo :
type : file
path : ' ./config/plugins_local.json '
plugin_repo :
type : http
path : ' https://raw.githubusercontent.com/carrier-io/centry/main/config/plugins.json '
.json文件,带有可用插件的条目。支持类型: file
, http
requirements :
raise_on_attention : false
在需要手动关注的非冲突要求上丢弃错误
auto_update_plugins : false
每当检测到更新时,自动更新插件
ignore_updates :
- plugin_1
- plugin_3
忽略检查指示插件更新的检查
preordered_plugins :
- plugin_1
- plugin_3
用于设置所需的插件,无论依赖关系如何。此选项也可以在preborded_plugins env变量plugin_1,plugin_3
格式中设置
git_config :
default :
username :
password :
key :
key_data :
plugin_1 :
username : us3r
password : passw0rd
为Market的Git Manager设置GIT配置。 default
在全球使用,但是可以为每个插件设置特殊设置,并使用命名部分(如plugin_1
设置
{
"plugin_1" : {
"source" : {
"type" : " git " ,
"url" : " https://my/git/url/plugin_1.git "
},
"objects" : {
"metadata" : " https://url/to/plugin/metadata/metadata.json "
}
},
"plugin_2" : {
"source" : {
"type" : " git " ,
"url" : " https://my/git/url/plugin_1.git " ,
"branch" : " dev "
},
"objects" : {
"metadata" : " https://url/to/plugin/metadata/metadata.json "
}
},
"plugin_3" : {
"source" : {
"type" : " http " ,
"url" : " https://my/zip/url/plugin_3.zip "
},
"objects" : {
"metadata" : " https://url/to/plugin/metadata/metadata.json "
}
}
}