github.com/smintz/nomad@v0.8.3/website/source/docs/commands/agent.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: agent"
     4  sidebar_current: "docs-commands-_agent" # Use "_" to break prefix match
     5  description: >
     6    The agent command is the main entrypoint to running a Nomad client
     7    or server.
     8  ---
     9  
    10  # Command: agent
    11  
    12  The agent command is the heart of Nomad: it runs the agent that handles client
    13  or server functionality, including exposing interfaces for client consumption
    14  and running jobs.
    15  
    16  Due to the power and flexibility of this command, the Nomad agent is documented
    17  in its own section. See the [Nomad Agent](/docs/agent/index.html) section for
    18  more information on how to use this command and the options it has.
    19  
    20  ## Command-line Options
    21  
    22  A subset of the available Nomad agent configuration can optionally be passed in
    23  via CLI arguments. The `agent` command accepts the following arguments:
    24  
    25  * `-alloc-dir=<path>`: Equivalent to the Client [alloc_dir](#alloc_dir) config
    26     option.
    27  * `-acl-enabled`: Equivalent to the ACL [enabled](/docs/agent/configuration/acl.html#enabled) config option.
    28  * `-acl-replication-token`: Equivalent to the ACL [replication_token](/docs/agent/configuration/acl.html#replication_token) config option.
    29  * `-bind=<address>`: Equivalent to the [bind_addr](#bind_addr) config option.
    30  * `-bootstrap-expect=<num>`: Equivalent to the
    31    [bootstrap_expect](#bootstrap_expect) config option.
    32  * `-client`: Enable client mode on the local agent.
    33  * `-config=<path>`: Specifies the path to a configuration file or a directory of
    34    configuration files to load. Can be specified multiple times.
    35  * `-consul-address=<addr>`: Equivalent to the [address](/docs/agent/configuration/consul.html#address) config option.
    36  * `-consul-auth=<auth>`: Equivalent to the [auth](/docs/agent/configuration/consul.html#auth) config option.
    37  * `-consul-auto-advertise`: Equivalent to the [auto_advertise](/docs/agent/configuration/consul.html#auto_advertise) config option.
    38  * `-consul-ca-file=<path>`: Equivalent to the [ca_file](/docs/agent/configuration/consul.html#ca_file) config option.
    39  * `-consul-cert-file=<path>`: Equivalent to the [cert_file](/docs/agent/configuration/consul.html#cert_file) config option.
    40  * `-consul-checks-use-advertise`: Equivalent to the [checks_use_advertise](/docs/agent/configuration/consul.html#checks_use_advertise) config option.
    41  * `-consul-client-auto-join`: Equivalent to the [client_auto_join](/docs/agent/configuration/consul.html#client_auto_join) config option.
    42  * `-consul-client-service-name=<name>`: Equivalent to the [client_service_name](/docs/agent/configuration/consul.html#client_service_name) config option.
    43  * `-consul-client-http-check-name=<name>`: Equivalent to the [client_http_check_name](/docs/agent/configuration/consul.html#client_http_check_name) config option.
    44  * `-consul-key-file=<path>`: Equivalent to the [key_file](/docs/agent/configuration/consul.html#key_file) config option.
    45  * `-consul-server-service-name=<name>`: Equivalent to the [server_service_name](/docs/agent/configuration/consul.html#server_service_name) config option.
    46  * `-consul-server-http-check-name=<name>`: Equivalent to the [server_http_check_name](/docs/agent/configuration/consul.html#server_http_check_name) config option.
    47  * `-consul-server-serf-check-name=<name>`: Equivalent to the [server_serf_check_name](/docs/agent/configuration/consul.html#server_serf_check_name) config option.
    48  * `-consul-server-rpc-check-name=<name>`: Equivalent to the [server_rpc_check_name](/docs/agent/configuration/consul.html#server_rpc_check_name) config option.
    49  * `-consul-server-auto-join`: Equivalent to the [server_auto_join](/docs/agent/configuration/consul.html#server_auto_join) config option.
    50  * `-consul-ssl`: Equivalent to the [ssl](/docs/agent/configuration/consul.html#ssl) config option.
    51  * `-consul-token=<token>`: Equivalent to the [token](/docs/agent/configuration/consul.html#token) config option.
    52  * `-consul-verify-ssl`: Equivalent to the [verify_ssl](/docs/agent/configuration/consul.html#verify_ssl) config option.
    53  * `-data-dir=<path>`: Equivalent to the [data_dir](#data_dir) config option.
    54  * `-dc=<datacenter>`: Equivalent to the [datacenter](#datacenter) config option.
    55  * `-dev`: Start the agent in development mode. This enables a pre-configured
    56    dual-role agent (client + server) which is useful for developing or testing
    57    Nomad. No other configuration is required to start the agent in this mode.
    58  * `-encrypt`: Set the Serf encryption key. See [Agent
    59    Encryption](/docs/agent/encryption.html) for more details.
    60  * `-join=<address>`: Address of another agent to join upon starting up. This can
    61    be specified multiple times to specify multiple agents to join.
    62  * `-log-level=<level>`: Equivalent to the [log_level](#log_level) config option.
    63  * `-meta=<key=value>`: Equivalent to the Client [meta](#meta) config option.
    64  * `-network-interface=<interface>`: Equivalent to the Client
    65     [network_interface](#network_interface) config option.
    66  * `-network-speed=<MBits>`: Equivalent to the Client
    67    [network_speed](#network_speed) config option.
    68  * `-node=<name>`: Equivalent to the [name](#name) config option.
    69  * `-node-class=<class>`: Equivalent to the Client [node_class](#node_class)
    70    config option.
    71  * `-region=<region>`: Equivalent to the [region](#region) config option.
    72  * `-rejoin`: Equivalent to the [rejoin_after_leave](#rejoin_after_leave) config option.
    73  * `-retry-interval`: Equivalent to the [retry_interval](#retry_interval) config option.
    74  * `-retry-join`: Similar to `-join` but allows retrying a join if the first attempt fails.
    75  * `-retry-max`: Similar to the [retry_max](#retry_max) config option.
    76  * `-server`: Enable server mode on the local agent.
    77  * `-servers=<host:port>`: Equivalent to the Client [servers](#servers) config
    78    option.
    79  * `-state-dir=<path>`: Equivalent to the Client [state_dir](#state_dir) config
    80    option.
    81  * `-vault-enabled`: Whether to enable or disabled Vault integration.
    82  * `-vault-address=<addr>`: The address to communicate with Vault.
    83  * `-vault-token=<token>`: The Vault token used to derive tokens. Only needs to
    84    be set on Servers. Overrides the Vault token read from the VAULT_TOKEN
    85    environment variable.
    86  * `-vault-create-from-role=<role>`: The role name to create tokens for tasks from.
    87  * `-vault-ca-file=<path>`: Path to a PEM-encoded CA cert file used to verify the
    88    Vault server SSL certificate.
    89  * `-vault-ca-path=<path>`: Path to a directory of PEM-encoded CA cert files used
    90    to verify the Vault server SSL certificate.Whether to enable or disabled Vault
    91    integration.
    92  * `vault-cert-file=<path>`: The path to the certificate for Vault communication.
    93  * `vault-key-file=<path>`: The path to the private key for Vault communication.
    94  * `vault-tls-skip-verify`: A boolean that determines whether to skip SSL
    95    certificate verification.
    96  * `vault-tls-server-name=<name>`: Used to set the SNI host when connecting to
    97    Vault over TLS.