nomad-config-file
Description
Consul daemon config file.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | This flag provides a data directory for the agent to store state. This is required for all agents. The directory should be durable across reboots. This is especially critical for agents that are running in server mode as they must be able to persist cluster state. Additionally, the directory must support the use of filesystem locking, meaning some types of mounted folders (e.g. VirtualBox shared folders) may not be suitable. Note: both server and non-server agents may store ACL tokens in the state in this directory so read access may grant access to any tokens on servers and to any tokens used during service registration on non-servers. On Unix-based platforms the files are written with 0600 permissions so you should ensure only trusted processes can execute as the same user as Consul. On Windows, you should ensure the directory has suitable permissions configured as these will be inherited. Required |
|
string | -- | The path to the file. Required |
|
string | dc1 | This flag controls the datacenter in which the agent is running. If not provided, it defaults to "dc1". Consul has first-class support for multiple datacenters, but it relies on proper configuration. Nodes in the same datacenter should be on a single LAN. |
|
string | -- | The group of the file. |
|
string | -- | The permissions of the file. |
|
string | -- | The owner of the file. |
Code
doc: short_help: Consul daemon config file. args: datacenter: doc: short_help: This flag controls the datacenter in which the agent is running. help: | This flag controls the datacenter in which the agent is running. If not provided, it defaults to "dc1". Consul has first-class support for multiple datacenters, but it relies on proper configuration. Nodes in the same datacenter should be on a single LAN. type: string default: dc1 required: true data_dir: doc: short_help: This flag provides a data directory for the agent to store state. help: | This flag provides a data directory for the agent to store state. This is required for all agents. The directory should be durable across reboots. This is especially critical for agents that are running in server mode as they must be able to persist cluster state. Additionally, the directory must support the use of filesystem locking, meaning some types of mounted folders (e.g. VirtualBox shared folders) may not be suitable. Note: both server and non-server agents may store ACL tokens in the state in this directory so read access may grant access to any tokens on servers and to any tokens used during service registration on non-servers. On Unix-based platforms the files are written with 0600 permissions so you should ensure only trusted processes can execute as the same user as Consul. On Windows, you should ensure the directory has suitable permissions configured as these will be inherited. type: string required: true _import: - file-with-content frecklets: - file-with-content: path: '{{:: path ::}}' group: '{{:: group ::}}' owner: '{{:: owner ::}}' mode: '{{:: mode ::}}' content: |- datacenter = "{{:: datacenter ::}}" data_dir = "{{:: data_dir ::}}"
frecklecute nomad-config-file --help Usage: frecklecute nomad-config-file [OPTIONS] PATH Consul daemon config file. Options: --data-dir DATA_DIR This flag provides a data directory for the agent to store state. [required] --datacenter DATACENTER This flag controls the datacenter in which the agent is running. --group GROUP The group of the file. --mode MODE The permissions of the file. --owner USER The owner of the file. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.nomad_config_file.NomadConfigFile # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class NomadConfigFile(AutoPycklet): """Consul daemon config file. Args: data_dir: This flag provides a data directory for the agent to store state. datacenter: This flag controls the datacenter in which the agent is running. group: The group of the file. mode: The permissions of the file. owner: The owner of the file. path: The path to the file. """ FRECKLET_ID = "nomad-config-file" data_dir: str = None datacenter: str = None group: str = None mode: str = None owner: str = None path: str = None def __post_init__(self): super(NomadConfigFile, self).__init__(var_names=["data_dir", "datacenter", "group", "mode", "owner", "path"]) frecklet_class = NomadConfigFile
# -*- coding: utf-8 -*- # # module path: pycklets.nomad_config_file.NomadConfigFile # from pyckles import AutoPycklet class NomadConfigFile(AutoPycklet): """Consul daemon config file. Args: data_dir: This flag provides a data directory for the agent to store state. datacenter: This flag controls the datacenter in which the agent is running. group: The group of the file. mode: The permissions of the file. owner: The owner of the file. path: The path to the file. """ FRECKLET_ID = "nomad-config-file" def __init__(self, data_dir=None, datacenter="dc1", group=None, mode=None, owner=None, path=None): super(NomadConfigFile, self).__init__(var_names=["data_dir", "datacenter", "group", "mode", "owner", "path"]) self._data_dir = data_dir self._datacenter = datacenter self._group = group self._mode = mode self._owner = owner self._path = path @property def data_dir(self): return self._data_dir @data_dir.setter def data_dir(self, data_dir): self._data_dir = data_dir @property def datacenter(self): return self._datacenter @datacenter.setter def datacenter(self, datacenter): self._datacenter = datacenter @property def group(self): return self._group @group.setter def group(self, group): self._group = group @property def mode(self): return self._mode @mode.setter def mode(self, mode): self._mode = mode @property def owner(self): return self._owner @owner.setter def owner(self, owner): self._owner = owner @property def path(self): return self._path @path.setter def path(self, path): self._path = path frecklet_class = NomadConfigFile