gufo.thor.services.noc¶
NocService base class.
NocHcService
¶
NocService
¶
Bases: BaseService
Basic class for all NOC's services.
get_compose_command(config, svc)
¶
Get command section.
get_compose_environment(config, svc)
¶
Get environment section.
get_compose_extra(config, svc)
¶
Set caps.
get_compose_image(config, svc)
¶
Get image name.
Use tag from service's config, if any. Otherwise use tag from global config.
get_compose_volumes(config, svc)
¶
Get volumes section.
Mount repo and custom when necessary.
get_compose_volumes_config(config, svc)
¶
Generate crashinfo and backup volume.
get_noc_settings(config)
¶
Get data for settings.yml.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
Thor's config. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Data which can be serialized to settings.yml. |
prepare_compose_config(config, svc, services)
¶
Render configuration files.
NB: As the NocServices is the base class for a bunch of services, ensure, the configuration files are rendered only once.