Skip to content

Latest commit

 

History

History
307 lines (283 loc) · 7.78 KB

README.md

File metadata and controls

307 lines (283 loc) · 7.78 KB

consul-cookbook

Release Build Status Code Coverage

Installs and configures Consul.

Supported Platforms

  • CentOS 5.10, 6.5, 7.0
  • Ubuntu 12.04, 14.04

Attributes

Key Type Description Default
['consul']['version'] String Version to install 0.3.1
['consul']['base_url'] String Base URL for binary downloads https://dl.bintray.com/mitchellh/consul/
['consul']['install_method'] String Method to install consul with when using default recipe: binary or source binary
['consul']['install_dir'] String Directory to install binary to. /usr/local/bin
['consul']['service_mode'] String Mode to run consul as: bootstrap, server, or client
Note: bootstrap mode has been deprecated in favor of bootstrap_expect
server
['consul']['bootstrap_expect'] Integer The number of servers that need to join for the cluster to be considered bootstrapped and start leader election. 1
['consul']['data_dir'] String Location to store consul's data in /var/lib/consul
['consul']['config_dir'] String Location to read service definitions from (directoy will be created) /etc/consul.d
['consul']['servers'] Array Strings Consul servers to join []
['consul']['bind_addr'] String address that should be bound to for internal cluster communications 0.0.0.0
['consul']['datacenter'] String Name of Datacenter dc1
['consul']['domain'] String Domain for service lookup dns queries .consul
['consul']['log_level'] String The level of logging to show after the Consul agent has started. Available: "trace", "debug", "info", "warn", "err" info
['consul']['node_name'] String The name of this node in the cluster hostname of the machine
['consul']['advertise_addr'] String address that we advertise to other nodes in the cluster Value of bind_addr
['consul']['init_style'] String Service init mode for running consul as: init or runit init
['consul']['service_user'] String For runit service: run consul as this user (init uses 'root') consul
['consul']['service_group'] String For runit service: run consul as this group (init uses 'root') consul
['consul']['bind_interface'] String Interface to bind to, such as 'eth1'. Sets bind_addr attribute to the IP of the specified interface if it exists. nil
['consul']['advertise_interface'] String Interface to advertise, such as 'eth1'. Sets advertise_addr attribute to the IP of the specified interface if it exists. nil
['consul']['encrypt'] String Gossip encryption key. Must be set on all nodes. Generate using 'consul keygen' on existing host. nil
['consul']['recursor'] String Address of DNS recursor to use. nil
['consul']['ca_file'] String Path to the CA cert file, for TLS RPC encryption. This cookbook does not place certs for you. nil
['consul']['cert_file'] String Path to the cert file, for TLS RPC encryption. This cookbook does not place certs for you. nil
['consul']['key_file'] String Path to the key file, for TLS RPC encryption. This cookbook does not place certs for you. nil
['consul']['verify_incoming'] Boolean Setting to verify incoming connections/peers, for TLS RPC encryption. nil
['consul']['verify_outgoing'] Boolean Setting to verify outgoing connections/peers, for TLS RPC encryption. nil

Consul UI Attributes

Key Type Description Default
['consul']['client_address'] String Address to bind to 0.0.0.0
['consul']['client_interface'] String Interface to advertise, such as 'eth1'. Sets advertise_addr attribute to the IP of the specified interface if it exists. nil
['consul']['ui_dir'] String Location to download the UI to /var/lib/consul/ui
['consul']['serve_ui'] Boolean Determines whether the consul service also serve's the UI false

Usage

consul::default

This uses the binary installation recipe by default. It also starts consul at boot time.

For a multi-server cluster be sure to set node[:consul][:bootstrap_expect] to the appropriate number.

consul::binary_install

Include consul::binary_install in your node's run_list:

{
  "run_list": [
    "recipe[consul::binary_install]"
  ]
}

consul::source_install

Include consul::source_install in your node's run_list:

{
  "run_list": [
    "recipe[consul::source_install]"
  ]
}

consul::ui

This installs the UI into a specified directory.

Include consul::ui in your node's run_list:

{
  "run_list": [
    "recipe[consul::ui]"
  ]
}

Authors

Created and maintained by John Bellone @johnbellone (jbellone@bloomberg.net) and a growing community of contributors.