Skip to content

Instantly share code, notes, and snippets.

@craigwillis85
Created January 5, 2017 11:50
Show Gist options
  • Select an option

  • Save craigwillis85/28c7f7d9110ff8134c63bf58cc9de330 to your computer and use it in GitHub Desktop.

Select an option

Save craigwillis85/28c7f7d9110ff8134c63bf58cc9de330 to your computer and use it in GitHub Desktop.
[Unit]
Description=etcd
Documentation=https://github.com/coreos
[Service]
ExecStart=/usr/bin/etcd --name master1 \
--initial-advertise-peer-urls http://11.76.137.62:2380 \
--listen-peer-urls http://11.76.137.62:2380 \
--listen-client-urls http://11.76.137.62:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://11.76.137.62:2379 \
--initial-cluster-token etcd-cluster-1 \
--initial-cluster master1=http://11.76.137.62:2380,master2=http://11.238.184.218:2380 \ \
--initial-cluster-state new \
--data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=etcd
Documentation=https://github.com/coreos
[Service]
ExecStart=/usr/bin/etcd --name master2 \
--initial-advertise-peer-urls http://11.238.184.218:2380 \
--listen-peer-urls http://11.238.184.218:2380 \
--listen-client-urls http://11.238.184.218:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://11.238.184.218:2379 \
--initial-cluster-token etcd-cluster-1 \
--initial-cluster master1=http://11.76.137.62:2380,master2=http://11.238.184.218:2380 \
--initial-cluster-state new \
--data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment