feat(etcd): Write etcd systemd snippet
This commit is contained in:
@@ -74,12 +74,38 @@ Provide a list of objects with the following attributes:
|
||||
|
||||
## Custom cloud-config 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.
|
||||
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.
|
||||
|
||||
[disco-proto]: https://github.com/coreos/etcd/blob/master/Documentation/discovery-protocol.md
|
||||
[disco-service]: http://discovery.etcd.io
|
||||
For example, the following cloud-config document...
|
||||
|
||||
```
|
||||
#cloud-config
|
||||
|
||||
coreos:
|
||||
etcd:
|
||||
name: node001
|
||||
discovery-url: https://discovery.etcd.io/3445fa65423d8b04df07f59fb40218f8
|
||||
bind-addr: $public_ipv4:4001
|
||||
peer-bind-addr: $private_ipv4:7001
|
||||
```
|
||||
|
||||
...will generate a systemd snippet like this:
|
||||
|
||||
```
|
||||
[Service]
|
||||
Environment="ETCD_NAME=node001""
|
||||
Environment="ETCD_DISCOVERY_URL=https://discovery.etcd.io/3445fa65423d8b04df07f59fb40218f8"
|
||||
Environment="ETCD_BIND_ADDR=203.0.113.29:4001"
|
||||
Environment="ETCD_PEER_BIND_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
|
||||
|
||||
|
Reference in New Issue
Block a user