Nomad Overlay Network Manager is a lightweight service designed to enable seamless cross-host communication for Docker containers running on Nomad. It resolves a key limitation in Nomad, where containers across different hosts cannot communicate directly. By leveraging Docker Swarm's attachable overlay network and Consul's DNS-based service discovery, this tool ensures automatic container registration and deregistration.
my-attachable-overlay network if they have NOMAD_KG_OVERLAY_NETWORK=true set as an environment variable.Before using this tool, ensure you have the following:
my-attachable-overlayCreate a docker-compose.yml file (example provided below):
version: '3'
services:
manager:
image: kunalghoshone/nomad-overlay-network:latest
volumes:
- ./containers:/containers
- /var/run/docker.sock:/var/run/docker.sock
environment:
- CONSUL_HTTP_ADDR=192.168.62.101:8500
- CONSUL_URL=http://192.168.62.101:8500/
- ENV_KEY_TO_CHECK=NOMAD_KG_OVERLAY_NETWORK
- IS_CONTROLLER=false
- OVERLAY_DOCKER_SWARM_NETWORK_NAME=my-attachable-overlay
You can also run the manager directly using Docker:
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-e CONSUL_HTTP_ADDR=192.168.62.101:8500 \
-e CONSUL_URL=http://192.168.62.101:8500/ \
-e ENV_KEY_TO_CHECK=NOMAD_KG_OVERLAY_NETWORK \
-e IS_CONTROLLER=false \
-e OVERLAY_DOCKER_SWARM_NETWORK_NAME=my-attachable-overlay \
kunalghoshone/nomad-overlay-network:latest
docker.sock.NOMAD_KG_OVERLAY_NETWORK=true set.my-attachable-overlay network.CONSUL_HTTP_ADDR.my-attachable-overlay exists and is attachable (docker network ls).This project is open-source and available under the MIT License.
Contributions are welcome! Feel free to submit issues or pull requests.
For any questions or support, reach out via GitHub issues or the development community.
@github link https://github.com/kunalGhoshOne/Nomad-Overlay-Network
Content type
Image
Digest
sha256:f9319a17c…
Size
446.9 MB
Last updated
over 1 year ago
docker pull kunalghoshone/nomad-overlay-network