consul-vault tools have a graphical and command-line interface. I found CLI faster for development. So I’m sharing how to set up and use consul.
Steps
- Set consul and vault path.
export VAULT_ADDR=https://xxxx export CONSUL_HTTP_ADDR=xxxx
- Login to vault
vault login -method=github -path=github
- Install consul-template.
- Run the template.
consul-template -vault-renew-token=false -template "./config.tmpl:/tmp/out.json" -log-level debug
- You can also access consul KV store from CLI. It’s much convenient to GET & PUT info.
consul kv get -detailed database/staging/servers