hashicorp / learn-nomad-cluster-setup

Companion repo for the HashiCorp tutorial collection on Nomad cluster setup
https://developer.hashicorp.com/nomad/tutorials/cluster-setup
Mozilla Public License 2.0
36 stars 34 forks source link

./post-setup.sh does not work if acl was disabled #17

Open EugenKon opened 1 year ago

EugenKon commented 1 year ago

To reproduce this issues just configure your nomad without acl:

acl {
  enalbeld = false
}

Actual results:

$ ./post-setup.sh

Something went wrong when retrieving the token from the Consul KV store.
Check the nomad.token file or wait a bit and then try running the script again.

NOT deleting token from KV.

Expected results: https://developer.hashicorp.com/nomad/tutorials/cluster-setup/cluster-setup-aws#set-up-access-to-nomad

 ./post-setup.sh
The Nomad user token has been saved locally to nomad.token and deleted from the Consul KV store.

Set the following environment variables to access your Nomad cluster with the user token created during setup:

export NOMAD_ADDR=

The Nomad UI can be accessed at http://x.x.x.x:4646/ui

Because acl was disabled, we do not need token here, but still here should be an output about NOMAD_ADDR.

I found useful, if here you extend output how to check nomad cluster status here, eg. 'run nomad status to check you cluster status.