Vault is a piece of software for storing secrets. They have an official docker image.
The code here is a fork of the vimc project montagu-vault
. Much of the docs here are incorrect because they refer to the wrong machine. The original docs exist at README.montagu.md
and at the vimc repository.
Get the binary from here: https://www.vaultproject.io/downloads.html
- Go to https://github.com/settings/tokens
- Click "Generate new token"
- Enter a "Token description" (e.g., Ebola2018 vault access)
- Select "user Update all user data"
export VAULT_ADDR='https://ebola2018.dide.ic.ac.uk:8200'
export VAULT_AUTH_GITHUB_TOKEN=<personal access token>
. To generate a personal access token, go to GitHub > Settings > Personal Access Tokens. The new token must have the 'user' scope.vault auth -method=github
Add to your "~/.Renviron" file the lines
VAULT_ADDR=https://ebola2018.dide.ic.ac.uk:8200
VAULT_AUTH_GITHUB_TOKEN=<your token>
VAULTR_AUTH_METHOD=github
# install.packages("drat")
drat:::add("vimc")
install.packages("vaultr")
cl <- vaultr::vault_client()
vault read secret/some/path
set -ex
docker volume create ebola_vault_data
docker volume create ebola_vault_logs
./run.sh
./init/init.sh
./save_keys