You find READMEs or api docs in
./.env
Passwords and Tokens set in the environment./config.json
Configuration options for cc-backend./config.json
Optional to overwrite configuration optionsNot yet included in the hands-on setup.
Start by creating a base folder for all of the following steps.
mkdir clustercockpit
cd clustercockpit
git clone https://github.com/ClusterCockpit/cc-backend.git
cd cc-backend
make
cp configs/env-template.txt .env
vim .env
config.json
file included in this tarball into the root directory of cc-backend: cp ../../config.json ./
clustercockpit
cd ..
mkdir var
./cc-backend -migrate-db
git clone https://github.com/ClusterCockpit/cc-metric-store.git
cd cc-metric-store
go get
go build
mkdir -p var/checkpoints
mkdir -p var/archive
vim config.json
metrics
with the following:"clock": { "frequency": 60, "aggregation": null },
"cpi": { "frequency": 60, "aggregation": null },
"cpu_load": { "frequency": 60, "aggregation": null },
"flops_any": { "frequency": 60, "aggregation": null },
"flops_dp": { "frequency": 60, "aggregation": null },
"flops_sp": { "frequency": 60, "aggregation": null },
"ib_bw": { "frequency": 60, "aggregation": null },
"lustre_bw": { "frequency": 60, "aggregation": null },
"mem_bw": { "frequency": 60, "aggregation": null },
"mem_used": { "frequency": 60, "aggregation": null },
"rapl_power": { "frequency": 60, "aggregation": null }
clustercockpit
cd ..
mkdir source-data
cd source-data
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive-dev.tar.xz
tar xJf job-archive-dev.tar.xz
mv ./job-archive ./job-archive-source
rm ./job-archive-dev.tar.xz
mkdir -p cc-metric-store-source/checkpoints
cd cc-metric-store-source/checkpoints
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/cc-metric-store-checkpoints.tar.xz
tar xf cc-metric-store-checkpoints.tar.xz
rm cc-metric-store-checkpoints.tar.xz
source-data
cd ../..
cp ../migrateTimestamps.pl .
./migrateTimestamps.pl
Starting to update start- and stoptimes in job-archive for emmy
Starting to update start- and stoptimes in job-archive for woody
Done for job-archive
Starting to update checkpoint filenames and data starttimes for emmy
Starting to update checkpoint filenames and data starttimes for woody
Done for checkpoints
cluster.json
files from source to migrated folderscp source-data/job-archive-source/emmy/cluster.json cc-backend/var/job-archive/emmy/
cp source-data/job-archive-source/woody/cluster.json cc-backend/var/job-archive/woody/
cd cc-backend
./cc-backend -init-db -add-user demo:admin:demo
<6>[INFO] new user "demo" created (roles: ["admin"], auth-source: 0)
<6>[INFO] Building job table...
<6>[INFO] A total of 3936 jobs have been registered in 1.791 seconds.
clustercockpit
cd ..
$./cc-backend -server -dev
http:localhost:8080
<6>[INFO] HTTP server listening at :8080...
apiuser
apiuser
API
apiuser
Gen. JTW
for apiuser
$./cc-metric-store
http:localhost:8081
, Log:2022/07/15 17:17:42 Loading checkpoints newer than 2022-07-13T17:17:42+02:00
2022/07/15 17:17:45 Checkpoints loaded (5621 files, 319 MB, that took 3.034652s)
2022/07/15 17:17:45 API http endpoint listening on '0.0.0.0:8081'
$ curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlcyI6WyJST0xFX0FETUlOIiwiUk9MRV9BTkFMWVNUIiwiUk9MRV9VU0VSIl19.d-3_3FZTsadPjDEdsWrrQ7nS0edMAR4zjl-eK7rJU3HziNBfI9PDHDIpJVHTNN5E5SlLGLFXctWyKAkwhXL-Dw" -D - "http://localhost:8081/api/query" -d "{ \"cluster\": \"emmy\", \"from\": $(expr $(date +%s) - 60), \"to\": $(date +%s), \"queries\": [{
\"metric\": \"flops_any\",
\"host\": \"e1111\"
}] }"
HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 15 Jul 2022 13:57:22 GMT
Content-Length: 119
{"results":[[JSON-DATA-ARRAY]]}
The -dev
flag enables web interfaces to document and test the apis:
Enter the URL http://localhost:8080/swagger/index.html
in your browser.
Enter your JWT token you generated for the API user by clicking the green Authorize button in the upper right part of the window.
Click the /job/start_job
endpoint and click the Try it out button.
Enter the following json into the request body text area and fill in a recent start timestamp by executing date +%s
.:
{
"jobId": 100000,
"arrayJobId": 0,
"user": "ccdemouser",
"subCluster": "main",
"cluster": "emmy",
"startTime": <date +%s>,
"project": "ccdemoproject",
"resources": [
{"hostname": "e0601"},
{"hostname": "e0823"},
{"hostname": "e0337"},
{"hostname": "e1111"}],
"numNodes": 4,
"numHwthreads": 80,
"walltime": 86400
}
{
"id": 3937
}
ccdemouser
should appear in Users-Tab with one running jobrunning
taghttp://localhost:8080/swagger/index.html
in your browser./job/stop_job/{id}
endpoint and click the Try it out button.start_job
and copy the following into the request body. Replace the timestamp with a recent one:{
"cluster": "emmy",
"jobState": "completed",
"stopTime": <RECENT TS>
}
On success a json document with the job meta data is returned.
Check in ClusterCockpit
ccdemouser
should appear in Users-Tab with one completed jobrunning
tag -> Completed!Check in job-archive
cd ./cc-backend/var/job-archive/emmy/100/000
cd $STARTTIME
meta.json
and data.json
generate_subcluster.pl
that helps to generate the subcluster section for your system.
Usage:$./generate_subcluster.pl
outputs the subcluster section on stdout
Please be aware that
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.