casualjim
11/3/2017 - 4:03 PM

install-etcd-3.2.9.sh

ETCD_VER=v3.2.9

tdnf install -y tar || true

# choose either URL
GOOGLE_URL=https://storage.googleapis.com/etcd
GITHUB_URL=https://github.com/coreos/etcd/releases/download
DOWNLOAD_URL=${GOOGLE_URL}

rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test

curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1

cp /tmp/etcd-download-test/{etcd,etcdctl} /usr/bin

echo 'export ETCDCTL_API=3' > /etc/profile.d/etcd3.sh

etcd --version