Skip to content

Instantly share code, notes, and snippets.

@kintoandar
Last active November 15, 2015 20:29
Show Gist options
  • Save kintoandar/3677aba5a14249ac499a to your computer and use it in GitHub Desktop.
Save kintoandar/3677aba5a14249ac499a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
VERSION="0.3.1"
PLATFORM="darwin"
#PLATFORM="linux"
ARCH="amd64"
#ARCH="386"
wget https://releases.hashicorp.com/vault/"$VERSION"/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip -O /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip
unzip -o /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip -d /usr/local/bin/ && rm /tmp/vault_"$VERSION"_"$PLATFORM"_"$ARCH".zip
if [[ ! -d /tmp/vault ]]; then
mkdir /tmp/vault
cp vault.conf /tmp/vault
fi
export VAULT_ADDR=http://127.0.0.1:8200
vault server -config="/tmp/vault/vault.conf" &
backend "file" {
path = "/tmp/vault/backend"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
#tls_cert_file = "/tmp/vault/localhost.pem"
#tls_key_file = "/tmp/vault/localhost.key"
}
disable_mlock = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment