Etcd is a distributed key/value store, designed for service discovery and configuration alongside OS containers. For services and tools that don't directly support etcd, etcd-chef provides a way to write out configuration files and reload processes using the standard Chef DSL.
etcd-chef takes most of the same options as chef-solo with a few exceptions.
--interval will only have
an effect on failed runs, as normal runs wait on etcd changes (see below for more
information). Beyond that, use etcd-chef just as you would chef-solo:
$ etcd-chef -c config.rbWithin your Chef recipes, you can use etcd in a similar way as you would
normally use node to access attributes:
template '/etc/...' do
variables secret_key: etcd['myapp']['secret_key']
endetcd-chef automatically waits for a change in etcd and runs a converge cycle.
This means that as soon as the cluster propagates a change, all etcd-chef
daemons will activate. You may wish to set a --splay time if your recipe
code involves non-local or contended resources.
By default an etcd instance on localhost will be used. You can customize this
either via --etcd-host and --etcd-port command line options, or etcd_host
and etcd_port in your configuration file.