litl / galaxy

Docker Micro-PaaS
MIT License
119 stars 19 forks source link

Replace redis with consul #243

Open jbardin opened 9 years ago

jbardin commented 9 years ago

Use Consul for configuration and service registration.

joeshaw commented 9 years ago

I'm not wild about the /etc/hosts thing, because it eliminates our ability to do things dynamically and introduces cross-service ordering concerns. I'd rather we just punt on the .galaxy DNS thing for now (since everything routes through shuttle currently) and only set up an /etc/hosts entry for the currently running service (for VIRTUAL_HOST_502 (etc) values, which do require a non-load-balanced endpoint).

Everything else :+1: sounds good though.

jbardin commented 9 years ago

The proposed use of /etc/hosts here is specifically just to route to shuttle, nothing more. It could allow containers to use *.galaxy to connect to the local shuttle instance using a hostname, working exactly as he have it now.

We can certainly choose to only use it for VIRTUAL_HOST_502 et al, and keep dnsmasq. I'd just like it in the config only because it could still prove useful at some point, and it's easy to implement since it's a feature directly supported by docker.

joeshaw commented 9 years ago

I think /etc/hosts works great for VIRTUAL_HOST_502, and that's currently our only use of the .galaxy domain. So I don't think that dnsmasq is needed to be kept around for that. Although isn't there a chicken-and-egg problem with routing for shuttle for that? shuttle itself is what uses VIRTUAL_HOST_502 to connect to the real service instance to get its contents, right?

jbardin commented 9 years ago

Now that I've got a better handle on how things work, it looks like galaxy features can map to consul like so