diff --git a/README.md b/README.md index 5f706f6..b196299 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It includes the following containers: |Slurm Worker|node01|6818| |MariaDB service|mariadb|3306| |InfluxDB serice|influxdb|8086| -|NATS service|nats|4222| +|NATS service|nats|4222, 6222, 8222| |cc-metric-store service|cc-metric-store|8084| |OpenLDAP|openldap|389, 636| @@ -62,23 +62,23 @@ Credentials for the preconfigured demo user are: * User: `demo` * Password: `demo` +Credentials for the preconfigured LDAP user are: +* User: `ldapuser` +* Password: `ldapuser` + You can also login as regular user using any credential in the LDAP user directory at `./data/ldap/users.ldif`. -## Post-Setup adjustment for using `cc-metric-store` +## Preconfigured setup between docker services and ClusterCockpit components -When using `influxdb` as a metric database, one must adjust the following files: -* `cc-backend/var/job-archive/fritz/cluster.json` -* `cc-backend/var/job-archive/alex/cluster.json` +When you are done cloning the cc-backend repo and once you execute `setupDev.sh` file, it will copy a preconfigured `config.json` from `misc/config.json` and replace the `cc-backend/config.json`, which will be used by cc-backend, once you start the server. +The preconfigured config.json attaches to: +#### 1. MariaDB docker service on port 3306 (database: ccbackend) +#### 2. OpenLDAP docker service on port 389 +#### 3. cc-metric-store docker service on port 8084 -In the JSON (cc-backend/config.json), exchange the content of the `metricDataRepository`-Entry (By default configured for `cc-metric-store`) with: -``` -"metricDataRepository": -{ - "kind": "cc-metric-store", - "url": "http://localhost:8082", - "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw" -} -``` +cc-metric-store also has a preconfigured `config.json` in `cc-metric-store/config.json` which attaches to NATS docker service on port 4222 and subscribes to topic 'hpc-nats'. + +Basically, all the ClusterCockpit components and the docker services attach to each other like lego pieces. ## Docker commands to access the services diff --git a/dataGenerationScript.sh b/dataGenerationScript.sh index b049bce..34b7271 100755 --- a/dataGenerationScript.sh +++ b/dataGenerationScript.sh @@ -6,6 +6,11 @@ echo "| Starting file required by docker services in data/ echo "|--------------------------------------------------------------------------------------|" # Download unedited checkpoint files to ./data/cc-metric-store-source/checkpoints +# After this, migrateTimestamp.pl will run from setupDev.sh. This will update the timestamps +# for all the checkpoint files, which then can be read by cc-metric-store. +# cc-metric-store reads only data upto certain time, like 48 hours of data. +# These checkpoint files have timestamp older than 48 hours and needs to be updated with +# migrateTimestamp.pl file, which will be automatically invoked from setupDev.sh. if [ ! -d data/cc-metric-store-source ]; then mkdir -p data/cc-metric-store-source/checkpoints cd data/cc-metric-store-source/checkpoints @@ -17,6 +22,10 @@ else echo "'data/cc-metric-store-source' already exists!" fi +# A simple configuration file for mariadb docker service. +# Required because you can specify only one database per docker service. +# This file mentions the database to be created for cc-backend. +# This file automatically picked by mariadb after the docker service starts. if [ ! -d data/mariadb ]; then mkdir -p data/mariadb cat > data/mariadb/01.databases.sql < data/ldap/add_users.ldif < data/nats/docker-entrypoint.sh <