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
This directory contains the `dashboard` binary, which acts as a thin shim around the PACTA [`workflow.pacta.dashboard` tooling](https://github.com/RMI-PACTA/workflow.pacta.dashboard), running tasks created via either Azure Container App Jobs (via the `aztask` package) or local Docker (`dockertask`), loading relevant blobs, and writing relevant outputs.
4
+
5
+
## Running locally
6
+
7
+
The `dashboard` binary doesn't need to be run locally in order to test PACTA processing. By default, the backend API server will trigger PACTA dashboard creation runs against a local Docker daemon, testing most of the run-handling code in the process (e.g. file handling, task execution, etc).
8
+
9
+
If you do want to actually run the full `dashboard` image on Azure, you can use:
10
+
11
+
```bash
12
+
# Run the backend, tell it to create tasks as real Azure Container Apps Jobs.
13
+
bazel run //scripts:run_server -- --use_azure_runner
14
+
```
15
+
16
+
### Creating a new docker image to run locally
17
+
18
+
When developing the runner, you have two options:
19
+
20
+
***Test against local Docker** - Run the server **without** the `--use_azure_runner`, which means async tasks will run locally, using `docker run ...`. To test local runner changes, you can build and tag a runner image locally with `bazel run //scripts:build_and_load_dashboard`.
21
+
* After running the script, the updated runner will immediately be available, no need to restart the server.
22
+
* This is the option you'll want to use most of the time.
23
+
***Test against Azure Container Apps Jobs** - Run the server **with** the `--use_azure_runner`, which means async tasks will be run on Azure, created via the Azure API. To test changes here, you can build and tag a runner image locally with `bazel run //scripts:build_and_load_dashboard`, and then push it to Azure with `docker push rmisa.azurecr.io/pactadashboard:latest`
24
+
* You generally won't need to use this option unless you're testing something very specific about the runner's integration with Azure, as the runner code is identical whether run locally or on Azure.
25
+
26
+
### Cleaning up old dashboard containers
27
+
28
+
By default, we don't auto-remove stopped containers (i.e. finished dashboard tasks), to give developers a chance to review the logs (e.g. with `docker logs <sha>`). To clean up all completed runs at once, run:
29
+
30
+
```bash
31
+
docker rm $(docker ps -a -q -f "status=exited" -f "ancestor=rmisa.azurecr.io/pactadashboard:latest")
0 commit comments