daemon

Definition

The daemon command launches the Vars daemon locally. This command is required to interact with Vars. The local daemon handles get/put requests by acting as a broker with the Fugue Conductor‘s Vars service.

Arguments and Flags

Run Vars in daemon-mode. By default, Vars will bind to localhost:4444 and provide an HTTP API for interacting with Vars.

Note: The following are all optional arguments/flags.

Application Options

Command Options Description
-v, --verbose Enable verbose output/logging
--version Show the current version

Help Options

Command Options Description
-h, --help Show the help message

Daemon Options

Command Options Description
-f, --file The file path where the cache should be written. By default, no file is written and the cache exists in memory (:memory:)
-p, --port The port that the vars client-service should bind to (4444)
-r, --region The AWS Region to connect to
-t, --timeout How long the daemon should wait to hear back from the Conductor (10)
-w, --watch The config file or directory of config files for watching keys and firing events. If the file does not exist, one is created.
-i, --instance-id For the AWS instance ID
--headless Run without the vars-conductor
-q, --queuename The queue name for vars to listen on for changes. Default is pmc-[instance-id]
--ctrl-plane The queue name for vars to listen on for changes. Default is ctl-[instance-id]
--data-plane-topic The topic to subscribe to for key changes made in other vars instances (fugue-vars-conductor)
--large-value-bucket The S3 bucket to use for storing large values (over 150kb)
--conductor-data-queue The queue name for the conductor data plane (fugue-vars-conductor)
--conductor-ctrl-queue The queue name for the conductor control plane (fugue-vars-infra-notification)
--conductor-ctrl-topic The queue name for the conductor control plane (fugue-resource-events)
--ddb-table-name The DynamoDB table name to use (fugue-vars-store)

Usage

$ vars [OPTIONS] daemon [daemon-OPTIONS]

Examples

To launch the Vars daemon and specify an AWS region, you can include the --region flag. In this example, which includes the -v, --verbose flag, the logs confirm the specified region and the port (4444, by default) that the web service is using.

$ vars -v daemon --region=us-east-1
{
  "component": "vars",
  "log_level": "info",
  "message": "Using aws region: us-east-1",
  "timestamp": "2016-07-13T18:33:38.798173"
}
{
  "component": "vars",
  "log_level": "info",
  "message": "Starting vars daemon",
  "timestamp": "2016-07-13T18:33:38.985732"
}
{
  "component": "vars",
  "log_level": "warning",
  "message": "Cannot get to instance metadata service. The node ID and queue key will be: external-08-6d-41-be-bc-fe",
  "timestamp": "2016-07-13T18:33:39.992699"
}
{
  "component": "vars",
  "log_level": "info",
  "message": "Starting web service on port 4444",
  "timestamp": "2016-07-13T18:33:41.754954"
}