Closed 0lucasmoura closed 4 years ago
@0lucasmoura yes you can. just create a network and use it in all of your services.
services:
namenode:
...[you configurations]
networks:
- hbase
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == [your node name]
datanode:
...
networks:
- hbase
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname == [your node name]
at the end type:
networks:
hbase:
external: true
Thanks for the answer! I have managed to do it by creating an overlay external network (defined outside the docker-compose.yml) and making the services connect to it!!
I believe that doing it inside the compose like you suggested would give the same results.
I'm trying to deploy a service stack in a swarm cluster, and for some reason unknown reason the datanode can`t connect to the namenode. Since these services are in the same network, they are visible to each other, the problem lies somewhere in how hdfs connects with its nodes.
Following your examples I see that you use traefik to expose the services.
Is this swarm setup not possible without it? How does traefik work in this context?
log: