-
I have one stack (zookeeper) that has a 3 container Zookeeper service.
-
I have a second stack (vms) that has a LoadBalancer in it that is linked to the zookeeper stack and service.
-
I want to change the hostname of the LB Agent container so that other services in the vms stack can find the loadbalancer by host name. So i used the ‘o.rancher.container.hostname_override : container_name’ label with the LB Agent but it seems to be ignored and the LB AGent container still gets a random hostname.
-
Docker-compose is below.
NB I am using the latest rancher version and docker 1.9 on centos 7 hosts
zookeeper:
restart: always
external_links:
- zookeeper/zookeeper:zookeeper
expose:
- 2181:2181/tcp
tty: true
image: rancher/load-balancer-service
stdin_open: true
labels:
io.rancher.container.hostname_override : container_name
metad:
restart: always
links:
- zookeeper
tty: true
image: centos
stdin_open: true
labels:
io.rancher.container.hostname_override : container_name
kafka-conf:
image: containers.cisco.com/gemenysm/kafka-config:2.1.0
volumes_from:
- kafka
net: "container:kafka"
kafka:
image: containers.cisco.com/gemenysm/kafka:2.1.0-x
links:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper"
labels:
io.rancher.sidekicks: kafka-conf
io.rancher.container.network: true
volumes:
- /opt/rancher