Introduce cc-metric-store and nats containers

This commit is contained in:
Jan Eitzinger 2021-11-26 13:07:19 +01:00
parent 16ce238ad2
commit 85bd467717
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,17 @@
FROM golang:1.17
RUN apt-get update
RUN apt-get -y install git
RUN git clone https://github.com/ClusterCockpit/cc-metric-store.git /cc-metric-store
RUN cd /cc-metric-store && go build
# Reactivate when latest commit is available
#RUN go get -d -v github.com/ClusterCockpit/cc-metric-store
#RUN go install -v github.com/ClusterCockpit/cc-metric-store@latest
RUN mv /cc-metric-store/cc-metric-store /go/bin
COPY config.json /go/bin
WORKDIR /go/bin
CMD ["./cc-metric-store"]

View File

@ -0,0 +1,31 @@
{
"metrics": {
"load_one": { "frequency": 10, "aggregation": null, "scope": "node" },
"load_five": { "frequency": 10, "aggregation": null, "scope": "node" },
"load_fifteen": { "frequency": 10, "aggregation": null, "scope": "node" },
"proc_run": { "frequency": 10, "aggregation": null, "scope": "node" },
"proc_total": { "frequency": 10, "aggregation": null, "scope": "node" },
"mem_free": { "frequency": 10, "aggregation": null, "scope": "node" },
"mem_used": { "frequency": 10, "aggregation": null, "scope": "node" },
"power": { "frequency": 10, "aggregation": "sum", "scope": "socket" },
"mem_bw": { "frequency": 10, "aggregation": "sum", "scope": "socket" },
"flops_sp": { "frequency": 10, "aggregation": "sum", "scope": "cpu" },
"flops_dp": { "frequency": 10, "aggregation": "sum", "scope": "cpu" },
"flops_any": { "frequency": 10, "aggregation": "sum", "scope": "cpu" },
"clock": { "frequency": 10, "aggregation": "avg", "scope": "cpu" },
"cpi": { "frequency": 10, "aggregation": "avg", "scope": "cpu" }
},
"checkpoints": {
"interval": 21600,
"directory": "./var/checkpoints",
"restore": 43200
},
"archive": {
"interval": 86400,
"directory": "./var/archive"
},
"retention-in-memory": 86400,
"http-api-address": "0.0.0.0:8081",
"nats": "nats://nats.backend:4222",
"jwt-public-key": "kzfYrYy+TzpanWZHJ5qSdMj5uKUWgq74BWhQG6copP0="
}

View File

@ -1,4 +1,11 @@
services:
nats:
container_name: nats
image: nats:alpine
ports:
- "4222:4222"
- "8222:8222"
db:
container_name: cc-db
image: mysql:8.0.22
@ -32,6 +39,13 @@ services:
- ${DATADIR}/influxdb/data:/var/lib/influxdb2
- ${DATADIR}/influxdb/config:/etc/influxdb2
cc-metric-store:
container_name: metric-store
build:
context: ./cc-metric-store
depends_on:
- nats
openldap:
container_name: cc-ldap
image: osixia/openldap:1.5.0