arun-gupta / docker-java

Docker for Java Developers
386 stars 230 forks source link

Visualize Swarm nodes in a cluster #55

Open arun-gupta opened 9 years ago

arun-gupta commented 9 years ago

Is there any way to visualize containers in a cluster? Use Docker REST API?

arun-gupta commented 9 years ago

Use Swarm Viz from @chanezon

chscorpio commented 8 years ago

I couldn't find @chanezon 's Swarm Viz. Did you mean https://github.com/bfirsh/swarm-viz ?

The only change I needed from his instructions was to use open http://$(docker-machine ip default):3000 instead of open http://$(boot2docker ip default):3000

arun-gupta commented 8 years ago

@chscorpio might be it, do you wan to send a PR for including this in the workshop?

chanezon commented 8 years ago

Glad that @bfirsh open sourced it: that was the Viz we used in Dockercon 2015 keynote. It's quick and dirty (2 days work) and needs some additional work, but I have tested it with 100 hosts and 12000 containers (just the viz part). Things I wanted to enhance: leverage d3 to avoid nuking the dom everytime. Also adding tooltips with all the container details, that would be fetched on demand. This is an exercise left to the reader:-)

chscorpio commented 8 years ago

@arun-gupta Once I actually opened the browser, the visualization result wasn't very impressive as it only showed the two worker nodes drawn as boxes with no other details provided nor interactions available. Actually, I was more impressed with the underlying code as a sample node.js app that made it clear how to connect to the swarm using the node.js docker lib and how to use web sockets to emit changes to the Swarm cluster directly to the browser when they occur.

Would you like me to update the end of the docker-swarm chapter to refer to https://github.com/bfirsh/swarm-viz but leave the actual steps as an exercise for the reader?

arun-gupta commented 8 years ago

@chscorpio absolutely! I plan to experiment with it myself anyway.

DovAmir commented 8 years ago

You can use this tool to visualize a docker swarm mode cluster https://github.com/DovAmir/docker-swarm-visualizer