darklight
v2.1.1
Published
Docker discovery and services for swarm
Downloads
1
Readme
Discovery tool for data center distributed containers
How does it work
Darklight uses NATS library for sharing docker engine info.
Installing one darklight node per docker host, you either get all the info about all the containers and hosts on the network, or can control any specific docker instance through an RPC like mechanism.
You can embed a darklight node into your application and use it to get that info.
See local.js for full understanding.
Build & run
Build darklight image
docker build --force-rm -t ignitial/darklight .
Run docker unit
tools/scontainer.sh <name>
Run natsio
docker run -d -p 4222:4222 -p 6222:6222 -p 8222:8222 --name nats nats
Utils
Remove current containers (force)
docker rm -f $(docker ps -a -q)
docker rmi $(docker images -f "dangling=true" -q)
Run darklight docker container
docker run -v /var/run/docker.sock:/var/run/docker.sock -e DATASYNC_NATS_SERVERS="[ \"nats://nats:4222\" ]" -e DEBUG="darknode,vikings:*" -e CONTAINER_HOST=192.168.1.105 --link nats:nats --name dl1 ignitial/darklight
Stop container
docker exec dl1 pkill -TERM node