Skip to content

Configure workspaces

Workspaces in the platform logically group nodes, secrets, and dashboards.

You can configure workspaces in two ways:

  1. Dynamically: Create, update, or delete workspaces using the command line interface. 👉 Suited for ad-hoc workspace management.
  2. Statically: Pre-define workspaces declaratively in configuration files. 👉 Suited for GitOps-based infrastructure management.

Our platform command-line utility supports managing at runtime.

You pre-define static workspaces declaratively in configuration files. This “as-code” approach differs from the dynamic management approach, which you manage with the command line interface.

Here’s a minimal example of a static workspace configuration:

workspaces.yaml
workspaces:
static0: # Unique workspace identifier
name: Tenzir # Display name in the UI
category: Statically Configured Workspaces # Grouping category in the UI
icon-url: https://storage.googleapis.com/tenzir-public-data/icons/tenzir-logo-square.svg
auth-rules:
- {"auth_fn": "auth_allow_all"} # Authentication rule (this allows everyone)

The auth-rules section defines who can access the workspace. The example above uses auth_allow_all. This rule grants access to everyone.

The platform service in a Tenzir Platform deployment uses the WORKSPACE_CONFIG_FILE environment variable to locate its static workspace configuration file:

docker-compose.yaml
services:
platform:
environment:
# Other environment variables...
- WORKSPACE_CONFIG_FILE=/etc/tenzir/workspaces.yaml
volumes:
# Mount your config file.
- ./workspaces.yaml:/etc/tenzir/workspaces.yaml

This example mounts a local workspaces.yaml file into the container. The platform service then accesses it at the location that WORKSPACE_CONFIG_FILE specifies.