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
$ etcd-chef -c config.rb
Accessing etcd values
Within your Chef recipes, you can use
etcd in a similar way as you would
node to access attributes:
template '/etc/...' do variables secret_key: etcd['myapp']['secret_key'] end
Synchronized with etcd
etcd-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
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
--etcd-port command line options, or
etcd_port in your configuration file.