Sorry if this is obvious. I thought it would be but I haven't been able to find the answer yet.
I've got two services in docker, kafka & zookeeper, and one (kafka) needs to know the IP address & port number of the other (zookeeper). The kafka container expects the zookeeper details as environment variables. I figure the zookeeper details are already in consul, so I should be able to feed that into the env vars in the job file. Something like
env {
KAFKA_ZK_HOST = "$consul.service.zookeeper.host"
KAFKA_ZK_PORT = "$consul.service.zookeeper.port"
...
}
Am I totally barking up the wrong tree?
How do I get details about one job/task/allocation into the definition of another job/task?
Thanks!
-Dylan