-
-
Save nikhilgorantla/c162ddca51981a8dc7ffd419058b18ca to your computer and use it in GitHub Desktop.
Consul-Rancher stack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consul-registrator: | |
log_driver: '' | |
labels: | |
io.rancher.sidekicks: consul,consul-data | |
io.rancher.scheduler.global: 'true' | |
io.rancher.container.pull_image: always | |
io.rancher.container.hostname_override: container_name | |
tty: true | |
restart: always | |
command: | |
- consul://localhost:8500 | |
log_opt: {} | |
image: gliderlabs/registrator:v7 | |
links: | |
- consul | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock | |
stdin_open: true | |
net: host | |
consul: | |
ports: | |
- 8300:8300/tcp | |
- 8301:8301/tcp | |
- 8301:8301/udp | |
- 8302:8302/tcp | |
- 8302:8302/udp | |
- 8400:8400/tcp | |
- 8500:8500/tcp | |
- 8600:8600/tcp | |
- 8600:8600/udp | |
log_driver: '' | |
labels: | |
io.rancher.container.pull_image: always | |
io.rancher.scheduler.global: 'true' | |
io.rancher.container.hostname_override: container_name | |
io.rancher.container.dns: true | |
tty: true | |
net: host | |
restart: always | |
command: | |
- agent | |
- -retry-join | |
- server.consul.mydomain.com | |
- -recursor=169.254.169.250 | |
- -client=0.0.0.0 | |
environment: | |
CONSUL_LOCAL_CONFIG: "{\"leave_on_terminate\": true}" | |
CONSUL_BIND_INTERFACE: eth0 | |
volumes_form: | |
- consul-data | |
log_opt: {} | |
image: consul:v0.6.4 | |
stdin_open: true | |
consul-data: | |
image: consul:v0.6.4 | |
labels: | |
io.rancher.container.hostname_override: container_name | |
io.rancher.scheduler.global: 'true' | |
io.rancher.container.start_once: true | |
volumes: | |
- /consul/data | |
entrypoint: /bin/true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registrator-consul: | |
consul: | |
consul-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://objectpartners.com/2016/05/24/configuring-service-discovery-with-consul-in-a-hybrid-container-environment/