Backend for ClusterCockpit Monitoring Framework. GitHub Mirror
Go to file
2021-12-20 10:49:46 +01:00
.github/workflows Add frontend as submodule; Update README.md 2021-10-26 10:26:39 +02:00
api Slight GraphQL-API changes 2021-12-20 10:48:58 +01:00
auth Bugfixes 2021-12-09 16:26:59 +01:00
config all schemas new 2021-12-17 15:49:22 +01:00
frontend@cc48461a81 Add more views 2021-12-09 16:27:48 +01:00
graph Slight GraphQL-API changes 2021-12-20 10:48:58 +01:00
metricdata use token from cluster.json 2021-12-20 10:49:46 +01:00
schema all schemas new 2021-12-17 15:49:22 +01:00
templates all schemas new 2021-12-17 15:49:22 +01:00
utils Introduce new golang job-archive backend 2021-03-31 07:23:48 +02:00
.env use token from cluster.json 2021-12-20 10:49:46 +01:00
.gitignore Add frontend as submodule; Update README.md 2021-10-26 10:26:39 +02:00
.gitmodules Add frontend as submodule; Update README.md 2021-10-26 10:26:39 +02:00
go.mod update main; make REST API compatible to ClusterCockpit 2021-12-08 10:15:25 +01:00
go.sum update main; make REST API compatible to ClusterCockpit 2021-12-08 10:15:25 +01:00
gqlgen.yml all schemas new 2021-12-17 15:49:22 +01:00
init-db.go all schemas new 2021-12-17 15:49:22 +01:00
LICENSE Initial checkin. 2019-04-29 10:21:48 +02:00
README.md all schemas new 2021-12-17 15:49:22 +01:00
server.go use token from cluster.json 2021-12-20 10:49:46 +01:00

ClusterCockpit with a Golang backend

DOES NOT WORK WITH CURRENT FRONTEND

Build

Run server

# The frontend is a submodule, so use `--recursive`
git clone --recursive git@github.com:ClusterCockpit/cc-jobarchive.git

# Prepare frontend
cd ./cc-jobarchive/frontend
yarn install
yarn build

cd ..
go get
go build

# The job-archive directory must be organised the same way as
# as for the regular ClusterCockpit.
ln -s <your-existing-job-archive> ./var/job-archive

# Create empty job.db (Will be initialized as SQLite3 database)
touch ./var/job.db

# This will first initialize the job.db database by traversing all
# `meta.json` files in the job-archive. After that, a HTTP server on
# the port 8080 will be running. The `--init-db` is only needed the first time.
./cc-jobarchive --init-db

# Show other options:
./cc-jobarchive --help

Configuration

A config file in the JSON format can be provided using --config to override the defaults. Loop at the beginning of server.go for the defaults and consequently the format of the configuration file.

Update GraphQL schema

This project uses gqlgen for the GraphQL API. The schema can be found in ./graph/schema.graphqls. After changing it, you need to run go run github.com/99designs/gqlgen which will update graph/model. In case new resolvers are needed, they will be inserted into graph/schema.resolvers.go, where you will need to implement them.

TODO

  • Documentation
  • Write more TODOs
  • Caching
  • Generate JWTs based on the provided keys