infiniband-radar / infiniband-radar-web

Monitoring and visualization of InfiniBand Fabrics
GNU General Public License v3.0
19 stars 6 forks source link

DB integration #15

Closed wrussian closed 4 years ago

wrussian commented 4 years ago

Hello Carsten, many thanks for your great application. Sorry if I overlooked something, but is there a documentation available on how-to integrate the influxDB and mongoDB to the server as described in your presentation (https://www.spectrumscaleug.org/wp-content/uploads/2019/05/SSSD19DE-Day-2-03-Monitoring-of-InfiniBand-fabrics.pdf, page 23)? Many thanks in advance. Cheers, -Frank

carstenpatzke commented 4 years ago

Hey, when I understand you question right, you want to use an existing InfluxDB or MonogDB? In general the project comes with everything packed together (including the preconfigured databases), you just need to run docker-compose up.

But in the case you really want to use an existing database, you need to modify the docker-compose.yml and remove everything including/below grafana:.

Like this (docker-compose.yml) ``` yaml version: "3" services: gateway: build: ./gateway restart: unless-stopped depends_on: - api - grafana - client expose: - "80" - "443" ports: - "80:80" - "443:443" volumes: - ${GATEWAY_CERTS}:/etc/ssl/gateway:ro logging: driver: json-file options: max-size: "200k" max-file: "5" client: build: context: . dockerfile: Dockerfile-client restart: unless-stopped expose: - "80" logging: driver: json-file options: max-size: "200k" max-file: "5" api: build: context: . dockerfile: Dockerfile-server restart: unless-stopped environment: - NODE_ENV=production volumes: - ./config/:/home/node/config/:ro depends_on: - influxdb - mongodb expose: - "4201" logging: driver: json-file options: max-size: "200k" max-file: "5" ```

Then you need to configure the apiServer.json in such a way that it can reach your existing database server.

Like this (config/apiServer.json) ``` json5 { "server": { "host": "0.0.0.0", "port": 4201 }, "fabrics": [ { "fabricId": "fabric1", "name": "Fabric 1", "image": "" }, { "fabricId": "fabric2", "name": "Fabric 2", "image": "" } ], "authentication": { "server": { "testToken": "localhost", "": "" } }, "influxDb": { "host": "some-influx-host.example.com", // <-- NEW IP OF THE DATABASE "database": "infiniband_radar" }, "mongoDb": { "host": "mongodb://some-mongo-host.example.com:27017/", // <-- NEW IP OF THE DATABASE "database": "infiniband_radar" }, "logLevel": "Debug" } ```
wrussian commented 4 years ago

Hello Carsten, I actually I would run both DBs for infiniband-radar only and use them from scratch. Then it's easiest to go with docker-compose. Many thanks for the clarification and quick rely. Cheers, -Frank

carstenpatzke commented 4 years ago

You are welcome :smiley:. Thanks for your interest in this project, if you have any questions feel free to open a new issue.