Our Web Dashboard to evaluate test results from the common results database(KCIDB). Available at dashboard.kernelci.org.
The new KernelCI Web Dashboard is a web application created to provide access to static checks, build logs, boot logs and test results related for the Linux kernel CI/test ecosystem. All that data will be provided by KCIDB system from the KernelCI Foundation.
What we have as a repository is a monorepo containing the dashboard (the web application) and a backend.
A web app built with React + Typescript, to see more information check the dashboard README.
A Python http server built with Django + DRF, to see more information check the backend README.
Create a .env file in /dashboard (Do not forget to check and set the variables and their values)
cp ./dashboard/.env.example ./dashboard/.env
Create a secret key for Django:
export DJANGO_SECRET_KEY=$(openssl rand -base64 22)
We are not using sessions or anything like that right now, so changing the secret key won't be a big deal.
Add a application_default_credentials.json
file with your ADC in the root of the project.
gcloud auth application-default login
cp ~/.config/gcloud/application_default_credentials.json .
Important: Check the application_default_credentials.json
file permissions with ls -l
to see if docker has access to it.
After setting up your connection with Google Cloud with the following commands:
cloud-sql-proxy kernelci-production:us-central1:postgresql2 &
gcloud auth application-default login
If it doesn't work, check the Configure ADC with your Google Account documentation.
Create a secret file with the database password:
mkdir -p backend/runtime/secrets
echo <password> > backend/runtime/secrets/postgres_password_secret
If you are going to use a database user other than kernelci
, set it to DB_DEFAULT_USER
:
export DB_DEFAULT_USER=<user>
For other optional envs, check the backend README.
Startup the services:
docker compose up --build -d
Docker exposes port 80 (that you don't need to enter in the URL) instead of 5173 and 8000 that is used when running the dashboard project outside of docker.
So you can hit the frontend with http://localhost
and the backend with http://localhost/api
when running locally.
Make sure that docker has the right permissions and has access to the environment variables. One way to do that is to set up a docker permission group.
If you are running the commands for exporting the environment variables and running docker separately, you can run docker with admin privileges and allowing environment variables with:
sudo -E docker compose up --build -d
Or you can also run the env exports and docker compose within the root user by running sudo su
.
Tip: you can create a quick script to set all the necessary envs and start the services. This will also allow docker to see the environment variables correclty.
export [email protected]
export DJANGO_SECRET_KEY=$(openssl rand -base64 22)
export DB_DEFAULT_NAME=kcidb
export DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
docker compose up --build
Last Tip: You can set the env Debug=True in the docker-compose.yml file if you want to get a better understanding of what is happening.
To deploy to prod you need to push a tag in the release/YYYYMMDD.N
format
like: release/20240910.0
See details about our new notifications system.
There is an onboarding guide to help get acquainted with the project.