New Generation of Carrier UI
- GNU make >=4.3 should be installed
- docker, installed according to official installation guide
- Configure firewall to allow traffic from anywhere to ports:
- 5432
- 80
- 3100
- 8086
- 27017
- 5672
- 8200
- 6379
- 9000
- 8080
- Locate and edit pylon
.yml
config as indicated in.env
variableCORE_CONFIG_SEED
- defaults can be found in
./config/pylon-example.yml
- default for beta is
./config/pylon.yml
- defaults can be found in
- Edit
Makefile
:- Set
DIRECT_IP
in row 1 - Optionally: edit your compose cmd by editing
COMPOSE := docker compose
e.g. in your case it may beCOMPOSE := docker-compose
- Find
up:
command and edit it according to your needs. By default it launches centry without ssl and wih local volumes.
- Set
- Make a new package folder in
plugin
directory with__init__.py
- Create
metadata.json
following structure:{ "name": "My new awesome plugin", "version": "0.1", "module": "plugins.plugin_name", "extract": false, "depends_on": ["required_plugin"], "init_after": [] }
- Create config file for you plugin named
config.yml
right inside the plugin directory - Create
module.py
with class Module, inherited from pylonModuleModel
class Module(module.ModuleModel): """ Pylon module """
- define
init
anddeinit
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 yourconfig.yml
context
- contains data from pylon. Global pylon settings are accessible viacontext.settings
root_path
- prefix for plugin blueprints
def deinit(self): ...
is just a destructor, so place there whatever is needed for your plugin- Optionally create
requirements.txt
with special modules required by your plugin- upon launch requirements will be installed automatically into
./site-packages
folder in plugin directory
- upon launch requirements will be installed automatically into
- Downloads plugins from defined source
- supported sources are
git
andhttp
containing zipped plugin
- supported sources are
- Updates plugins automatically (if set) or just notifies
- Installs dependencies for every plugin
All 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 likeplugin_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"
}
}
}