How can I use Nomad CLI remotely?

796 views
Skip to first unread message

Paulo Pires

unread,
Nov 28, 2015, 5:42:46 AM11/28/15
to Nomad
My servers expose the HTTP API but I can't find how to query it on my local machine with the nomad CLI tool. Help?

Paulo Pires

unread,
Nov 28, 2015, 5:53:47 AM11/28/15
to Nomad
Looking at the code, I found NOMAD_ADDR environment variable.

$ export NOMAD_ADDR=http://172.17.9.100:4646
$ nomad node-status
ID                                    DC   Name       Class   Drain  Status
66b460a9-e31d-091c-da4a-579d528d926f  dc1  client-02  <none>  false  down
35a6a5bd-520c-7a9b-7a38-ffeb15f7df3f  dc1  client-01  <none>  false  ready

It works!

er...@coms.io

unread,
Dec 25, 2015, 8:22:27 AM12/25/15
to Nomad
Thanks so much! I assumed the client agent would redirect server oriented commands to the server, and when it didn't, concluded it must be by design for some reason.

I'm curious why nomad doesn't send, e.g. #nomad show-servers to a server in the first place? Is the idea that nomad clients shouldn't, by default, have access to this data, etc?

Thanks again for this tidbit!

er...@coms.io

unread,
Dec 25, 2015, 8:23:19 AM12/25/15
to Nomad
oops... meant #nomad server-members, obviously.

Alex Dadgar

unread,
Jan 4, 2016, 2:27:25 PM1/4/16
to Nomad
Hey Eric,

The CLI uses the HTTP endpoints which are being forwarded to the servers.
Reply all
Reply to author
Forward
0 new messages