open-nomad/dev/vault
Seth Hoenig 953e40c8ed docs: vault integration docs should reference new token_explicit_max_ttl field 2019-12-02 14:22:47 -06:00
..
README.md Use new Vault CLI commands in guides 2018-04-11 12:51:36 -07:00
nomad-cluster-role.json docs: vault integration docs should reference new token_explicit_max_ttl field 2019-12-02 14:22:47 -06:00
nomad-server-policy.hcl Add `dev/` for configs for use by Nomad developers 2017-08-02 13:20:06 -07:00

README.md

This package provides Vault configuration files that can be used to quickly configure a Vault server when testing Nomad and Vault integrations.

To configure a Vault server run the following:

In one shell run the Vault server:

vault server -dev

In another run the following to configure the Vault server and create a token for the Nomad servers (must be in nomad/dev/vault):

export VAULT_ADDR='http://127.0.0.1:8200'
vault policy write nomad-server nomad-server-policy.hcl
vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json
vault token create -policy nomad-server -period 72h -orphan

You can then run Nomad using the generated token. An example would be:

nomad agent -dev -vault-enabled -vault-address=http://127.0.0.1:8200 \
    -vault-create-from-role=nomad-cluster -vault-token=<token>