diff --git a/website/Vagrantfile b/website/Vagrantfile index 1a0f6f62a..6cc7bdf6b 100644 --- a/website/Vagrantfile +++ b/website/Vagrantfile @@ -37,5 +37,5 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network "private_network", ip: "33.33.30.10" config.vm.network "forwarded_port", guest: 4567, host: 8080 config.vm.provision "shell", inline: $script, privileged: false - config.vm.synced_folder ".", "/vagrant", type: "rsync" + config.vm.synced_folder ".", "/vagrant" end diff --git a/website/source/docs/agent/config.html.md b/website/source/docs/agent/config.html.md index 019f8c64f..57b654d5d 100644 --- a/website/source/docs/agent/config.html.md +++ b/website/source/docs/agent/config.html.md @@ -25,7 +25,7 @@ appended together. Any exceptions to these rules are documented alongside the configuration options below. A subset of the configuration options can also be specified using the -command-line interface. See the [CLI Options](#) section for further details. +command-line interface. See the [CLI Options](#cli) section for further details. Nomad's configuration is broken down into logical groupings. Because of the high number of configuration options available, this page is also broken into @@ -36,17 +36,17 @@ sections for easier reading. The following configuration options are available to both client and server nodes, unless otherwise specified: -* `region`: Specifies the region the Nomad agent is a member of. A region - typically maps to a geographic region, for example `us`, with potentially - multiple zones, which map to [datacenters](#datacenter) such as `us-west` - and `us-east`. Defaults to `global`. +* `region`: Specifies the region the Nomad agent is a + member of. A region typically maps to a geographic region, for example `us`, + with potentially multiple zones, which map to [datacenters](#datacenter) such + as `us-west` and `us-east`. Defaults to `global`. * `datacenter`: Datacenter of the local agent. All members of a datacenter should all share a local LAN connection. Defaults to `dc1`. -* `name`: The name of the local node. This value is used to identify individual - nodes in a given datacenter and must be unique per-datacenter. By default this - is set to the local host's name. +* `name`: The name of the local node. This value is used to + identify individual nodes in a given datacenter and must be unique + per-datacenter. By default this is set to the local host's name. * `data_dir`: A local directory used to store agent state. Client nodes use this directory by default to store temporary allocation data as well as cluster @@ -58,13 +58,13 @@ nodes, unless otherwise specified: log levels include `WARN`, `INFO`, or `DEBUG` in increasing order of verbosity. Defaults to `INFO`. -* `bind_addr`: Used to indicate which address the Nomad agent should bind to for - network services, including the HTTP interface as well as the internal gossip - protocol and RPC mechanism. This should be specified in IP format, and can be - used to easily bind all network services to the same address. It is also - possible to bind the individual services to different addresses using the - [addresses](#addresses) configuration option. Defaults to the local loopback - address `127.0.0.1`. +* `bind_addr`: Used to indicate which address the Nomad + agent should bind to for network services, including the HTTP interface as + well as the internal gossip protocol and RPC mechanism. This should be + specified in IP format, and can be used to easily bind all network services to + the same address. It is also possible to bind the individual services to + different addresses using the [addresses](#addresses) configuration option. + Defaults to the local loopback address `127.0.0.1`. * `enable_debug`: Enables the debugging HTTP endpoints. These endpoints can be used with profiling tools to dump diagnostic information about Nomad's @@ -84,10 +84,10 @@ nodes, unless otherwise specified: TCP and UDP should be routable between the server nodes on this port. Defaults to `4648`. Only used on server nodes. -* `addresses`: Controls the bind address for individual network services. Any - values configured in this block take precedence over the default - [bind_addr](#bind_addr). The value is a map of IP addresses and supports the - following keys: +* `addresses`: Controls the bind address for individual + network services. Any values configured in this block take precedence over the + default [bind_addr](#bind_addr). The value is a map of IP addresses and + supports the following keys:
* `http`: The address the HTTP server is bound to. This is the most common bind address to change. Applies to both clients and servers. @@ -154,11 +154,11 @@ configured on client nodes. * `enabled`: A boolean indicating if server mode should be enabled for the local agent. All other server options depend on this value being set. Defaults to `false`. - * `bootstrap_expect`: This is an integer representing the number of server - nodes to wait for before bootstrapping. It is most common to use the - odd-numbered integers `3` or `5` for this value, depending on the cluster - size. A value of `1` does not provide any fault tolerance and is not - recommended for production use cases. + * `bootstrap_expect`: This is an integer + representing the number of server nodes to wait for before bootstrapping. It + is most common to use the odd-numbered integers `3` or `5` for this value, + depending on the cluster size. A value of `1` does not provide any fault + tolerance and is not recommended for production use cases. * `data_dir`: This is the data directory used for server-specific data, including the replicated log. By default, this directory lives inside of the [data_dir](#data_dir) in the "server" sub-path. @@ -185,26 +185,28 @@ configured on server nodes.
* `enabled`: A boolean indicating if client mode is enabled. All other client configuration options depend on this value. Defaults to `false`. - * `state_dir`: This is the state dir used to store client state. By default, - it lives inside of the [data_dir](#data_dir), in the "client" sub-path. - * `alloc_dir`: A directory used to store allocation data. Depending on the - workload, the size of this directory can grow arbitrarily large as it is - used to store downloaded artifacts for drivers (QEMU images, JAR files, - etc.). It is therefore important to ensure this directory is placed some - place on the filesystem with adequate storage capacity. By default, this - directory lives under the [state_dir](#state_dir) at the "alloc" sub-path. - * `servers`: An array of server addresses. This list is used to register the - client with the server nodes and advertise the available resources so that - the agent can receive work. - * `node_id`: This is the value used to uniquely identify the local agent's - node registration with the servers. This can be any arbitrary string but - must be unique to the cluster. By default, if not specified, a randomly- - generate UUID will be used. - * `node_class`: A string used to logically group client nodes by class. This - can be used during job placement as a filter. This option is not required - and has no default. - * `meta`: This is a key/value mapping of metadata pairs. This is a free-form - map and can contain any string values. + * `state_dir`: This is the state dir used to store + client state. By default, it lives inside of the [data_dir](#data_dir), in + the "client" sub-path. + * `alloc_dir`: A directory used to store allocation data. + Depending on the workload, the size of this directory can grow arbitrarily + large as it is used to store downloaded artifacts for drivers (QEMU images, + JAR files, etc.). It is therefore important to ensure this directory is + placed some place on the filesystem with adequate storage capacity. By + default, this directory lives under the [data_dir](#data_dir) at the + "alloc" sub-path. + * `servers`: An array of server addresses. This list is + used to register the client with the server nodes and advertise the + available resources so that the agent can receive work. + * `node_id`: This is the value used to uniquely identify + the local agent's node registration with the servers. This can be any + arbitrary string but must be unique to the cluster. By default, if not + specified, a randomly- generate UUID will be used. + * `node_class`: A string used to logically group client + nodes by class. This can be used during job placement as a filter. This + option is not required and has no default. + * `meta`: This is a key/value mapping of metadata pairs. This + is a free-form map and can contain any string values. ## Atlas Options @@ -215,38 +217,49 @@ integration and are entirely optional. configuration options. The value is a key/value map which supports the following keys:
- * `infrastructure`: The Atlas infrastructure name to connect this agent to. - This value should be of the form `/`, and requires a - valid [token](#token) authorized on the infrastructure. - * `token`: The Atlas token to use for authentication. This token should have - access to the provided [infrastructure](#infrastructure). - * `join`: A boolean indicating if the auto-join feature of Atlas should be - enabled. Defaults to `false`. + * `infrastructure`: The Atlas infrastructure name to + connect this agent to. This value should be of the form + `/`, and requires a valid [token](#token) authorized on + the infrastructure. + * `token`: The Atlas token to use for authentication. This + token should have access to the provided [infrastructure](#infrastructure). + * `join`: A boolean indicating if the auto-join feature of + Atlas should be enabled. Defaults to `false`. * `endpoint`: The address of the Atlas instance to connect to. Defaults to the public Atlas endpoint and is only used if both [infrastructure](#infrastructure) and [token](#token) are provided. -## Command-line Options +## Command-line Options A subset of the available Nomad agent configuration can optionally be passed in via CLI arguments. The `agent` command accepts the following arguments: +* `alloc-dir=`: Equivalent to the Client [alloc_dir](#alloc_dir) config + option. +* `-atlas=`: Equivalent to the Atlas + [infrastructure](#infrastructure) config option. +* `-atlas-join`: Equivalent to the Atlas [join](#join) config option. +* `-atlas-token=`: Equivalent to the Atlas [token](#token) config option. * `-bind=
`: Equivalent to the [bind_addr](#bind_addr) config option. * `-bootstrap-expect=`: Equivalent to the [bootstrap_expect](#bootstrap_expect) config option. +* `-client`: Enable client mode on the local agent. * `-config=`: Specifies the path to a configuration file or a directory of configuration files to load. Can be specified multiple times. * `-data-dir=`: Equivalent to the [data_dir](#data_dir) config option. * `-dc=`: Equivalent to the [datacenter](#datacenter) config option. -* `-log-level=`: Equivalent to the [log_level](#log_level) config option. -* `-node=`: Equivalent to the [node](#node) config option. -* `-region=`: Equivalent to the [region](#region) config option. -* `-client`: Enable client mode on the local agent -* `-server`: Enable server mode on the local agent * `-dev`: Start the agent in development mode. This enables a pre-configured dual-role agent (client + server) which is useful for developing or testing Nomad. No other configuration is required to start the agent in this mode. -* `-atlas=`: Equivalent to the Atlas - [infrastructure](#infrastructure) config option. -* `-atlas-token=`: Equivalent to the Atlas [token](#token) config option. -* `-atlas-join`: Equivalent to the Atlas [join](#join) config option. +* `-log-level=`: Equivalent to the [log_level](#log_level) config option. +* `-meta=`: Equivalent to the Client [meta](#meta) config option. +* `-node=`: Equivalent to the [name](#name) config option. +* `-node-class=`: Equivalent to the Client [node_class](#node_class) + config option. +* `-node-id=`: Equivalent to the Client [node_id](#node_id) config option. +* `-region=`: Equivalent to the [region](#region) config option. +* `-server`: Enable server mode on the local agent. +* `-servers=`: Equivalent to the Client [servers](#servers) config + option. +* `-state-dir=`: Equivalent to the Client [state_dir](#state_dir) config + option.