workspace-r

Versioneer logo workspace-r

CI & Trivy Image version Dependabot configured License

workspace-r manages workspace buckets, PostgreSQL and Valkey stores, members, volumes, and virtual Kubernetes access through a web UI or HTTP API.

[!NOTE] The main branch uses provider-storage and provider-datalab with API version versioneer.at/v1. The upstream EOEPCA/rm-workspace-api project (now deprecated) maintains the old series, limited to pkg.internal/v1beta2.

Open /workspaces to choose a workspace. The dashboard has service connections and credentials; Management has the resource controls. The running API’s /docs page lists its endpoints and schemas.

Deployment

Install Provider Storage for buckets and Provider Datalab for members, stores, volumes, and virtual clusters. Either provider can run on its own. Configure the gateway, Kubernetes access, and providers as described in Security.

Build the image with the API and UI:

docker build --pull --build-arg VERSION=0.0.0+local -t workspace-r .

Run it with a mounted kubeconfig or Kubernetes ServiceAccount, set UI_MODE=ui, and expose port 8181. Use these environment variables to configure it:

Variable Default Purpose
PREFIX_FOR_NAME Empty Prefix for workspace resource names.
DISABLE_STORAGE false Hide Storage features without deleting resources.
DISABLE_DATALAB false Hide Datalab features without deleting resources.
STORES postgres,valkey Enabled store types. An empty value disables stores; unknown values stop startup.
UI_MODE no Set to ui to serve the web UI.
FRONTEND_URL /ui/management Built UI path or development server URL.
AUTH_MODE gateway Use gateway authentication. Set to no only for local development.
AUTH_AUDIENCE workspace-api Required audience in incoming tokens.
AUTH_DEBUG false Log role summaries for authentication checks.
TOKEN_BROKER_TIMEOUT_SECONDS 10 Timeout for each discovery, JWKS, or token request.

GET /status reports API health and enabled provider features.

Development

Use the Python, Node.js, and uv versions in the Dockerfile. Install Docker and rsync. From the repository root, install the dependencies and Git hooks:

uv sync --locked --extra dev --extra prod
uv run --no-sync pre-commit install

Start the backend against a development cluster. Replace the kubeconfig path below with your own. This example disables gateway authentication and must stay on localhost:

AUTH_MODE=no UI_MODE=ui FRONTEND_URL=http://localhost:9000 \
KUBECONFIG=/path/to/config \
uv run --no-sync uvicorn workspace_api:app --reload --port 8181

Use gateway mode when testing token issuance or profile credentials.

In a second terminal, go to workspace_ui/management. Review package install scripts before running them, then start the UI:

npm ci --ignore-scripts
npm rebuild
npm run dev

Open http://localhost:8181/workspaces. To preview sample data without a backend, stop the backend, run npm run shell+dev, and open http://localhost:8181. The sample UI cannot save changes.

To serve built assets instead of the development server, run workspace_ui/build_dist.sh and start the backend with UI_MODE=ui and no FRONTEND_URL override. Rebuild after UI changes. The build script keeps the previous bundle until the replacement is ready.

Checks

Run make ci-setup to install the tools and frozen dependencies. Local checks and CI use the same targets:

python3 scripts/ci-checks.py --base origin/main
make check-docs
make check-runtime

When the selector prints docs_only=true, run only check-docs. Otherwise, run both targets. An empty or unavailable comparison selects all checks; manual CI runs also run all checks.

check-runtime runs lint and type checks, then backend and frontend tests in Docker. For direct frontend checks, run npm test, npm run lint, and npm run build in workspace_ui/management. Backend units mock Kubernetes; live provider tests need an isolated test cluster.

Security describes the CI and scan policy. Maintainers use the release procedure. See Contributing before submitting a change.

Origins

workspace-r is based on rm-workspace-api, originally developed as part of the EOEPCA project.

The European Space Agency (ESA) supports EOEPCA, which provides a reference architecture for Earth observation platforms.

License

Apache 2.0