github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/dev/vault/README.md (about) 1 This package provides Vault configuration files that can be used to quickly 2 configure a Vault server when testing Nomad and Vault integrations. 3 4 To configure a Vault server run the following: 5 6 In one shell run the Vault server: 7 8 ```shell 9 vault server -dev 10 ``` 11 12 In another run the following to configure the Vault server and create a token 13 for the Nomad servers (must be in nomad/dev/vault): 14 15 ```shell 16 export VAULT_ADDR='http://127.0.0.1:8200' 17 vault policy write nomad-server nomad-server-policy.hcl 18 vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json 19 vault token create -policy nomad-server -period 72h -orphan 20 ``` 21 22 You can then run Nomad using the generated token. An example would be: 23 24 ``` 25 nomad agent -dev -vault-enabled -vault-address=http://127.0.0.1:8200 \ 26 -vault-create-from-role=nomad-cluster -vault-token=<token> 27 ```