Skip to content

Commit 3b8ce9f

Browse files
authored
Merge pull request #18 from ExamonHPC/release/v0.3.1
Release/v0.3.1
2 parents c24b546 + d4583a6 commit 3b8ce9f

File tree

16 files changed

+1804
-34
lines changed

16 files changed

+1804
-34
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ If you have a suggestion for the project, we'd love to hear about it. Please inc
4848
### Coding Standards
4949

5050
* Use consistent code formatting
51-
* Write clear commit messages following [Conventional Commits](https://www.conventionalcommits.org/)
51+
* Write clear commit messages following [Conventional Commits](https://www.conventionalcommits.org/) or at least the basic specification as in the [Commit Messages](#commit-messages) section.
5252
* Comment your code where necessary
5353
* Write tests for new features
5454
* Keep the code simple and maintainable
5555

5656
### Commit Messages
5757

58-
We follow a basic specification:
58+
Basic specification example:
5959

6060
```
6161
type(scope): description

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ RUN touch /etc/apt/sources.list
1111
# Debian strech moved to archived
1212
RUN echo "deb https://debian.mirror.garr.it/debian-archive/ stretch main" > /etc/apt/sources.list
1313

14-
# Update repositories
15-
RUN apt-get -y update
1614

1715
# Install dependencies
1816
RUN apt-get update && apt-get install -y \
@@ -25,6 +23,7 @@ RUN apt-get update && apt-get install -y \
2523
&& rm -rf /var/lib/apt/lists/*
2624

2725
# copy app
26+
ADD ./publishers/random_pub ${EXAMON_HOME}/publishers/random_pub
2827
ADD ./lib/examon-common $EXAMON_HOME/lib/examon-common
2928
ADD ./docker/examon/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
3029
ADD ./scripts/examon.conf $EXAMON_HOME/scripts/examon.conf
@@ -38,6 +37,9 @@ WORKDIR $EXAMON_HOME/lib/examon-common
3837
RUN $PIP install .
3938
RUN pip install .
4039

40+
WORKDIR $EXAMON_HOME/publishers/random_pub
41+
RUN $PIP install -r requirements.txt
42+
4143
WORKDIR $EXAMON_HOME/web
4244
RUN virtualenv flask
4345
RUN flask/bin/pip --trusted-host pypi.python.org install --upgrade pip==20.1.1

README.md

Lines changed: 159 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Examon HPC Monitoring
1+
<p align="center">
2+
<img src="https://github.com/fbeneventi/panels/raw/main/logo3_trasp.png" alt="ExaMon" width="40%">
3+
</p>
4+
5+
6+
# ExaMon HPC Monitoring
27

38
[![Build Status](https://github.com/ExamonHPC/examon/actions/workflows/installation-test.yml/badge.svg?branch=develop)](https://github.com/ExamonHPC/examon/actions/workflows/installation-test.yml)
49

510
A highly scalable framework for the performance and energy monitoring of HPC servers
611

12+
📖 [Documentation](https://examonhpc.github.io/examon/)
13+
14+
715
## Setup
816

917
This setup will install all server-side components of the ExaMon framework:
@@ -12,6 +20,14 @@ This setup will install all server-side components of the ExaMon framework:
1220
- Grafana
1321
- KairosDB
1422
- Cassandra
23+
- Example plugins
24+
25+
This Examon installation includes the following plugins:
26+
27+
- `random_pub`
28+
29+
Please note: the random_pub plugin is used to test the system and it will publish random metrics.
30+
It can be disabled as described in the [Enable/disable plugins](#enabledisable-the-plugins) section.
1531

1632
## Prerequisites
1733
Since Cassandra is the component that requires the majority of resources, you can find more details about the suggested hardware configuration of the system that will host the services here:
@@ -42,37 +58,170 @@ docker compose up -d
4258

4359
This will build the Docker images and fetch some prebuilt images and then start the services. You can refer to the `docker-compose.yml` file to see the full configuration.
4460

61+
## Configuration
62+
4563
### Configure Grafana
4664

4765
Log in to the Grafana server using your browser and the default credentials:
4866

67+
**NOTE:** This installation sets the default password to `GF_SECURITY_ADMIN_PASSWORD` in the `docker-compose.yml` file.
68+
4969
http://localhost:3000
5070

5171
Follow the normal procedure for adding a new data source:
5272

5373
[Add a Datasource](https://grafana.com/docs/grafana/latest/datasources/add-a-data-source/)
5474

75+
From the Grafana UI, add a new data source and select `KairosDB`.
76+
5577
Fill out the form with the following settings:
5678

57-
- Type: `KairosDB`
5879
- Name: `kairosdb`
5980
- Url: http://kairosdb:8083
6081
- Access: `Server`
6182

62-
## Usage Examples
83+
To import the dashboards stored in the `dashboards/` folder:
84+
85+
[Import dashboard](https://grafana.com/docs/grafana/latest/dashboards/export-import/#import-dashboard)
86+
87+
To test the installation, you can import the `Examon Test - Random Sensor.json` dashboard.
88+
89+
90+
### Configure the plugins
91+
92+
Installing the ExaMon plugins requires the configuration of each individual component.
93+
94+
It is necessary to define all the properties of the `.conf` configuration file of the plugins
95+
with the appropriate values related to the server hosting the framework. In particular, it is necessary
96+
to define the IP addresses and ports of the server where the KairosDB and/or MQTT broker services run,
97+
as well as their credentials.
98+
The configuration files to be edited are located in the respective plugin folders contained in the
99+
following folders:
100+
101+
| Plugin | Path |
102+
|-----------------|-----------------------------|
103+
| random_pub | `/publishers/random_pub` |
104+
105+
Please refer to the respective plugin readme file (*Configuration* section) for further details.
106+
107+
108+
### Manage the plugins
109+
110+
The plugins are managed by supervisord, which is the microservices manager for the examon container.
111+
112+
The majority of the commands follow the supervisorctl syntax:
113+
114+
```bash
115+
supervisorctl <command> <plugin-name>
116+
```
117+
118+
The most used commands are:
119+
120+
- `start`
121+
- `stop`
122+
- `restart`
123+
- `status`
124+
- `tail`
125+
126+
to see the full list of commands, you can use the following command:
127+
128+
```bash
129+
docker exec -it <examon-container-name> supervisorctl help
130+
```
131+
132+
To start the plugins, you need to run the following command:
133+
134+
```bash
135+
docker exec -it <examon-container-name> supervisorctl start <plugin-name>
136+
```
137+
Example:
63138

64-
### Collecting data using the dummy "examon_pub" plugin
65-
Once all Docker services are running (can be started either by `docker-compose up -d` or `docker-compose start`), the MQTT broker is available at `TEST_SERVER` port `1883` where `TEST_SERVER` is the address of the server where the services run.
139+
```bash
140+
docker exec -it examon supervisorctl start plugins:random_pub
141+
```
66142

67-
To test the installation we can use the `examon_pub.py` plugin available in the `publishers/examon_pub` folder of this project.
143+
Or, if you want to start all the plugins, you can use the following command:
68144

69-
It is highly recommended to follow the tutorial described in the Jupyter notebook `README-notebook.ipynb` to understand how an Examon plugin works.
145+
```bash
146+
docker exec -it <examon-container-name> supervisorctl start plugins:*
147+
```
148+
As an alternative, you can open the supervisor shell to manage the plugins and start/stop them individually:
149+
150+
```bash
151+
docker exec -it <examon-container-name> supervisorctl
152+
```
70153

71-
After having installed and configured it on one or more test nodes we can start the data collection running for example:
154+
### Check the logs
155+
156+
To check the logs of the plugins, you can use the following command:
157+
158+
```bash
159+
docker exec -it <examon-container-name> supervisorctl tail [-f] <plugin-name>
160+
```
161+
162+
### Enable/disable the plugins
163+
164+
Some plugins may be disabled by default and need to be started manually each time the examon container is started.
165+
166+
To enable and start the plugins automatically, you need to edit the supervisor configuration file for the examon service.
72167

73168
```bash
74-
[root@testnode00]$ python ./examon_pub.py -b TEST_SERVER -p 1883 -s 1 run
169+
docker exec -it <examon-container-name> bash
170+
171+
vi /etc/supervisor/conf.d/supervisor.conf
75172
```
76-
If everything went well, the data are available both through the Grafana interface and using the `examon-client`.
173+
Then, for each plugin, set the following parameters to true:
77174

175+
```bash
176+
autostart=True
177+
```
178+
Restart the examon container to apply the changes:
179+
180+
```bash
181+
docker restart <examon-container-name>
182+
```
183+
Please note that the supervisor configuration will be lost in case the container is recreated.
184+
To make the settings persistent, you need to edit the supervisor configuration file in `docker/examon/supervisor.conf` and rebuild.
185+
186+
## Examon server configuration
187+
188+
The Examon server must be enabled in the supervisor configuration file and configured to use the Examon REST API.
189+
190+
Please refer to the `README.rst` file in the `web/examon-server` folder for more information.
191+
192+
**NOTE:** The Cassandra related settings must be the same as the ones used in the Slurm publisher in the Cassandra section.
193+
194+
## Data persistence
195+
196+
During the installation, two Docker volumes are created, which are required for data persistence.
197+
198+
```bash
199+
$ docker volume ls
200+
DRIVER VOLUME NAME
201+
local examon_cassandra_volume
202+
local examon_grafana_volume
203+
```
204+
205+
* The `examon_cassandra_volume` is used to store the collected metrics
206+
* The `examon_grafana_volume` is used to store Grafana:
207+
* users account data
208+
* dashboards
209+
210+
To set a custom volume path, you can use the following settings in the `docker-compose.yml` file:
211+
212+
```yaml
213+
volumes:
214+
cassandra_volume:
215+
driver: local
216+
driver_opts:
217+
type: none
218+
device: /path/to/cassandra/volume
219+
o: bind
220+
grafana_volume:
221+
driver: local
222+
driver_opts:
223+
type: none
224+
device: /path/to/grafana/volume
225+
o: bind
226+
```
78227

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.3.1

0 commit comments

Comments
 (0)