Workspaces in the platform logically group nodes, secrets, and dashboards.
You can configure workspaces in two ways:
- Dynamically: Create, update, or delete workspaces using the command line interface. 👉 Suited for ad-hoc workspace management.
- Statically: Pre-define workspaces declaratively in configuration files. 👉 Suited for GitOps-based infrastructure management.
Manage workspaces dynamically
Section titled “Manage workspaces dynamically”Our platform command-line utility supports managing at runtime.
Define static workspaces
Section titled “Define static workspaces”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: 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:
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.