Adding Tools to Your Workstation

In the previous tutorial you created a bare Ubuntu workstation. Now you'll customize it by installing development tools using a WorkstationConfig.

What You'll Build

A configuration that installs Git, curl, jq, and Docker into your workstation - applied automatically via label matching.

Prerequisites

Workstation vs WorkstationConfig

In werkr, a Workstation defines where your VM runs (provider, OS, resources). A WorkstationConfig defines what's installed inside it (packages, tools, files, scripts).

They're connected through labels. Your workstation has labels (like team: tutorial), and a WorkstationConfig uses a selector to match workstations with those labels. This means one config can apply to many workstations, and one workstation can receive multiple configs.

Step 1: Create a WorkstationConfig Manifest

Create a file called my-config.yaml:

apiVersion: werkr.dev/v1alpha1
kind: WorkstationConfig
metadata:
  name: tutorial-tools
spec:
  selector:
    matchLabels:
      team: tutorial
  contents:
    packages:
      - curl
      - jq
      - vim
    devtools:
      - docker

Here's what's new compared to the Workstation manifest:

  • kind: WorkstationConfig - This is a configuration, not a workstation.
  • selector.matchLabels - This config applies to any workstation with the label team: tutorial. That matches the workstation you created earlier.
  • contents.packages - System packages installed via apt.
  • contents.devtools - Development tools that werkr knows how to install (e.g., Docker, kubectl, Go). See the configurations reference for the full list.

Step 2: Apply the Config

wer apply -f my-config.yaml

werkr matches the config's selector against your existing workstations. Since your workstation has the label team: tutorial, it matches and the worker begins applying the configuration.

Step 3: Wait for the Config to Apply

The worker installs the packages and tools in the background. Check when it's done with:

wer get workstation

Wait until the status returns to Running (it may briefly show Provisioning while the config is being applied).

Step 4: Verify the Tools

Shell into your workstation and confirm everything was installed:

wer shell --name my-first-workstation

Then try the installed tools:

# Check that packages are installed
curl --version
jq --version
vim --version | head -1

# Check that Docker is running
docker --version
docker ps

Everything should be available and ready to use. Docker is fully configured and running.

What Else Can You Configure?

WorkstationConfigs can do much more than install packages. Here are a few examples:

  • Port forwarding - Access services running in the VM from your Mac
  • Files - Drop config files (like .gitconfig) into the VM
  • Scripts - Run setup scripts during provisioning
  • Environment variables - Set EDITOR, GOPATH, etc.
  • Configuration layering - Stack multiple configs with priorities

See the configurations reference for the complete API and more examples.

Next Steps

Your workstation is now set up with tools. In the next tutorial, you'll learn how to manage your workstations - stopping, starting, editing, and using the Bridge TUI for day-to-day operations.