Installing the consumer cli
brew instal consul
consul --version //Back Consul v1.0.0 Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
Using the consumer cli
consul Usage: consul [--version] [--help] <command> [<args>] Available commands are: agent Runs a Consul agent catalog Interact with the catalog event Fire a new event exec Executes a command on Consul nodes force-leave Forces a member of the cluster to enter the "left" state info Provides debugging information for operators. join Tell Consul agent to join cluster keygen Generates a new encryption key keyring Manages gossip layer encryption keys kv Interact with the key-value store leave Gracefully leaves the Consul cluster and shuts down lock Execute a command holding a lock maint Controls node or service maintenance mode members Lists the members of a Consul cluster monitor Stream logs from a Consul agent operator Provides cluster-level tools for Consul operators reload Triggers the agent to reload configuration files rtt Estimates network round trip time between nodes snapshot Saves, restores and inspects snapshots of Consul server state validate Validate config files/directories version Prints the Consul version watch Watch for changes in Consul
consul agent -h ==> Usage: consul agent [options] Starts the Consul agent and runs until an interrupt is received. The agent represents a single node in a cluster. Command Options -advertise=<value> Sets the advertise address to use. -advertise-wan=<value> Sets address to advertise on WAN instead of -advertise address. -bind=<value> Sets the bind address for cluster communication. -bootstrap Sets server to bootstrap mode. -bootstrap-expect=<value> Sets server to expect bootstrap mode. -client=<value> Sets the address to bind for client access. This includes RPC, DNS, HTTP and HTTPS (if configured). -config-dir=<value> Path to a directory to read configuration files from. This will read every file ending in '.json' as configuration in this directory in alphabetical order. Can be specified multiple times. -config-file=<value> Path to a JSON file to read configuration from. Can be specified multiple times. ... -ui-dir=<value> Path to directory containing the web UI resources.