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 |
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.localdirectly — 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 |
-
Open the URL your instructor shared in your browser.
Log In and Create Your Workspace
-
You will be redirected to OpenShift SSO. Log in with your cluster credentials:
-
Username:
{rosa_openshift_admin_user} -
Password:
{rosa_openshift_admin_password}
-
-
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 CLIThis 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
-
The OpenCode panel (if the CLI started automatically)
-
Verify OpenCode is Running
-
Open a terminal in the workspace (Terminal → New Terminal or press Ctrl+`).
-
Check that OpenCode, gitpop, and Ansible were installed by the
postStarthook:opencode --version && gitpop --version 2>/dev/null || true && ansible --version | head -1Sample Outputopencode 0.x.x gitpop version x.x.x ansible [core 2.x.x] -
Verify OpenCode can reach the in-cluster LLM:
curl -s \ http://qwen3-predictor.llm-serving.svc.cluster.local:8080/v1/models \ | python3 -m json.toolExpected 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.localis only reachable from within the cluster — your workspace has direct network access to the LLM, with no latency penalty from going over the internet. -
Start OpenCode:
opencodeThe OpenCode TUI (Terminal UI) launches. It reads
AGENTS.mdand connects to the Qwen3.6 LLM automatically. Two built-in session modes are available via/planand/buildslash commands. Pressqto 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'])"
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.