From 4f274faac58f49c9db1bfaa59184db6c91afbaae Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 1 Oct 2015 02:25:26 +0800 Subject: [PATCH] update --- etcd-arm/etc/default/etcd | 9 +++++++++ etcd-arm/etc/systemd/system/etcd.service | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 etcd-arm/etc/default/etcd create mode 100644 etcd-arm/etc/systemd/system/etcd.service diff --git a/etcd-arm/etc/default/etcd b/etcd-arm/etc/default/etcd new file mode 100644 index 0000000..abcd95b --- /dev/null +++ b/etcd-arm/etc/default/etcd @@ -0,0 +1,9 @@ +ETCD_NAME=pi2 +ETCD_DATA_DIR=/var/lib/etcd +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://192.168.1.229:2380 +ETCD_LISTEN_PEER_URLS=http://192.168.1.229:2380 +ETCD_LISTEN_CLIENT_URLS=http://192.168.1.229:2379,http://127.0.0.1:2379 +ETCD_ADVERTISE_CLIENT_URLS=http://192.168.1.229:2379 +ETCD_INITIAL_CLUSTER_TOKEN=pi-cluster +ETCD_INITIAL_CLUSTER=pi0=http://192.168.1.228:2380,pi1=http://192.168.1.207:2380,pi2=http://192.168.1.229:2380 +ETCD_INITIAL_CLUSTER_STATE=new diff --git a/etcd-arm/etc/systemd/system/etcd.service b/etcd-arm/etc/systemd/system/etcd.service new file mode 100644 index 0000000..0d886e1 --- /dev/null +++ b/etcd-arm/etc/systemd/system/etcd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Etcd Daemon +After=network.target + +[Service] +EnvironmentFile=/etc/default/etcd +ExecStartPre=/usr/bin/mkdir -p $ETCD_DATA_DIR +ExecStart=/usr/local/bin/etcd + +[Install] +WantedBy=multi-user.target