Skip to content

Instantly share code, notes, and snippets.

@sgnn7
Last active October 7, 2020 15:44
Show Gist options
  • Save sgnn7/5ba1b30d487e33d33a66 to your computer and use it in GitHub Desktop.
Save sgnn7/5ba1b30d487e33d33a66 to your computer and use it in GitHub Desktop.
(12:59:23 PM) JohnO: sgnn7 connect from where?
(12:59:41 PM) JohnO: I use mesos-dns often times, are you saying from within the app?
(01:01:13 PM) sgnn7: JohnO: yeah from within the app. host has localhost:<port> on HAproxy going to the right place but the question is accessing that from the app itself
(01:01:40 PM) JohnO: Ah, there is a PORTS variable in Marathon to know how to access it on the host itself
(01:01:51 PM) sgnn7: it's bridged networking though
(01:01:53 PM) JohnO: then you can use the $HOST:$PORT variables
(01:01:56 PM) JohnO: ya
(01:02:09 PM) JohnO: so that would allow the container to connect to the ports external port (I think)
(01:02:39 PM) sgnn7: sadly for our service discovery we're trying to avoid putting in env var resolution but I did find that as well
(01:02:40 PM) cheus left the room (quit: Ping timeout: 260 seconds).
(01:03:18 PM) JohnO: Ok, so if you use a service port with haproxy and mesosdns
(01:03:23 PM) JohnO: you can get to host
(01:03:38 PM) m0x90 left the room (quit: Remote host closed the connection).
(01:03:39 PM) JohnO: the other thing is mesos-dns will register the port as SRV or TXT record (see docs)
(01:03:39 PM) Ir1sh left the room (quit: Remote host closed the connection).
(01:03:40 PM) mpark [~mpark@12.161.175.2] entered the room.
(01:03:46 PM) JohnO: so you can query it from your app that way
(01:04:35 PM) dslevin1 left the room.
(01:04:46 PM) sgnn7: hmm... interesting. ok - that might be an option
(01:05:06 PM) sgnn7: JohnO: I guess dockerhost issue never got anywhere
(01:05:12 PM) JohnO: What I have found is that there are MANY options…
(01:05:15 PM) JohnO: dockerhost?
(01:06:02 PM) sgnn7: JohnO: https://github.com/docker/docker/issues/1143
(01:06:06 PM) Yasumoto [~yasumoto@8.25.197.25] entered the room.
(01:06:06 PM) Yasumoto left the room (quit: Changing host).
(01:06:06 PM) Yasumoto [~yasumoto@unaffiliated/yasumoto] entered the room.
(01:06:36 PM) JohnO: I hadn't seen that so I can't comment :)
(01:07:16 PM) sgnn7: We've been trying not to mess with the apps themselves, use bridged mode, we don't use mesos-dns, and we're avoiding the env vars (if possible) so it's a limited set of options we have
(01:07:32 PM) sgnn7: if any outside of $HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment