From 19d30fd4a7a1801668e615228816b584deed67f6 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 26 Jan 2017 16:46:41 -0800 Subject: [PATCH] contrib: add etcd cluster deploy on systemd docs Fix https://github.com/coreos/etcd/issues/5971 --- contrib/README.md | 1 + contrib/systemd/etcd3-multinode/README.md | 173 ++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 contrib/systemd/etcd3-multinode/README.md diff --git a/contrib/README.md b/contrib/README.md index 0c5f1a049..b8cf4660c 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -5,3 +5,4 @@ Scripts and files which may be useful but aren't part of the core etcd project. * [systemd](systemd) - an example unit file for deploying etcd on systemd-based distributions * [raftexample](raftexample) - an example distributed key-value store using raft * [systemd/etcd2-backup-coreos](systemd/etcd2-backup-coreos) - remote backup and restore procedures for etcd2 clusters on CoreOS Linux +* [systemd/etcd3-multinode](systemd/etcd3-multinode) - multi-node cluster setup with systemd diff --git a/contrib/systemd/etcd3-multinode/README.md b/contrib/systemd/etcd3-multinode/README.md new file mode 100644 index 000000000..cab9ab4d4 --- /dev/null +++ b/contrib/systemd/etcd3-multinode/README.md @@ -0,0 +1,173 @@ +# etcd3 multi-node cluster + +Here's how to deploy etcd cluster with systemd. + +## Set up data directory + +etcd needs data directory on host machine. Configure the data directory accessible to systemd as: + +``` +sudo mkdir -p /var/lib/etcd +sudo chown -R root:$(whoami) /var/lib/etcd +sudo chmod -R a+rw /var/lib/etcd +``` + +## Write systemd service file + +In each machine, write etcd systemd service files: + +``` +cat > /tmp/my-etcd-1.service < /tmp/my-etcd-2.service < /tmp/my-etcd-3.service <