Skip to content

Instantly share code, notes, and snippets.

@alces
Created January 30, 2017 22:16
Show Gist options
  • Save alces/0eb868ed4adf638c781cfb7cae32c983 to your computer and use it in GitHub Desktop.
Save alces/0eb868ed4adf638c781cfb7cae32c983 to your computer and use it in GitHub Desktop.
Extract only necessary files from etcd distribution and start one-node cluster
#!/bin/bash
# tested on CentOS 6.8
tar xvzf etcd-v3.1.0-linux-amd64.tar.gz --strip-components 1 --exclude Documentation --exclude '*.md'
myip=$(hostname -I | awk '{print $1}')
nohup ./etcd --data-dir etcd_data --listen-client-urls http://${myip}:2379 --advertise-client-urls http://${myip}:2379 2>&1 > etcd.log &
echo $! > etcd.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment