From aeac9f987d1f3f064fc8cc7d4434105c891a7db8 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Wed, 19 Mar 2014 14:23:25 -0700 Subject: [PATCH] doc(etcd): Update etcd docs --- Documentation/cloud-config.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/Documentation/cloud-config.md b/Documentation/cloud-config.md index 7d16dab..5a0b825 100644 --- a/Documentation/cloud-config.md +++ b/Documentation/cloud-config.md @@ -8,20 +8,38 @@ Only a subset of [cloud-config functionality][cloud-config] is implemented. A se ## CoreOS Parameters -### coreos.etcd.discovery_url +### coreos.etcd -The value of `coreos.etcd.discovery_url` will be used to discover the instance's etcd peers using the [etcd discovery protocol][disco-proto]. Usage of the [public discovery service][disco-service] is encouraged. **Note:** this is currently Amazon-only. +The `coreos.etcd.*` options are translated to a partial systemd unit acting as an etcd configuration file. +`coreos-cloudinit` will also replace the strings `$private_ipv4` and `$public_ipv4` with the values generated by CoreOS based on a given provider. + +For example, the following cloud-config document... ``` #cloud-config coreos: - etcd: - discovery_url: https://discovery.etcd.io/827c73219eeb2fa5530027c37bf18877 + etcd: + name: node001 + discovery: https://discovery.etcd.io/3445fa65423d8b04df07f59fb40218f8 + addr: $public_ipv4:4001 + peer-addr: $private_ipv4:7001 ``` -[disco-proto]: https://github.com/coreos/etcd/blob/master/Documentation/discovery-protocol.md -[disco-service]: http://discovery.etcd.io +...will generate a systemd unit drop-in like this: + +``` +[Service] +Environment="ETCD_NAME=node001"" +Environment="ETCD_DISCOVERY=https://discovery.etcd.io/3445fa65423d8b04df07f59fb40218f8" +Environment="ETCD_ADDR=203.0.113.29:4001" +Environment="ETCD_PEER_ADDR=192.0.2.13:7001" +``` + +For more information about the available configuration options, see the [etcd documentation][etcd-config]. +Note that hyphens in the coreos.etcd.* keys are mapped to underscores. + +[etcd-config]: https://github.com/coreos/etcd/blob/master/Documentation/configuration.md ### coreos.units