New Generation of Carrier UI
.yml
config as indicated in .env
variable CORE_CONFIG_SEED
./config/pylon-example.yml
./config/pylon.yml
Makefile
:
DIRECT_IP
in row 1COMPOSE := docker compose
e.g. in your case it may be COMPOSE := docker-compose
up:
command and edit it according to your needs. By default it launches centry without ssl and wih local volumes.plugin
directory with __init__.py
metadata.json
following structure:
{
"name": "My new awesome plugin",
"version": "0.1",
"module": "plugins.plugin_name",
"extract": false,
"depends_on": ["required_plugin"],
"init_after": []
}
config.yml
right inside the plugin directorymodule.py
with class Module, inherited from pylon ModuleModel
class Module(module.ModuleModel):
""" Pylon module """
init
and deinit
methods__init__
method should look like:
def __init__(self, settings, root_path, context):
self.settings = settings
self.root_path = root_path
self.context = context
settings
- contains config data from your config.yml
context
- contains data from pylon. Global pylon settings are accessible via context.settings
root_path
- prefix for plugin blueprints
def deinit(self): ...
is just a destructor, so place there whatever is needed for your pluginrequirements.txt
with special modules required by your plugin
./site-packages
folder in plugin directorygit
and http
containing zipped pluginAll settings located in .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 with entries of plugins available. Supported types: file
, http
requirements:
raise_on_attention: false
throws error on non-conflicting requirements that need manual attention
auto_update_plugins: false
updates plugins automatically whenever update detected
ignore_updates:
- plugin_1
- plugin_3
ignores checks for updates for indicated plugins
preordered_plugins:
- plugin_1
- plugin_3
used to set plugins that you require regardless of dependencies.
This option can also be set in PREORDERED_PLUGINS env variable in plugin_1,plugin_3
format
git_config:
default:
username:
password:
key:
key_data:
plugin_1:
username: us3r
password: passw0rd
sets git configuration for market's git manager.
default
is used globally, but special settings can be set for each plugin individually with named section like 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"
}
}
}