Skip to content

Instantly share code, notes, and snippets.

@casualjim
Last active November 6, 2017 21:53
Show Gist options
  • Save casualjim/af48b9b6a0ab71255ca0ef8a186ce320 to your computer and use it in GitHub Desktop.
Save casualjim/af48b9b6a0ab71255ca0ef8a186ce320 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment