You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-17Lines changed: 39 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ to static checks, build logs, boot logs and test results related for the Linux k
8
8
CI/test ecosystem. All that data will be provided by [KCIDB](https://docs.kernelci.org/kcidb/)
9
9
system from the [KernelCI Foundation](https://kernelci.org/).
10
10
11
-
# Repository
11
+
##Repository
12
12
What we have as a repository is a monorepo containing the *dashboard* (the web application) and a *backend*.
13
13
14
14
### Dashboard
@@ -18,13 +18,40 @@ A web app built with [React](https://react.dev/) + [Typescript](https://www.type
18
18
A Python http server built with [Django](https://www.djangoproject.com/) + [DRF](https://www.django-rest-framework.org/), to see more information check the backend [README](/backend/README.md).
19
19
20
20
21
-
# Build
21
+
##Build
22
22
23
-
Create a .env file in /dashboard (Do not forget to check and set the variables and their values)
23
+
### Frontend
24
+
25
+
Create a .env file in /dashboard, check and set the variables and their values
24
26
```sh
25
27
cp ./dashboard/.env.example ./dashboard/.env
26
28
```
27
29
30
+
With docker, you can start just the frontend with `docker compose up --build proxy`. It is also possible to run the dashboard outside of it for development purposes.
31
+
32
+
We use `pnpm` to help with the package management. Install the dependencies with
33
+
```sh
34
+
pnpm install
35
+
```
36
+
37
+
Then start the dev server with
38
+
```sh
39
+
pnpm dev
40
+
```
41
+
42
+
If you want to test the production state of the dashboard, use
It is also possible to run the backend outside of docker for development purposes. Simply run the ssh tunnel with the instructions sent to you by the database manager, then export the variables seen in [.env.backend.example](/.env.backend.example).
95
+
76
96
> For other optional envs, check the [backend README](backend/README.md).
Or you can also run the env exports and docker compose within the root user by running `sudo su`.
92
114
93
-
> 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.
115
+
> 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. Example:
> [Note] If you are going to run using only a dump of the database, the DB_DEFAULT_NAME should be `dashboard` and the `DB_DEFAULT_USER` and `DB_DEFAULT_PASSWORD` should be `admin` (for now).
126
+
> [Note] If you are going to run using only the local database, the DB_DEFAULT_NAME should be `dashboard` and the `DB_DEFAULT_USER` and `DB_DEFAULT_PASSWORD` should be `admin` (for now).
105
127
> After you define those values, also set the env var `USE_DASHBOARD_DB` to True, setting the local database as the default one.
106
-
> You can also skip the cloud-proxy on such case.
128
+
> You could also set the DB_DEFAULT variables to point to the local database and leave `USE_DASHBOARD_DB` as False.
107
129
108
130
109
131
## Deploying to production
@@ -117,5 +139,5 @@ See details about our new [notifications](docs/notifications.md) system.
117
139
118
140
## Contributing
119
141
120
-
There is an [onboarding guide](docs/Onboarding.md) to help get acquainted with the project.
142
+
Check out our [CONTRIBUTING.md](/CONTRIBUTING.md), and there is an [onboarding guide](docs/Onboarding.md) to help get acquainted with the project. Contributions are welcome!
Copy file name to clipboardExpand all lines: docs/Onboarding.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,19 +57,20 @@ Definition of Done: The Redis server is running and you do not encounter Redis-r
57
57
58
58
### Task 2: Run the Backend locally
59
59
1. Clone the KernelCI Dashboard repository from the following link: https://github.com/kernelci/dashboard
60
-
2.Read the main README.md file to understand the project structure and how to run the project. Don't forget to communicate if there is something that you don't understand and feel free to send a PR with improvements.
61
-
3.Go to the `backend` directory, see the README.md from the backend and run the project locally (read at least up to "Running the server").
60
+
2.Go to the `backend` directory, see the [README.md](../backend/README.md) from the backend and run the project locally (read at least up to "Running the server").
61
+
3.At this point you should have already read the [main README](../README.md) file for a general context of the project and how to run it too. If there are any mistakes feel free to send a PR with corrections and changes.
62
62
63
63
Definition of Done: You have the KernelCI Dashboard backend running locally.
64
64
65
+
65
66
### Task 3: Get acquainted with the backend
66
67
> Note:
67
68
> Although the example requests use httpie, you can use any other request tool (such as curl, Postman, or Insomnia) to interact with the API.
68
69
69
70
1. Install [httpie](https://github.com/httpie)
70
71
2. Check the folder `backend/requests` and see that there are multiple bash scripts file, those are httpie requests, try to run some of those. (If one of those requests is not working, it is a good opportunity to created a ticket or fix in a PR).
71
-
3. Try to see in the [KernelCI Dashboard](https://dashboard.kernelci.org/) to see if you can view where those calls are being made.
72
-
4.Try to see how the endpoints you can see where the URLs lead to in the `backend/kernelCI_app/urls.py` file.
72
+
3. Try to look in the [KernelCI Dashboard](https://dashboard.kernelci.org/) to see if you can view where those calls are being made.
73
+
4.Check the URL to endpoint relationship in the [backend/kernelCI_app/urls.py](../backend/kernelCI_app/urls.py) file.
73
74
74
75
Definition of Done: You have run some requests to the KernelCI Dashboard API and try to have a high level understanding of at least one endpoint from the dashboard to the database.
75
76
@@ -78,18 +79,20 @@ Definition of Done: You have run some requests to the KernelCI Dashboard API and
78
79
1. Install a Database management software like [DBeaver](https://dbeaver.io/) or [pgAdmin](https://www.pgadmin.org/)
79
80
2. Connect to the KernelCI Database and try to see the tables and the data that is stored there.
80
81
3. Read this docs to understand the database: [Database Knowledge](../backend/docs/database-logic.md)
81
-
4.Try to make some SQL queries to see what you can do, feel free to look at the Backend code.
82
+
4.Make some direct SQL queries to see what you can do, feel free to look at the Backend code.
82
83
5. Move some data from kcidb to the dashboard_db by running the `update_db` command with `poetry run python3 manage.py update_db`. You don't need a lot of data, specially considering that the database is heavy. For now, just a couple of hours should suffice.
83
84
84
-
Definition of Done: Run a SQL query that gets all the tests from a specific Tree. (Feel free to choose any), you can post the query Result in the Github Issue.
85
+
Definition of Done: Run a SQL query that gets all the tests from a specific Tree. (Feel free to choose any), post the query Result in the Github Issue.
86
+
85
87
86
88
### Task 5: Run the Frontend locally
87
-
1. Go to the `dashboard` directory, see the README.md from the frontend and try running the project locally.
88
-
2. Look at the folder `api` and see how the requests are made, copy and search for where those requests are being used and see if you can relate with the production dashboard.
89
+
1. Go to the `dashboard` directory, see the [README.md](../dashboard/README.md) from the frontend and try running the project locally.
90
+
2. Look at the folder `api` and see how the requests are made, search for where those functions are being used (where the requests are made) and see if you can relate with the production dashboard.
89
91
3. Try to mess with the code, change some colors, add some logs, try to understand the code structure, if there is a library that you don't know, read the documentation on that.
90
92
91
93
Definition of Done: You have the KernelCI Dashboard frontend running locally.
0 commit comments