Hacker News new | past | comments | ask | show | jobs | submit login

some of us use HOSTS to write config

e.g.

    10.0.12.34 mysql_host
This allows some degree of flexbility

1. boot up new instances quickly as long as HOSTS is correct

2. Don't have to hard-code actual mysql server IPs.

3. Make mysql master/slave failover much easier.




I think most folks doing devops end up using things more like zookeeper, consul, etc. instead to perform the above as opposed to hosts.


Remember you may have to deploy third-party processes as well as apps whose code you control. Most existing software uses OS-standard APIs for doing things like resolving hosts, and you can't just point it at a path in zk. That means running a DNS server or configuring /etc/hosts.


tiny/small sites don't require heavy lifters like zookeeper, however they do require some degree of clustering and sometimes migrating.


Regarding number two, you'll just link your containers together with docker. See https://docs.docker.com/userguide/dockerlinks/

It seems that most issues OP have is mostly because misunderstanding or lack of knowledge.


Umm, so, how do you deal with Docker when you have more than one physical machine? It seems half the stuff it does just doesn't work then, and you have to pile on further abstractions anyway, using Docker just as a simple container management system (of which we have working ones already) and container build system (of which there are far better systems available).


What if the mysql server isn't in a docker container or even on the same machine?


Then you should be (ideally) using a service discovery solution or (less ideally) wiring up with environment variables. This is (one reason) why CoreOS uses etcd.


then just use environment variables (ENV keyword in Dockerfile or --env param in docker run command)


The problem with ENV is that you can't change server IP on the fly, you have to restart the web server to apply new ENV




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: