Lab 2.1 — Launch Your Dev Space

Welcome to Module 300. You are now the Developer. Everything you need — a code editor, a terminal, the OpenCode AI assistant, and a direct connection to the in-cluster Qwen3.6 LLM — is available in your browser through OpenShift Dev Spaces. No local installation required.

Estimated time: 10 minutes
Persona: Developer
What you need: Your OpenShift web console credentials (from Module 100)

What is OpenShift Dev Spaces?

OpenShift Dev Spaces provides cloud-based developer workspaces — VS Code-compatible IDEs that run as pods in the cluster. Key benefits:

  • Zero local setup: the workspace comes pre-configured; just open a browser

  • Consistent environment: every developer gets the same tools, versions, and configuration

  • In-cluster access: your workspace runs inside the cluster, so it can reach internal services like qwen3-predictor.llm-serving.svc.cluster.local directly — no VPN, no port-forward needed

  • Persistent storage: your work is saved on a per-user PVC even if you close the browser

Get the Dev Spaces URL

Your instructor has already prepared the launch URL for you. It points at the platform template on GitHub and creates a workspace from its devfile.yaml:

https://devspaces.apps.<cluster>/#https://github.com/fjcloud/go-app-template

The #<template-url> suffix tells Dev Spaces to clone the template and create a workspace from its devfile.yaml automatically. The workspace comes pre-loaded with AGENTS.md, opencode.json, scripts/, pipeline/, gitops/, and deploy/base/ — you only need to write the application code.

  1. Open the URL your instructor shared in your browser.

Log In and Create Your Workspace

  1. You will be redirected to OpenShift SSO. Log in with your cluster credentials:

    • Username: {rosa_openshift_admin_user}

    • Password: {rosa_openshift_admin_password}

  2. Dev Spaces will create a workspace automatically from the devfile. You will see a progress screen:

    Starting workspace...
    Pulling universal developer image...
    Running postStart commands...
      ✓ Installing OpenCode CLI

    This takes approximately 2-3 minutes on first launch. Subsequent launches are faster — the image is cached.

  3. When the workspace is ready, a VS Code-like editor opens in the browser. You will see:

    • A file explorer on the left

    • A terminal at the bottom

    • The OpenCode panel (if the CLI started automatically)

Verify OpenCode is Running

  1. Open a terminal in the workspace (Terminal → New Terminal or press Ctrl+`).

  2. Check that OpenCode, gitpop, and Ansible were installed by the postStart hook:

    opencode --version && gitpop --version 2>/dev/null || true && ansible --version | head -1
    Sample Output
    opencode 0.x.x
    gitpop version x.x.x
    ansible [core 2.x.x]
  3. Verify OpenCode can reach the in-cluster LLM:

    curl -s \
      http://qwen3-predictor.llm-serving.svc.cluster.local:8080/v1/models \
      | python3 -m json.tool
    Expected Output
    {
      "object": "list",
      "data": [
        {
          "id": "qwen3",
          "object": "model",
          "owned_by": "vllm"
        }
      ]
    }

    This request works because your Dev Space pod runs inside the cluster. The URL qwen3-predictor.llm-serving.svc.cluster.local is only reachable from within the cluster — your workspace has direct network access to the LLM, with no latency penalty from going over the internet.

  4. Start OpenCode:

    opencode

    The OpenCode TUI (Terminal UI) launches. It reads AGENTS.md and connects to the Qwen3.6 LLM automatically. Two built-in session modes are available via /plan and /build slash commands. Press q to exit OpenCode when needed.

Understanding the OpenCode Configuration

The workspace comes pre-configured via opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "qwen3": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Qwen3.6",
      "options": {
        "baseURL": "http://qwen3-predictor.llm-serving.svc.cluster.local:8080/v1",
        "apiKey": "dummy",
        "chunkTimeout": 120000,
        "timeout": 600000
      },
      "models": {
        "qwen3": {
          "name": "Qwen3.6-35B"
        }
      }
    }
  },
  "model": "qwen3/qwen3",
  "autoupdate": false,
  "instructions": ["AGENTS.md"] (1)
}
1 OpenCode reads AGENTS.md from the current project directory at the start of every session. This is how the Platform Engineer’s rules are silently enforced.

✅ Checkpoint

opencode --version && \
gitpop --version 2>/dev/null || true && \
ansible --version | head -1 && \
curl -s http://qwen3-predictor.llm-serving.svc.cluster.local:8080/v1/models | \
  python3 -c "import sys,json; m=json.load(sys.stdin); print('LLM ready:', m['data'][0]['id'])"
Expected Output
opencode 0.x.x
gitpop version x.x.x
ansible [core 2.x.x]
LLM ready: qwen3

Your Dev Space is running, tools are installed, and the LLM is reachable. ✓

➡️ Move on to Lab 3: Build and Deploy with OpenCode.