Skip to content

Catalog & Components

The Catalog is your library of reusable components. Understanding components is key to building effective scenarios.

Accessing the Catalog

From the Dashboard, click Catalog to open the component library.

The Catalog Interface

┌─────────────────────────────────────────────────────────────────────┐
│  Catalog                                                             │
│  [Search...]  [☐ Custom only]         [Import] [+ Add] [Export]     │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐│
│  │ Kafka       │  │ PostgreSQL  │  │ Redis       │  │ MinIO       ││
│  │ Helm        │  │ Helm        │  │ Helm        │  │ Helm        ││
│  │             │  │             │  │             │  │             ││
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘│
│                                                                      │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐│
│  │ Flink       │  │ Elastic     │  │ MongoDB     │  │ My Custom   ││
│  │ Helm        │  │ Helm        │  │ Helm        │  │ Docker      ││
│  │             │  │             │  │             │  │ [Custom]    ││
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘│
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

Catalog Actions

ActionDescription
SearchFilter components by name
Custom onlyToggle to show only your organization's components
ImportImport components from a JSON file
AddCreate a new component
ExportDownload catalog as JSON
Click componentOpen component properties modal

Component Cards

Each component card displays:

  • Name: Component identifier (e.g., "kafka", "my-postgres")
  • Type: Deployment type badge (Helm, Docker, or Compose)
  • Custom badge: Indicates a component from your organization's catalog

Click any card to open the component properties modal for viewing or editing.

Component Types

Helm Components

Most infrastructure components use Helm charts for deployment.

Characteristics:

  • Full Kubernetes deployment with Helm
  • Configurable via values.yaml
  • Supports replicas, resources, persistence
  • Most common for databases and complex services

Examples: PostgreSQL, Kafka, Elasticsearch, Redis, MinIO

Docker Components

Single container deployments for simpler applications.

Characteristics:

  • One container, one image
  • Simple configuration via environment variables
  • Good for custom applications
  • Lighter weight than Helm

Examples: Custom web apps, simple services, utility containers

Exposed Ports Required for Docker

For Docker components, you must configure Exposed Ports in the Settings tab for other components to reach this service. Without exposed ports, no Kubernetes Service is created and the component won't be accessible via its label (e.g., postgres:5432).

This is different from Helm and Compose, which create services automatically.

Docker Compose Components

Multi-container applications using Docker Compose syntax.

Characteristics:

  • Multiple related services in one component
  • Each service becomes a separate Kubernetes Deployment
  • Named volumes are created as PersistentVolumeClaims
  • Useful for complex custom stacks

Examples: Multi-service applications, custom architectures

Component Configuration Tabs

When you open a component, you see a modal with multiple tabs. The available tabs depend on the deployment type.

Tabs by Deployment Type

TabDockerHelmComposeDescription
OverviewName, description, icon (catalog mode only)
DeploymentDeployment-specific configuration
Settings--Environment variables, command, exposed ports
Exposed Ports-Port forwarding configuration
ResourcesCPU, memory, volumes
FilesConfiguration files to mount
UITerminal and web UI tabs
ReadinessStartup validation checks
HelpDocumentation for users

Deployment Tab

The Deployment tab configures how the component is deployed.

Common Fields (All Types)

FieldDescription
Component IDUnique identifier, cannot be changed after creation
Component LabelLabel for template variables (e.g., {{kafka}})
Deployment TypeDocker, Helm, or Compose

Docker Deployment

FieldDescription
Docker ImageImage name and tag (e.g., nginx:latest)

Helm Deployment

FieldDescription
Repository URLHTTP/HTTPS URL or OCI registry (oci://...)
Chart NameName of the chart
VersionChart version (leave empty for latest)
Load ChartButton to verify chart and discover services
Secret NameDocker registry secret for private images
Helm Values (YAML)Custom values to pass to the chart

Template Variables

Use {{label}} syntax in Helm values to reference other components. For example: {{postgresql}} resolves to the PostgreSQL service hostname.

Bitnami Charts

Since November 2024, some Bitnami images are no longer available on Docker Hub. If using alternative images, add:

yaml
global:
  security:
    allowInsecureImages: true

Compose Deployment

FieldDescription
Docker Compose YAMLFull docker-compose syntax

Key points for Compose:

  • Each service becomes a separate Kubernetes Deployment
  • Named volumes are created as PersistentVolumeClaims (1Gi each)
  • Services are named {{componentLabel}}-servicename
  • Only pre-built images are supported (no build contexts)

Settings & Exposed Ports Tabs

These tabs vary by deployment type. See Exposed Ports below for Helm and Compose.

Settings (Docker Only)

For Docker components, configure runtime settings.

Environment Variables

Add key-value pairs that will be passed to the container:

FieldDescription
NameVariable name (e.g., POSTGRES_PASSWORD)
ValueVariable value (e.g., secret123)

Variables can be reordered by dragging.

Container Settings

FieldDescription
CommandOverride container entrypoint
ArgumentsCommand arguments

Exposed Ports (Docker)

Critical for inter-component communication. Add ports that other components need to access.

FieldDescription
NamePort identifier (e.g., "postgres", "http")
PortContainer port number

Interactive Containers

For workbench-style containers where users run commands interactively, use ["sleep", "infinity"] as arguments and don't override the command. This keeps the container running while allowing interactive shell access.

Exposed Ports (Helm/Compose)

Exposed Ports make component services accessible from outside the SnapBench platform. This enables integration with:

  • External SaaS services that need to connect to your lab environment
  • Local software running on the participant's machine (IDE, database clients, etc.)
  • External tools that require direct network access to lab resources

When a port is exposed, SnapBench generates a unique external URL that routes traffic to the component inside the Kubernetes cluster.

FieldDescription
NamePort identifier (e.g., "http", "postgres")
PortContainer port number
PublicExpose externally via edge router (for external access)
Pod SelectorFor Helm/Compose: which pod to target (substring match)
Container SelectorFor multi-container pods: which container

Resources Tab

Configure CPU and memory allocation.

Resource Fields

FieldDescription
CPU (millicores)CPU allocation (1000m = 1 core)
Memory (Mi)Memory in mebibytes

Automatic Calculation

For Helm and Compose components, resources are automatically extracted from YAML configuration:

  • Helm: Parsed from resources.requests.cpu and resources.requests.memory
  • Compose: Parsed from deploy.resources.reservations

When resources are defined in YAML, the fields become read-only and show "(from Helm values)" or "(from Compose)".

Helm Resource Analysis

For Helm charts, click Analyze Chart Resources to:

  • See resource requirements for each workload
  • Identify workloads without resource limits
  • Add resource overrides directly to values YAML

If workloads lack resources, you can:

  • Enable LimitRange: Automatically assign defaults (500m CPU, 512Mi memory)
  • Disable Quota: Allow pods without resource limits (use with caution)

Persistent Volumes (Docker Only)

For Docker components, add persistent storage:

FieldDescription
NameVolume identifier
Size (Gi)Storage size in gibibytes
Mount PathWhere to mount in container

Files Tab

Upload configuration files that will be mounted in containers.

File Configuration

FieldDescription
File path and namePath relative to /sb/ mount point
File ContentText content of the file
Target ContainersWhich containers receive the file (Compose/Helm)

Files are mounted at /sb/{filename}. For example, a file named config.yaml is accessible at /sb/config.yaml.

Target Containers

For Compose and Helm deployments with multiple containers:

  • Select which containers should receive each file
  • Leave all selected to mount in every container

UI Tab

Configure how participants interact with the component.

Terminal Tabs

Provide shell access to containers.

FieldDescription
LabelTab name shown to participants
Working DirectoryInitial directory (e.g., /home)
Pod SelectorFor Helm charts with multiple pods
Container SelectorFor pods with multiple containers

Web Interface Tabs

Provide browser access to services.

FieldDescription
LabelTab name shown to participants
PortService port number
PathURL path (e.g., /)
Service NameKubernetes service name (for Helm)
NamespaceTarget namespace (for multi-namespace deployments)

No Tabs = Hidden Component

If no tabs are configured, participants won't see this component in their interface. This is useful for background services.


Readiness Tab

Configure startup validation to ensure the component is fully ready.

Be Conservative with Readiness Timing

Some applications take a long time to start. For example, Elasticsearch can take 2-3 minutes to fully initialize. If your readiness check is too aggressive, the component will be marked as failed before it has a chance to start.

Recommended approach:

  • Start with generous values (e.g., initialDelaySeconds: 30, periodSeconds: 10)
  • Test and adjust based on actual startup time
  • For heavy applications (Elasticsearch, Flink, large databases), use initialDelaySeconds: 60-120

Check Types

TypeDescription
HTTPCheck if an HTTP endpoint returns success
TCPCheck if a TCP port is listening

Readiness Fields

FieldDescription
Target ServiceService to check (for Helm/Compose)
PortPort to check
PathHTTP path (for HTTP checks)
Initial DelaySeconds to wait before first check
PeriodSeconds between checks
TimeoutSeconds to wait for response

Example Initial Delays

These are indicative values — always test and adjust based on your actual environment:

ComponentExample Initial Delay
Redis, lightweight services5-10s
PostgreSQL, MySQL10-15s
Kafka15-30s
Elasticsearch, Flink, heavy JVM apps60-120s

Help Tab

Write documentation to help users understand the component.

Catalog Mode

In catalog mode, you can edit the help content using Markdown:

markdown
# PostgreSQL

## Overview
PostgreSQL is a powerful, open source database.

## Default Credentials
- User: `postgres`
- Password: `postgres`
- Database: `postgres`

## Connecting
Use psql in the terminal:
\`\`\`bash
psql -U postgres
\`\`\`

Studio Mode

In studio mode (when using a component in a scenario), the help is read-only and renders as formatted documentation.


Creating a Component

Step 1: Click Add

Click the + Add button in the catalog toolbar.

Step 2: Choose an ID

Enter a unique identifier (lowercase, hyphens allowed):

  • Good: my-postgres, kafka-connect, custom-api
  • Bad: My Component, kafka 2

Step 3: Select Deployment Type

TypeWhen to Use
DockerSingle container, simple apps
HelmComplex infrastructure, official charts
ComposeMulti-service custom stacks

Step 4: Configure Each Tab

Work through the tabs to complete configuration:

  1. Deployment: Set image/chart/compose configuration
  2. Settings (Docker): Add environment variables
  3. Exposed Ports (Helm/Compose): Configure port access
  4. Resources: Set CPU and memory
  5. Files: Upload any configuration files
  6. UI: Add terminal and web tabs
  7. Readiness: Configure startup checks
  8. Help: Write user documentation

Step 5: Save

Click Save to add the component to your catalog.

Fine-tuning Components in the Studio

For complex components, a practical workflow is:

  1. Create a basic component in the Catalog with minimal configuration
  2. Add it to a scenario in the Studio
  3. Fine-tune all parameters while testing in a real environment
  4. Save to Catalog using the button in component properties (choose to overwrite or create new)

This approach lets you iterate on component settings with immediate feedback before committing to the catalog.


Managing Components

Editing a Component

Click any component card to open the properties modal, make changes, and save.

Duplicating a Component

  1. Click a component card to open properties
  2. Use the Duplicate action
  3. A copy is created with a new ID
  4. Edit the copy to customize

Deleting a Component

  1. Click a component card to open properties
  2. Use the Delete action
  3. Confirm deletion

Deletion Impact

Deleting a component from the catalog does not affect existing scenarios that use it. Those scenarios keep a copy of the component configuration.

Importing Components

Click Import to upload a JSON file containing component definitions.

Exporting Components

Click Export to download your catalog as JSON for backup or sharing.


Best Practices

Naming Conventions

PatternExampleUse
softwarepostgres, kafkaDefault/standard config
software-variantpostgres-15, kafka-kraftVersion-specific
software-purposepostgres-analyticsPurpose-specific config

Resource Sizing

Start with minimal resources and increase if needed:

Component TypeStart WithIncrease If
Database250m / 512MiComplex queries, large datasets
Message Broker500m / 1GiHigh throughput, many partitions
Search Engine500m / 1GiLarge indices, complex queries
Simple App100m / 128MiCompute-intensive operations

UI Tab Configuration

  • Always provide at least one access method
  • Use descriptive tab names ("Kafka Terminal" vs "Terminal")
  • For web UIs, verify the correct port and path

Troubleshooting

Component Won't Deploy

SymptomLikely CauseSolution
ImagePullBackOffWrong image name/tagVerify image exists
CrashLoopBackOffConfiguration errorCheck logs, verify config
PendingInsufficient resourcesReduce resource requests

Tab Not Working

IssueCheck
Terminal won't connectPod selector matches actual pod labels
Web UI shows errorService name, port, and path are correct
"Container not found"Container name matches pod spec

Component Shows "Failed"

Most Common Cause: Readiness Check Timeout

When a component shows "Failed" status, the most common cause is a readiness check that timed out before the application finished starting.

Symptoms:

  • Component status shows "Failed"
  • Pod logs show the application was still initializing
  • Works when you retry or increase delays

Solutions:

  1. Increase initialDelaySeconds — Give the application more time before first check
  2. Increase the total timeout — More attempts with longer periods
  3. Check resource allocation — Under-resourced components start slower
  4. Verify the health endpoint — Ensure the path and port are correct

Example fix for slow-starting applications:

json
{
  "readinessCheck": {
    "enabled": true,
    "type": "http",
    "httpGet": { "port": 9200, "path": "/_cluster/health" },
    "initialDelaySeconds": 90,
    "periodSeconds": 10,
    "timeoutSeconds": 5
  }
}

Next Steps

Released under the MIT License.