open-nomad/dev/vault
Alex Dadgar c004742860 Add `dev/` for configs for use by Nomad developers
This PR adds a folder `dev/` which can be used to store helpful commands
and configs for use when developing Nomad itself.
2017-08-02 13:20:06 -07:00
..
README.md Add `dev/` for configs for use by Nomad developers 2017-08-02 13:20:06 -07:00
nomad-cluster-role.json Add `dev/` for configs for use by Nomad developers 2017-08-02 13:20:06 -07: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>