open-nomad/dev/vault
hashicorp-copywrite[bot] 005636afa0 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
..
README.md
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 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00: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>