build centos:6 images containing: consul-base, consul-server, consul-bootstrap + consul-agent
10K+
Quick POC demo stack containing:
git clone [email protected]:rednut/consul-service-discovery.git consul-service-discovery
cd consul-service-discovery
Then:
# make local demo stack
make
This will:
-bootstrap, -server and -agent roles-bootstrap, -server and -agent rolesmake cleanmake clean stackmake membersmake demomake teamake coffeeYes, dont use in production :-)
Think: multi docker host hosting
You can run any of the role based images independently (see config + envieronment vars + consul dns stack local name)
extent the -agent image, for example:
FROM consul-agent
RUN yum install nginx
ADD htdocs /htdocs
ADD <CONSUL_CONFIG_FOR_NGINX>
RUN echo -e "\n[progam:nginx]\nblar=nnnnnnn\n\n" >> /etc/supervisord.conf
or
FROM consul-agent
RUN yum install redis
ADD <CONSUL_CONFIG_FOR_REDIS>
RUN echo -e "\n[progam:redis]\nblar=nnnnnnn\n\n" >> /etc/supervisord.conf
then lauch with the --link=container:alias option so the container being linked to is aliased to consul so the
agent can auto discover via dns search domain a local consul. host server cluster member..
Content type
Image
Digest
Size
101.1 MB
Last updated
over 10 years ago
docker pull rednut/consul-service-discovery