Lab 2.1 — Launch Your Dev Space
Welcome to Act 2. You are now the Developer — first day on a platform that will not send your source to a public LLM. Everything you need — editor, terminal, OpenCode, Qwen3.8 on the cluster — is in the browser through OpenShift Dev Spaces. No laptop install.
|
Estimated time: 10 minutes |
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 calls Models-as-a-Service at
https://maas.<apps-domain>/…;with the injectedsk-oai-key — same OpenAI API, governed quota -
Persistent storage: your work is saved on a per-user PVC even if you close the browser
Get the Dev Spaces URL
Use the URL you printed in Lab 1.4. It clones the Go app template (go-app-template) — not this workshop repo — and creates a workspace from its devfile.yaml:
https://devspaces.apps.<cluster>/#https://github.com/fjcloud/go-app-template?ai-provider=opencodeai/opencode
|
The |
-
Open that URL in your browser.
Log In and Create Your Workspace
-
You will be redirected to OpenShift SSO. Log in with the same cluster user you used for
oc. -
On the Create Workspace page, confirm that OpenCode is selected under AI Provider. That selection injects the CLI at start; you do not install it yourself. You will see a progress screen:
Starting workspace... Pulling universal developer image... Injecting OpenCode... Running postStart commands... ✓ Installing the ephemeral Git clientThis takes approximately 2-3 minutes on first launch. Subsequent launches are faster — the image is cached.
-
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
-
OpenCode available on
PATH(injected by Dev Spaces, not by the template)Do not sign in to GitHub Copilot. Che Code ships Copilot as a built-in; the platform disables it. Do not install Continue. The in-cluster model is OpenCode in the terminal.
-
Verify OpenCode is Running
-
Open a terminal in the workspace (Terminal → New Terminal or press Ctrl+`).
-
Check that OpenCode is on
PATH(injected) and that ephemeral Git is configured ($GIT_SERVER):opencode --version && echo "GIT_SERVER=$GIT_SERVER"Sample Outputopencode 0.x.x GIT_SERVER=https://git.<workshop-domain> -
Verify OpenCode can reach Models-as-a-Service.
$OPENAI_BASE_URLis already in the workspace. The developer ServiceAccount cannotoc get gatewayinopenshift-ingress— take the hostname from that URL:MAAS_HOST="${OPENAI_BASE_URL#https://}" MAAS_HOST="${MAAS_HOST%%/*}" curl -sS "https://${MAAS_HOST}/v1/models" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ | python3 -m json.toolExpected Output{ "object": "list", "data": [ { "id": "publishers/llm-serving/models/qwen3", "owned_by": "llm-serving/qwen3", "ready": true, "modelDetails": { "displayName": "Qwen3.8", "contextWindow": "262144" } } ] }$OPENAI_API_KEYis the MaaSsk-oai-key the platform minted into Secretai-provider-openai-api-key.$OPENAI_BASE_URLis the live MaaS path (https://maas.<apps-domain>/llm-serving/qwen3/v1) —configure-platform.shbinds the Gateway cert to this cluster. OpenCode calls that URL so the API model id staysqwen3. -
Start OpenCode:
opencodeThe OpenCode TUI (Terminal UI) launches. It reads
AGENTS.mdand connects to the Qwen3.8 LLM automatically. Two session modes are available: plan (read-only — no file writes) and build (writes files). Press Tab to switch from one to the other. Pressqto exit OpenCode when needed.
Understanding the OpenCode Configuration
OpenCode reads project opencode.json first (it overrides the platform mount under ~/.config/opencode). Verify the file in the template:
cat ${PROJECT_SOURCE}/opencode.json
Expected content:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"qwen3": {
"npm": "@ai-sdk/openai-compatible",
"name": "Qwen3.8",
"options": {
"baseURL": "{env:OPENAI_BASE_URL}",
"apiKey": "{env:OPENAI_API_KEY}",
"chunkTimeout": 120000,
"timeout": 600000
},
"models": {
"qwen3": {
"name": "Qwen3.8",
"limit": {
"context": 262144,
"output": 32768
}
}
}
}
},
"model": "qwen3/qwen3",
"autoupdate": false
}
OpenCode still reads AGENTS.md from the project directory at the start of every session. That is how the Platform Engineer’s rules are enforced.
limit.output must stay well below --max-model-len (262144). OpenCode’s default 32 768 output tokens now fits the native 256K window.
✅ Checkpoint
opencode --version && \
echo "GIT_SERVER=$GIT_SERVER" && \
MAAS_HOST="${OPENAI_BASE_URL#https://}" && \
MAAS_HOST="${MAAS_HOST%%/*}" && \
curl -sS "https://${MAAS_HOST}/v1/models" \
-H "Authorization: Bearer $OPENAI_API_KEY" | \
python3 -c "import sys,json; m=json.load(sys.stdin); print('LLM ready:', m['data'][0]['modelDetails']['displayName'])"
opencode 0.x.x
GIT_SERVER=https://git.<workshop-domain>
LLM ready: Qwen3.8
Your Dev Space is running, tools are installed, and the LLM is reachable. ✓
➡️ Move on to Lab 2.2: Prompt to Production.