/chef-etcd

etcd Chef cookbook

Primary LanguageRubyApache License 2.0Apache-2.0

chef-etcd Cookbook

A simple cookbook to set up etcd (supports version 2.x).

Requirements

packages

  • ark - chef-etcd installs binary tarballs using ark.

Attributes

TODO: List all cookbook attributes.

e.g.

chef-etcd::default

Key Type Description Default
['etcd']['data_dir'] String Path to the data directory /var/lib/etcd
['etcd']['name'] String Human-readable name for this member node.hostname
['etcd']['snapshot_count'] Integer Number of committed transactions to trigger a snapshot to disk 10000
['etcd']['heartbeat_interval'] Integer Time (in milliseconds) of a heartbeat interval 100
['etcd']['election_timeout'] Integer Time (in milliseconds) for an election to timeout 1000
['etcd']['max_snapshots'] Integer Maximum number of snapshot files to retain (0 is unlimited) 5
['etcd']['max_wals'] Integer Maximum number of wal files to retain (0 is unlimited) 5
['etcd']['peers_port'] String Default port on which etcd will listen for peers 2380
['etcd']['clients_port'] String Default port on which etcd will listen for clients 2379
['etcd']['cors'] String Comma-separated white list of origins for CORS (cross-origin resource sharing) none
['etcd']['listen_peer_urls'] String List of URLs to listen on for peer traffic "http://localhost:2380"
['etcd']['listen_client_urls'] String List of URLs to listen on for client traffic "http://localhost:2379"
['etcd']['advertise_client_urls'] String List of this member's client URLs to advertise to the rest of the cluster "http://localhost:2379"
['etcd']['peer_listen_addresses'] Array List of addresses etcd will listen on for peers (auto-generates ['etcd']['listen_peer_urls'] and ['etcd']['initial_advertise_peer_urls']) []
['etcd']['client_listen_addresses'] Array List of addresses etcd will listen on for peers (auto-generates ['etcd']['listen_client_urls'] and ['etcd']['advertise_client_urls']) []
['etcd']['peer_listen_protocol'] String Protocol for peer communication 'http'
['etcd']['client_listen_protocol'] String Protocol for client communication 'http'
['etcd']['client_listen_main_ip'] Boolean If set, auto-configures ['etcd']['listen_client_urls'] and ['etcd']['advertise_client_urls'] to localhost and node.ipaddress false
['etcd']['peer_listen_main_ip'] Boolean If set, auto-configures ['etcd']['listen_peer_urls'] and ['etcd']['initial_advertise_peer_urls'] to node.ipaddress false

Usage

etcd::default

TODO: Write usage instructions for each cookbook.

Just include etcd in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[chef-etcd]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors:

@ajardan - initial version of the cookbook