Skip to content

ckelleyRH/ciboard-server

This branch is 1 commit ahead of, 3 commits behind fedora-ci/ciboard-server:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c2a58c9 · Apr 17, 2024
Jul 30, 2023
Sep 1, 2021
May 4, 2023
Jul 31, 2023
Jan 17, 2023
Jan 13, 2023
Sep 2, 2022
Jan 27, 2023
May 30, 2023
Apr 17, 2024
Mar 25, 2022
May 15, 2023
Oct 5, 2022
May 10, 2023
Jul 24, 2023
Jul 24, 2023
Feb 27, 2024
Oct 5, 2022

Repository files navigation

CI Dashboard Server for CentOS Stream, Fedora, and other builds

Check build

Architecture

The following diagram lays out the high-level architecture of CI Dashboard and its component packages:

Loading
graph TB

umb-listener --> bus[Message bus]:::outside

subgraph kaijs
umb-listener[UMB listener] --> queue[Filesystem queue]
fedmsg-listener[fedmsg listener] --> queue
Loader --> queue
end

Loader --> db[MongoDB]
server["ciboard-server<br>(backend)"]:::focus --> db
ciboard["ciboard<br>(frontend)"] --> server

click ciboard "https://github.com/fedora-ci/ciboard/" "ciboard GitHub repositotry" _blank
click server "https://github.com/fedora-ci/ciboard-server/" "ciboard-server GitHub repositotry" _blank
click kaijs "https://github.com/fedora-ci/kaijs/" "kaijs GitHub repositotry" _blank

classDef focus stroke-width: 4
classDef outside stroke-dasharray: 4

Enviroment setup

Install certificates

yum install https://hdn.corp.redhat.com/rhel8-csb/RPMS/noarch/redhat-internal-cert-install-0.1-28.el7.noarch.rpm

Install globally npmrc and create config file

npm install -g npmrc
echo registry=https://repository.engineering.redhat.com/nexus/repository/registry.npmjs.org/ strict-ssl=false prefix=/home/$(whoami)/.npm-packages > ".npmrcs/osci"
npmrc osci

Note: if using nvm for node, export NODE_TLS_REJECT_UNAUTHORIZED=0 before every start.

Development

To set up server process this steps:

  1. Clone repo

  2. Run npm install

  3. Configure env-devel.sh file:

#!/bin/bash
# development
export SRV_KOJI_BREW_HOST="brewhub.engineering.redhat.com"
export SRV_DISTGIT_RH_BASE_URL="http://pkgs.devel.redhat.com"
export SRV_GREENWAVE_URL="https://greenwave.engineering.redhat.com"
export SRV_WAIVERDB_URL="https://waiverdb.engineering.redhat.com"
  1. Start the server:
DEBUG="osci:*" npm run dev:server

Opensearch integration

Connect the dashbaord to Opensearch by setting the following environment variables (this can be done when the server and client are running if desired):

# ...
export SRV_OPENSEARCH_INDEXES_PREFIX="dev-"
export SRV_OPENSEARCH_CLIENT_NODE="https://admin:<pwd>@opensearch-1.prod.osci.redhat.com:9200"

Sentry integration

CI Dashboard outputs all log messages to the console. In addition to this, it is able to report runtime as well as GraphQL directly to Sentry. To specify the Sentry DSN and environment identifier, use the SENTRY_DSN and SENTRY_ENVIRONMENT environment variables. You can specify these in your env.sh or env-devel.sh file, for example:

# ...
export SENTRY_DSN=https://1cafe2cafe3cafe@example.sentry.io/9999999
export SENTRY_ENVIRONMENT=production

If the DSN is not specified, messages are only logged to the console.

Code style

In this project we follow the Google TypeScript Style Guide.

License

This project is licensed under the LGPLv3 License or later - see the LICENSE file for details

About

Backend part of ci dashboard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 96.5%
  • JavaScript 1.6%
  • Shell 1.1%
  • Dockerfile 0.8%