genvid.toolbox.NomadService¶
-
class
genvid.toolbox.
NomadService
(vault_policies_folder: str = '', vault_roles_folder: str = '', vault_token_file: str = '', vault_keys_file: str = '', **kwargs)¶ Bases:
genvid.toolbox.service.ServiceTool
,genvid.toolbox.vault.VaultTool
Base Configuration of the Nomad service.
-
NAME
= 'service-nomad'¶
-
SERVICE_NAME
= 'nomad'¶
-
get_config
(name, mode, datacenter, region, bootstrap, bind, node_class, vault_enabled, **ignored)¶ Return the configuration as a dictionary acceptable as a JSON object.
The default configuration can be changed by overriding the result of this method.
Args:
name: The name of the node.
mode: The mode to run the service with (dev, server or client).
datacenter: The datacenter to associate with this Nomad instance.
region: The region to associate with this Nomad instance.
bind: For client only: The service binding address.
- bootstrap: For server mode only: The number of bootstrap servers to
- expect. Set to -1 to use the number of servers listed.
-
get_nomad_token
()¶
-
get_service_args
(configdir, datadir, mode)¶ Return the base arguments depending on the service mode (dev or not).
-
prestart
()¶
-
-
class
service.
NomadService
¶ Implementation of
genvid.toolbox.NomadService