Basic functionality
Configs
Sentinel consists of several installable components.
-
proxy
- mandatory component withagreed_with_eula_version
anddevice_token
options - other components will have different config types but mandatory option
enabled
(should be parsed by sentinel or components itself).
config main 'main'
option agreed_with_eula_version "2" # 0 or missing => haven't agreed yet
option device_token "aabbccddee..." # generated by controller `secrets.token_hex(32)`
config component1 'component1'
option "enabled" 1
config component2 'component2'
option "enabled" 0
option "component2_specific_option" 42
...
Requirements
Foris-controller should know all components and provide corresponding API calls.
-
get_settings
,update_settings
- updates the proxy configuration -
get_XXX_settings
,update_XXX_settings
- updates the component configuration
Foris-controller should be aware which components are installed via updater API.
Foris-controller should contain a following dict:
SENTINEL_MODULES = {
"component1": {"hooks": [("service1", "reload"), ], "pkg_name": "sentinel-component1"},
"component2": {"hooks": [("service1", "restart"), ("service2", "reload"), ], "pkg_name": "sentinel-component2-and-bordel"},
}
Foris-controller will try to restart/reload (note that this action may fail) selected services after successful update_settings.
Other participants: @kkoci @mprudek @bbodnar
related issues:
- turris/sentinel/proxy#2 (closed)
- turris/foris/foris#158 (closed)
- turris/project#19
This is part of %Sentinel migration
Edited by Vojtech Myslivec