This is the complete recode of the Docker Swarm Visualiser as initially created by https://github.com/ManoMarks/docker-swarm-visualizer. There were several reasons that contributed to creating this recode:
- A more extensible project that uses components and different pages
- For my thesis, Socket.IO had to be built in and other changes such as the support for statistics were needed
- The initial project by ManoMarks was hard to setup, this new recode uses a proxy server created in node that can easily be started and changed.
- Paging system
- Load in the swarm state with its different nodes and the services running on it
- Communicate with the Docker CLI through a Proxy Server
- Socket.IO built in to read data from a kafka-topic (work to be done here)
- Statistics page that can show a threshold, predictions and real-time statistics (work to be done here)
The Frontend application uses a proxy connection to connect to the Docker container where our Swarm Cluster is running. To get this server working follow these steps
- Navigate to the
docker-api
directory - Run
npm install
(oryarn
if yarn is installed) - Run
sudo node index.js
on one of the Leader nodes
You can change the port where the proxy is listening on by setting the
WEB_PORT
environment. Example:sudo WEB_PORT=5000 node index.js
The Frontend application itself is created in React and Redux, so running it in development are a few easy steps:
- Navigate to the
swarm-visualiser
directory - Run
npm install
(oryarn
if yarn is installed) - Run
npm start
and the development page will load together with the Docker Swarm
You can change the configurations such as the location of the swarm in the
swarm-visualiser/src/config
directory.