|
| 1 | +:title: Isolating etcd |
| 2 | +:description: Configuring the cluster to isolate etcd |
| 3 | + |
| 4 | +.. _isolating-etcd: |
| 5 | + |
| 6 | +Isolating etcd |
| 7 | +============== |
| 8 | + |
| 9 | +.. include:: ../_includes/_isolating-etcd-description.rst |
| 10 | + |
| 11 | +.. note:: |
| 12 | + |
| 13 | + The approach documented here works as of Deis 1.9. Older versions of Deis |
| 14 | + utilize an older version of etcd that did not include the proxy |
| 15 | + functionality. |
| 16 | + |
| 17 | +cloud-config |
| 18 | +------------ |
| 19 | + |
| 20 | +To realize the topology described above, it is necessary, at the time of |
| 21 | +provisioning, to provide different cloud-config for those hosts that will run |
| 22 | +etcd and for those that will only run an etcd proxy. |
| 23 | + |
| 24 | +For the small, fixed number of hosts running full etcd and satisfying the |
| 25 | +"central services" role (as described in the CoreOS documentation), the |
| 26 | +cloud-config provided with Deis is sufficient. |
| 27 | + |
| 28 | +For hosts running only an etcd proxy, satisfying the "worker" role (as described |
| 29 | +in the CoreOS documentation), cloud-config must be tweaked slightly to include |
| 30 | +the ``-proxy on`` flag. For example: |
| 31 | + |
| 32 | +.. code-block:: yaml |
| 33 | +
|
| 34 | + #cloud-config |
| 35 | + --- |
| 36 | + coreos: |
| 37 | + # ... |
| 38 | + - name: etcd.service |
| 39 | + command: start |
| 40 | + content: | |
| 41 | + # ... |
| 42 | + [Service] |
| 43 | + # ... |
| 44 | + ExecStart=/usr/bin/docker run --net=host --rm \ |
| 45 | + # ... |
| 46 | + -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ |
| 47 | + # ... |
| 48 | + --discovery <discovery url here> \ |
| 49 | + -proxy on |
| 50 | + # ... |
| 51 | + # ... |
| 52 | + # ... |
| 53 | + # ... |
| 54 | +
|
| 55 | +Isolating etcd as described here requires subsets of a cluster's hosts to be |
| 56 | +configured differently from one another (including or excluding the |
| 57 | +``-proxy on`` flag). Deis provisioning scripts do not currently account for |
| 58 | +this, so managing separate cloud-config for each subset of nodes in the cluster |
| 59 | +is left as an exercise for the advanced operator. |
0 commit comments