Skip to content

Instantly share code, notes, and snippets.

@v6
Last active August 10, 2018 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v6/6786da3b5b37acde614b88e56c0a6cd9 to your computer and use it in GitHub Desktop.
Save v6/6786da3b5b37acde614b88e56c0a6cd9 to your computer and use it in GitHub Desktop.
// , Set up a virtual environment and run Vault on it. Run these one by one, no idea how they behave as a script

After I installed Vagrant from http://vagrantup.com/downloads.html, I used the following set of commands to make a Vagrant environment for testing Vault:

mkdir -p ~/proj/vaulttest/ ;  cd ~/proj/vaulttest/ ;  vagrant init bento/centos-7.5 ;  vagrant up  &&  vagrant ssh

After this, I checked to make sure I was on vagrant by looking at my command prompt for vagrant, and installed vault in my Vagrant machine:

wget https://releases.hashicorp.com/vault/0.10.1/vault_0.10.4_linux_amd64.zip  &&  ls  &&  sudo yum install -y unzip  &&  unzip vault_0.10.4_linux_amd64.zip  &&  sudo mv vault /usr/local/bin/vault  &&  vault -h

After installing Vault, I ran this: vault -autocomplete-install

Then I could run Vault in the background with the following:

export VAULT_ADDR='http://127.0.0.1:8200'
nohup vault server -dev &
cat nohup.out | egrep '(Token|Key)'
ps -ef | grep vault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment