blob: d87473942f59aa23032f118b4db828f4b11317bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
`syz-cluster` is a distributed patch series fuzzing that is relying on syzkaller.
It's deployed at https://ci.syzbot.org.
## Overview
The system is to be deployed on a K8S cluster. The main services are:
* `dashboard`: the web interface, read-only.
* `controller`: manages the state of the system, provides
[API](./pkg/api/client.go) for other components, schedules fuzzing sessions.
* `series-tracker`: polls LKML git archives for the new series.
* `reporter-server`: generates new reports, provides API for actual reporter
implementations.
* `email-reporter`: sends reports over email, handles incoming email commands.
The actual patch processing is orchestrated by Argo Workflows: see [the
template](./pkg/workflow/template.yaml). It relies on the following processing
steps:
* `workflow/triage-step`
* `workflow/build-step`
* `workflow/boot-step`
* `workflow/fuzz-step`
Triage and build steps need the actual kernel checkouts. The base kernel repo is
hosted on a shared network disk and is regularly updated by the scripts in
`kernel-disk`.
The system can be deployed in multiple environments, which is achieved with the
help of Kustomize. Depending on the actual deployment target, different pieces of
configuration are applied:
* `overlays/minikube`: the local dev environment.
* `overlays/gke/staging`: the staging prod environment.
* `overlays/gke/prod`: https://ci.syzbot.org.
`global-config.yaml` is the main configuration file of the system - it
determines the mailing lists to poll, configures resource usage and the actual
reporting.
## Local installation steps
1. Install and start minikube: https://minikube.sigs.k8s.io/docs/start/
```
$ minikube start --cni=cilium
```
`--cni=cilium` enables the use of a more advanced Network plugin that supports
the emulation of network policies.
2. Add a Spanner Add-on: https://minikube.sigs.k8s.io/docs/handbook/addons/cloud-spanner/
```
$ minikube addons enable cloud-spanner
```
3. Build all docker containers (might take a while):
```
$ eval $(minikube docker-env)
$ make build-all
```
4. Deploy the cluster:
```
$ make restart-spanner
$ kubectl create namespace argo
$ make k8s-config-argo | kubectl apply -f -
$ make k8s-config-argo-wait
$ make k8s-config-dev | kubectl apply -f -
$ make migrate-job.yaml | kubectl create -f -
```
5. Pre-fetch the kernel git repository:
```
$ make fetch-kernels-once.yaml | kubectl create -f -
```
Note that actual series processing won't start until the job created in (5)
finishes.
## Developmental tips
1. Install Argo Workflows client: https://github.com/argoproj/argo-workflows/releases
Then you can use the `argo` tool like this:
```
$ argo list
```
2. Forward the dashboard port:
```
$ kubectl port-forward service/web-dashboard-service --address 0.0.0.0 50123:80
```
|