Lab 1: Dev Spaces and IDE Setup

Overview

In this lab you will create a Dev Spaces workspace for the Parasol Insurance application, verify Git and AI assistant integration, and run Quarkus Dev Services with nested containers.

Get the Dashboard URL

oc get checluster/devspaces -n openshift-devspaces \
  -o jsonpath='{.status.cheURL}'

Open this URL in your browser and log in with your OpenShift credentials.

Create the Lab Workspace

The simplest way to create a workspace is by URL. Construct the URL as:

https://<devspaces_dashboard_url>/#<git_repo_url>

For example, to create a workspace from the Parasol Insurance application:

https://<devspaces_dashboard_url>/#https://<gitlab_host>/parasol-insurance

You can also specify a branch:

https://<devspaces_dashboard_url>/#https://<gitlab_host>/parasol-insurance/tree/main

Alternatively, from the Dev Spaces dashboard:

  1. Click Create Workspace

  2. Paste the Git repository URL for the Parasol Insurance application

  3. Click Create & Open

Dev Spaces will clone the repository, read the devfile.yaml, pull the container image, and open the VS Code IDE in your browser.

The first workspace creation may take a few minutes while the container image is pulled to the node.

Verify Git Integration

Once the workspace opens:

  1. Open the Source Control panel (Ctrl+Shift+G)

  2. Confirm the repository is loaded and shows the correct branch

  3. If prompted to authenticate with GitLab, follow the OAuth flow — this is the integration configured in the GitLab Integration section

Test that you can push changes:

  1. Create or edit a file (e.g. add a comment to README.md)

  2. Stage, commit, and push the change from the Source Control panel

  3. Verify the commit appears in GitLab

Verify the AI Code Assistant

Open a terminal in the workspace and confirm the LLM environment variables are set:

echo $LLM_API_KEY
echo $LLM_BASE_URL

Both should return values injected by the shared secret configured in the Shared Secrets section.

Check that the Continue extension is configured:

  1. Open the Continue panel in the sidebar (the Continue icon)

  2. Send a test message such as "Hello, what model are you?"

  3. Confirm you receive a response from the qwen3 model

If Continue does not appear, check that the postStart event ran successfully:

cat ~/.continue/config.yaml

The file should contain the model configuration with your API key and base URL.

Create a Devfile

If the repository does not already have a devfile.yaml, create one at the root of the project. This devfile configures the workspace with UDI, Maven caching, Quarkus endpoints, and the Continue AI assistant:

schemaVersion: 2.2.0
metadata:
  name: parasol-insurance
components:
  - name: development-tooling
    container:
      image: quay.io/devfile/universal-developer-image:ubi9-latest
      env:
        - name: QUARKUS_HTTP_HOST
          value: "0.0.0.0"
        - name: MAVEN_OPTS
          value: "-Dmaven.repo.local=/home/user/.m2/repository"
      memoryLimit: 5Gi
      cpuLimit: 2500m
      volumeMounts:
        - name: m2
          path: /home/user/.m2
      endpoints:
        - name: quarkus-dev
          targetPort: 8080
          exposure: public
          protocol: https
        - name: debug
          targetPort: 5005
          exposure: none
  - name: m2
    volume:
      size: 1G
commands:
  - id: package
    exec:
      label: "1. Package the application"
      component: development-tooling
      commandLine: "./mvnw package"
      group:
        kind: build
        isDefault: true
  - id: start-dev
    exec:
      label: "2. Start Development mode (Hot reload + debug)"
      component: development-tooling
      commandLine: "./mvnw compile quarkus:dev"
      group:
        kind: run
        isDefault: true
  - id: init-continue
    exec:
      label: "Initialize Continue config"
      component: development-tooling
      workingDir: /home/user
      commandLine: |
        mkdir -p /home/user/.continue
        cat > /home/user/.continue/config.yaml << 'INNEREOF'
        name: Continue Config
        version: 0.0.1
        models:
          - name: qwen3-14b
            provider: vllm
            model: qwen3-14b
            apiKey: ${LLM_API_KEY}
            apiBase: ${LLM_BASE_URL}
            roles:
              - chat
        INNEREOF
      group:
        kind: build
events:
  postStart:
    - init-continue

Commit and push the devfile, then restart your workspace so Dev Spaces picks up the new configuration.

See Devfiles & Base Images for a full explanation of each section.

Verify Nested Containers

Confirm Podman is available inside the workspace:

podman version
podman run --rm registry.access.redhat.com/ubi9-minimal:latest echo "Nested containers work"

Starting with Dev Spaces 3.25 on OpenShift 4.20+, nested containers work without special pod annotations or SCC configuration. See the Dev Spaces 3.25 Release Notes for details.

When disableContainerRunCapabilities: false is set in the CheCluster CR, workspace pods get the capabilities needed to run Podman in rootless mode. Quarkus Dev Services uses Testcontainers under the hood, which calls Podman to start service containers (databases, message brokers, etc.).

Run Quarkus Dev Services

Open a terminal in the IDE and start Quarkus in dev mode:

./mvnw compile quarkus:dev

Quarkus Dev Services will detect that the application needs a PostgreSQL database and automatically start one using Podman inside the workspace. You should see log output indicating the database container is starting:

Dev Services for default datasource (postgresql) started

The application will be available on port 8080. Click the endpoint notification in the IDE or find the URL in the Endpoints panel.

Workspace Lifecycle

Some useful operations:

Stop a workspace (preserves state on the PVC):

  • From the dashboard, click the stop icon next to your workspace

  • The workspace pod is deleted, but the PVC retains your files

Restart a workspace:

  • Click the workspace name in the dashboard to restart it

  • Your source code, Maven cache, and other volume-mounted data persist

Delete a workspace:

  • From the dashboard, select the workspace and click Delete

  • This removes the workspace pod and its PVC

Next Steps