diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-30 07:52:57 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-30 09:18:37 +0000 |
| commit | ea6dba229f2d0d2b1e28e30d53741d9ff44ab5b6 (patch) | |
| tree | 087b6a4329c5bc833eef50907a635027ddcfcb2e | |
| parent | e16b988300c8bba1bc7ebddbec56e1ad65345362 (diff) | |
dashboard/app: add instructions on running locally
| -rw-r--r-- | dashboard/app/README.md | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/dashboard/app/README.md b/dashboard/app/README.md index c3f525c9b..051473552 100644 --- a/dashboard/app/README.md +++ b/dashboard/app/README.md @@ -24,7 +24,7 @@ do the actual fuzzing, bisection, patch testing, etc. The app can be deployed by `gcloud app deploy ./dashboard/app/app.yaml`. -Next optional flags are available: +The following optional flags are available: 1. "--no-promote" to test the app firs and migrate the traffic to it later. 2. "--verbosity=info" to see what files are going to be deployed. @@ -40,3 +40,46 @@ to run a single test, e.g.: ``` go test -short -v -run=TestEmailReport github.com/google/syzkaller/dashboard/app ``` + +## Local Test Deployment + +It's possible to run the dashboard locally for testing purposes. +However, note that it won't have any data, so you would need to connect `syz-ci` +instances so that they populate database with some bugs. + +First, you need to install Google Cloud SDK (`gcloud` command, and required components, +this is one time step). + +Then, create emulator config (this is one time step): + +``` +gcloud config configurations create emulator +gcloud config set auth/disable_credentials true +gcloud config set project syzkaller +gcloud config set api_endpoint_overrides/spanner http://localhost:9020/ +``` + +Then, start local spanner emulator in one console: + +``` +gcloud emulators spanner start +gcloud spanner instances create syzbot --config=emulator --nodes=1 +gcloud spanner databases create ai --instance=syzbot +``` + +Then, initialize the schema from another console: + +``` +for SQL in dashboard/app//aidb/migrations/*.up.sql; do \ + gcloud spanner databases ddl update ai \ + --instance=syzbot --ddl-file ${SQL}; done +``` + +Finally, start the web server: + +``` +SPANNER_EMULATOR_HOST="localhost:9010" \ + GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=false \ + google-cloud-sdk/bin/dev_appserver.py --application=syzkaller \ + --host=0.0.0.0 --enable_host_checking=false dashboard/app/ +``` |
