hashi-ui icon indicating copy to clipboard operation
hashi-ui copied to clipboard

Option to automatically detect Nomad when connected to a Consul that has Nomad

Open pvandervelde opened this issue 7 years ago • 2 comments

It would make configuration simpler if it was possible for Hashi-UI to detect a Nomad cluster from the Consul cluster it connects to. That way as configuration you only need to tell it what the connection address is for Consul (http://localhost:8500 will do in most cases) and from there it could automatically detect Nomad, thus removing the need to add configuration for the location of Nomad.

pvandervelde avatar Nov 06 '17 08:11 pvandervelde

Hi @pvandervelde

I thought about this setup a few times, my reasoning for making it explicit rather than implicit is because it's simply less code, and prevent me from making an opt-out feature as well, for cases where nomad could be auto-detected but nomad is not desired to be exposed in the UI

That being said, i would welcome a PR to add support for it, or to have a discussion on how it would work with the current configuration setup

jippi avatar Nov 06 '17 08:11 jippi

Those are good points. I hadn't thought that far through. I think the opt-out could be in the form of not enabling nomad (by not setting the --nomad-enable flag) or by overriding from the command line (by explicitly setting the --nomad-address option). But you are correct in that it would make the code more complicated.

pvandervelde avatar Nov 06 '17 08:11 pvandervelde