oslo.cache/tools/setup-etcd-env.sh
Davanum Srinivas e79d1ab159 etcd3 driver for oslo.cache
Support for oslo.cache to use the etcd3 grpc gateway based
HTTP API (/v3alpha) using the python-etd3gw library

Change-Id: I41ed9f6ea72641dc1db5fec45920dc41de5088bf
2017-05-26 10:55:25 -04:00

32 lines
724 B
Bash
Executable File

#!/bin/bash
set -eux
if [ -z "$(which etcd)" ]; then
ETCD_VERSION=3.1.3
case `uname -s` in
Darwin)
OS=darwin
SUFFIX=zip
;;
Linux)
OS=linux
SUFFIX=tar.gz
;;
*)
echo "Unsupported OS"
exit 1
esac
case `uname -m` in
x86_64)
MACHINE=amd64
;;
*)
echo "Unsupported machine"
exit 1
esac
TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
export PATH=$PATH:$TARBALL_NAME
fi
$*