-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more documentation about how nomad and consul works together #169
Comments
|
I suspect they do not work together yet, but it would be awesome to not to use registartor for that. |
This integration is in the works and should be functional soon! We will definitely include detailed documentation on the specifics. |
+1 |
2 similar comments
👍 |
+1 |
👍 Definitely interested in this. |
👍 |
5 similar comments
👍 |
+1 |
👍 |
+1 |
+1 |
I'm very much looking forward to having this. |
Here you guys go: https://www.nomadproject.io/docs/jobspec/servicediscovery.html |
@dadgar Are there still any plans to let nomad manage consul? |
@F21: Not in the sense that we will have the Nomad client download or even launch Consul during startup. Instead we will be advocating the usage of a System job that schedules Consul on every node. We will hopefully be able to write a tutorial on this in the near future. |
@dadgar In the case of running consul as a system job, would consul be in a docker container (with host networking) or would consul be run using exec? |
I think the docs are clear @F21: it's up to the operator to make that all work - and depending on the details in your setup, either could work. |
@F21: Yeah it will depend on your use case. If you are doing script based health checks then possibly with a |
I have created small playground, |
+1 |
The documentation explaining how Nomad and Consul work together still sucks. Specifically, how you get a nomad service to be found by a different service that depends on it (and get the address and port number that nomad allocated, etc) These pages need to be improved to explain this, and include examples: |
@borice if you already know, I'm sure we would all appreciate a PR from you improving the docs :) |
@c4milo i don't already know... i was trying to learn, but hit a dead end. |
For completeness, I'm trying to understand the following: I have a nomad service running a mongodb docker container on a random port assigned by nomad. How do I tell the app in its "service" stanza about the mongodb service? (host and port) |
@borice try what's documented in https://github.com/hashicorp/consul-template#service, since Nomad's template language follows closely consul-template's. |
@borice you have few choices:
but options 3. and 4. are not optimal - whenever your DB gonna be restarted - a different port gonna be chosen If you still prefer to have random ports in nomad's workers, option 1.would be the best:
|
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
There are some bits here and there in the docs talking about how consul can be used for service discovery, however it's unclear how it all fits together.
There should be more information regarding this, and perhaps an example cluster where nomad and consul is set up in tandem.
The text was updated successfully, but these errors were encountered: