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0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 0.11.1
- 0.11.0
- 0.10.1
- 0.10.0
- 0.9.1
- 0.9.0
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.1
- 0.4.3
- 0.4.2
- 0.4.1
- 0.3.0
- 0.2.3
- 0.2.0
- 0.1.0
Application cookbook which installs and configures Consul.
cookbook 'consul', '= 0.4.3', :supermarket
knife supermarket install consul
knife supermarket download consul
consul-cookbook
Installs and configures Consul.
Supported Platforms
- CentOS 5.10, 6.5, 7.0
- RHEL 5.10, 6.5, 7.0
- Ubuntu 12.04, 14.04
Attributes
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['consul']['version']</tt></td>
<td>String</td>
<td>Version to install</td>
<td><tt>0.3.0</tt></td>
</tr>
<tr>
<td><tt>['consul']['base_url']</tt></td>
<td>String</td>
<td>Base URL for binary downloads</td>
<td><tt>https://dl.bintray.com/mitchellh/consul/</tt></td>
</tr>
<tr>
<td><tt>['consul']['install_method']</tt></td>
<td>String</td>
<td>Method to install consul with when using default recipe: binary or source</td>
<td><tt>binary</tt></td>
</tr>
<tr>
<td><tt>['consul']['install_dir']</tt></td>
<td>String</td>
<td>Directory to install binary to.</td>
<td><tt>/usr/local/bin</tt></td>
</tr>
<tr>
<td><tt>['consul']['service_mode']</tt></td>
<td>String</td>
<td>Mode to run consul as: bootstrap, cluster, server, or client</td>
<td><tt>bootstrap</tt></td>
</tr>
<tr>
<td><tt>['consul'][bootstrap_expect]</tt></td>
<td>String</td>
<td>When bootstrapping a cluster, the number of server nodes to expect.</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['consul']['data_dir']</tt></td>
<td>String</td>
<td>Location to store consul's data in</td>
<td><tt>/var/lib/consul</tt></td>
</tr>
<tr>
<td><tt>['consul']['config_dir']</tt></td>
<td>String</td>
<td>Location to read service definitions from (directoy will be created)</td>
<td><tt>/etc/consul.d</tt></td>
</tr>
<tr>
<td><tt>['consul']['servers']</tt></td>
<td>Array Strings</td>
<td>Consul servers to join</td>
<td><tt>[]</tt></td>
</tr>
<tr>
<td><tt>['consul']['bind_addr']</tt></td>
<td>String</td>
<td>address that should be bound to for internal cluster communications</td>
<td><tt>0.0.0.0</tt></td>
</tr>
<tr>
<td><tt>['consul']['datacenter']</tt></td>
<td>String</td>
<td>Name of Datacenter</td>
<td><tt>dc1</tt></td>
</tr>
<tr>
<td><tt>['consul']['domain']</tt></td>
<td>String</td>
<td>Domain for service lookup dns queries</td>
<td><tt>.consul</tt></td>
</tr>
<tr>
<td><tt>['consul']['log_level']</tt></td>
<td>String</td>
<td>
The level of logging to show after the Consul agent has started.
Available: "trace", "debug", "info", "warn", "err"
</td>
<td><tt>info</tt></td>
</tr>
<tr>
<td><tt>['consul']['node_name']</tt></td>
<td>String</td>
<td>The name of this node in the cluster</td>
<td>hostname of the machine</td>
</tr>
<tr>
<td><tt>['consul']['advertise_addr']</tt></td>
<td>String</td>
<td>address that we advertise to other nodes in the cluster</td>
<td>Value of <i>bind_addr</i></td>
</tr>
<tr>
<td><tt>['consul']['init_style']</tt></td>
<td>String</td>
<td>Service init mode for running consul as: init or runit</td>
<td><tt>init</tt></td>
</tr>
<tr>
<td><tt>['consul']['service_user']</tt></td>
<td>String</td>
<td>For runit service: run consul as this user (init uses 'root')</td>
<td><tt>consul</tt></td>
</tr>
<tr>
<td><tt>['consul']['service_group']</tt></td>
<td>String</td>
<td>For runit service: run consul as this group (init uses 'root')</td>
<td><tt>consul</tt></td>
</tr>
<tr>
<td><tt>['consul']['bind_interface']</tt></td>
<td>String</td>
<td>
Interface to bind to, such as 'eth1'. Sets bind_addr
attribute to the IP of the specified interface if it exists.
</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['consul']['advertise_interface']</tt></td>
<td>String</td>
<td>
Interface to advertise, such as 'eth1'. Sets advertise_addr
attribute to the IP of the specified interface if it exists.
</td>
<td><tt>nil</tt></td>
</tr>
</table>
Consul UI Attributes
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['consul']['client_address']</tt></td>
<td>String</td>
<td>Address to bind to</td>
<td><tt>0.0.0.0</tt></td>
</tr>
<tr>
<td><tt>['consul']['client_interface']</tt></td>
<td>String</td>
<td>
Interface to advertise, such as 'eth1'. Sets advertise_addr
attribute to the IP of the specified interface if it exists.
</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['consul']['ui_dir']</tt></td>
<td>String</td>
<td>Location to download the UI to</td>
<td><tt>/var/lib/consul/ui</tt></td>
</tr>
<tr>
<td><tt>['consul']['serve_ui']</tt></td>
<td>Boolean</td>
<td>Determines whether the consul service also serve's the UI</td>
<td><tt>false</tt></td>
</tr>
</table>
Usage
consul::default
This uses the binary installation recipe by default. It also starts consul at boot time.
consul::install_binary
Include consul::install_binary
in your node's run_list
:
{ "run_list": [ "recipe[consul::install_binary]" ] }
consul::install_source
Include consul::install_source
in your node's run_list
:
{ "run_list": [ "recipe[consul::install_source]" ] }
consul::ui
This installs the UI into a specified directory.
Include consul::ui
in your node's run_list
:
{ "run_list": [ "recipe[consul::ui]" ] }
LWRP
Adding service without check
consul_service_def 'voice1' do
port 5060
tags ['_sip._udp']
end
Adding service with check
consul_service_def 'voice1' do
port 5060
tags ['_sip._udp']
check(
interval: '10s',
script: 'echo ok'
)
end
Removing service
consul_service_def 'voice1' do
action :delete
end
Authors
Created and maintained by John Bellone @johnbellone (jbellone@bloomberg.net) and a growing community of contributors.
Dependent cookbooks
ark >= 0.0.0 |
golang ~> 1.3.0 |
runit >= 0.0.0 |
yum-repoforge >= 0.0.0 |
Contingent cookbooks
0.4.3
- Fix race condition when installing Consul as a runit service
- Documentation fixes
0.4.2
Bumps default version of Consul to 0.4.0
0.4.1
Bumps default version of Consul to 0.3.1.
Adds support to bind to the IP of a named interface.
- bind_interface, advertise_interface, client_interface attributes
(thanks @romesh-mccullough)
Test/Quality Coverage
- Expands test coverage to the consul::ui
and consul::_service
recipes.
- Passes some more rubocop and foodcritic code quality tests.
- Only test in Travis against rubies of future past.
0.4.0
Adds ChefSpec tests and software lint/metrics.
Breaking Changes
- Renames binary_install recipe to install_binary
- Renames source_install recipe to source_binary
0.3.0
Bumps the release of Consul to 0.3.0.
Adds Service LWRP (thanks @reset!)
0.2.0
Bumps the release of Consul to 0.2.0.
Adds consul::service
recipe.
Adds more tests.
Bug Smashing
- Source installation now works properly.
- Test Kitchen shows all green!
0.1.0
Initial release of Consul cookbook.
Source and binary installation recipes.
Foodcritic Metric
0.4.3 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/0e94b10ee8228fac81bb7e2d/consul/templates/default/sv-consul-log-run.erb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/0e94b10ee8228fac81bb7e2d/consul/templates/default/sv-consul-run.erb:2
0.4.3 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/0e94b10ee8228fac81bb7e2d/consul/templates/default/sv-consul-run.erb:2