Docker Storm provides a easy to use interface in order to view important metrics regarding your current Docker Swarm cluster and the containers which are being run on them. With the ablity to add new ports and create new users it's quick to implement and get up and running on your device. Metric tracking is done using information gathered using cadvisor and node-exporter.
Application usage/documentation
Installation guides
Contributers and other info
Live updating metric tracking in an organized grafana graph
Settings page to change important user/system information in addition to the ability to add new servers/vm's to track
Users page to see all the current users and add new users
Login page with passwords encrypted using bcrypt
Signup page with fields to enter initial setup information
- The host computer running Docker Storm (does not have to be part of the swarm) will need these installed
Prometheus
(https://github.com/prometheus/prometheus)Grafana
(https://github.com/grafana/grafana)- Once installation is complete ensure that
allow_embedding
is enabled see docs for more info on how to enable this - If you want to allow users to view your Grafana charts without having to log in ensure that anonymous which is under
[auth.anonymous]
is enabled see docs for more info on how to enable this - (https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/)
- Once installation is complete ensure that
Before being able to run Docker Storm it is expected that you already have a Docker Swarm running with access to the IP addresses of each worker/manager. If not please follow the steps HERE to create a basic Docker Swarm setup using Multipass
Otherwise if you have a pre-existing swarm running make sure that:
- All Manager/Worker machines have installed
Node-Exporter
(https://github.com/prometheus/node_exporter)cAdvisor
(https://github.com/google/cadvisor)
Clone Repo:
git clone https://github.com/oslabs-beta/Docker-Storm.git
Install Dependencies:
npm install
Please start prometheus using the configuration file provided by Docker Storm:
prometheus --web.enable-lifecycle --config.file=prometheus/prometheus.yml
Create a .env file in the root directory of Docker Storm and enter in a Postgres URI in this format:
POSTGRES_URI = "PostgresURI Here"
All other keys will be asked upon first launch
To start application:
npm run electron
OR
npm start
Docker Swarm Setup (Multipass)
Install multipass (please make sure you have brew installed):
brew install --cask multipass
Create VM's for each worker and manager:
multipass launch docker --name manager1
multipass launch docker --name worker1
multipass launch docker --name worker2
The below steps need to be replicated on all multipass instances
To run commands for your multipass instance prefix each command with
multipass exec <username> –- <command>
Download the latest version of linux prometheus (example below downloads v.1.4.0):
multipass exec <username> –- wget https://github.com/prometheus/node_exporter/releases/download/v1.4.0/node_exporter-1.4.0.linux-amd64.tar.gz
Extract the files:
multipass exec <username> –- tar xvfz node_exporter-1.4.0.linux-amd64.tar.gz
Move the files to /usr/local/bin/:
multipass exec <username> –- sudo mv node_exporter-1.4.0.linux-amd64/node_exporter /usr/local/bin/
Add a node_exporter.service to add a new service:
multipass exec <username> –- sudo vi /etc/systemd/system/node_exporter.service
Insert using vim:
[Unit]
Description=Node Exporter
After=network.target
[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target
Reload the Daemon then start node_exporter:
multipass exec <username> –- sudo systemctl daemon-reload
multipass exec <username> –- sudo systemctl start node_exporter
Ensure service has started without issue:
multipass exec <username> –- sudo systemctl status node_exporter
Setup automatic launch on restart:
multipass exec <username> –- sudo systemctl enable node_exporter
Add/edit the daemon.json:
multipass exec <username> –- sudo vi /etc/docker/daemon.json
Insert in vim:
{
“metrics-addr”: “0.0.0.0:9323”,
“experimental”: true
}
Contributions are always welcome!
See CONTRIBUTING.md
for ways to get started.
Please adhere to this project's code of conduct
in CODE_OF_CONDUCT.md