Chapter 1. Adopting Dev Spaces


To get started with adopting OpenShift Dev Spaces for your organization, you can read the following:

1.1. Developer workspaces

Red Hat OpenShift Dev Spaces provides developer workspaces with everything you need to code, build, test, run, and debug applications:

  • Project source code
  • Web-based integrated development environment (IDE)
  • Tool dependencies needed by developers to work on a project
  • Application runtime: a replica of the environment where the application runs in production

Pods manage each component of a OpenShift Dev Spaces workspace. Therefore, everything running in a OpenShift Dev Spaces workspace is running inside containers. This makes a OpenShift Dev Spaces workspace highly portable.

The embedded browser-based IDE is the point of access for everything running in a OpenShift Dev Spaces workspace.

1.1.1. Microsoft Visual Studio Code - Open Source

Microsoft Visual Studio Code - Open Source is the default browser-based IDE.

OpenShift Dev Spaces adds these features:

Open VSX registry
The IDE uses the Open VSX registry to list and download extensions. The OpenShift Dev Spaces administrator can configure the Open VSX registry URL.
Recommended extensions
The IDE installs automatically the recommended extensions.

OpenShift Dev Spaces adds these extensions:

Commands

Translates Devfile commands to Microsoft Visual Studio Code - Open Source tasks.

Procedure

  • To see the drop-down list of available tasks, type: F1 Tasks: Run Task Enter che.
Activity tracker
Tracks events provided by the Microsoft Visual Studio Code - Open Source to determine and stop inactive workspaces. This extension does not save, collect, or store data.
API
Provides helpers to interact with Dev Workspace and OpenShift Dev Spaces.
GitHub authentication
Provides support for authenticating to GitHub. It registers the github Authentication Provider that can be leveraged by other extensions. This also provides the GitHub authentication used by Settings Sync.
Port

Detects opening ports and provides redirect URI. When a process starts listening to a port, OpenShift Dev Spaces displays a notification with a link to open the resulting resource.

Procedure

  • To display the endpoint list, type: F1 Explorer: Focus on endpoints View Enter.
Remote
Provides commands for the remote authority.
Resource monitor
Monitors resources such as CPU and RAM.
Telemetry

Detects and sends the following events to a backend telemetry plugin listening on http://localhost:${DEVWORKSPACE_TELEMETRY_BACKEND_PORT}:

WORKSPACE_OPENED
Sent when the telemetry extension activates
EDITOR_USED
Sent on the vscode.workspace.onDidChangeTextDocument event
Terminal
Opens a terminal to a Dev Workspace container.

1.2. Stack samples

To demonstrate the capabilities of Red Hat OpenShift Dev Spaces as remote development environment, Red Hat OpenShift Dev Spaces contains stack samples using various programming languages. Each sample includes a devfile and you can use them as a reference to bootstrap a new project. You can customize the samples if you are a OpenShift Dev Spaces administrator.

Table 1.1. Supported languages
LanguageBuilders, runtimes, and databasesMaturity

Apache Camel K

  • Red Hat Fuse

GA

Java

  • OpenJDK 11
  • Maven 3.6
  • Gradle 6.1
  • Quarkus Tools
  • Lombok 1.18
  • JBoss EAP 7.4
  • JBoss EAP XP 3.0

GA

Node.js

  • Node.js 16
  • NPM 8
  • Express
  • MongoDB 3.6

GA

Python

  • Python 3.8
  • Pip 22.2

GA

C/C++

  • GCC
  • cmake
  • make

Technology preview

C#

  • Dotnet 3.1 on AMD64 and Intel 64 (x86_64)
  • Dotnet 6.0 on AMD64 and Intel 64 (x86_64), and IBM Z (s390x)

Technology preview

Go

  • Golang

Technology preview

PHP

  • CakePHP
  • Composer

Technology preview

1.3. Badge for first-time contributors

To enable a first-time contributor to start a workspace with a project, add a badge with a link to your OpenShift Dev Spaces instance.

Figure 1.1. Factory badge

Procedure

  1. Substitute your OpenShift Dev Spaces URL ("https://devspaces-&lt;openshift_deployment_name&gt;.&lt;domain_name&gt;") and repository URL (<your_repository_url>), and add the link to your repository in the project README.md file.

    [![Contribute](https://www.eclipse.org/che/contribute.svg)]("https://devspaces-&lt;openshift_deployment_name&gt;.&lt;domain_name&gt;"/#https://<your_repository_url>)
  2. The README.md file in your Git provider web interface displays the factory badge. Click the badge to open a workspace with your project in your OpenShift Dev Spaces instance.

1.4. Reviewing pull and merge requests

Red Hat OpenShift Dev Spaces workspace contains all tools you need to review pull and merge requests from start to finish. By clicking a OpenShift Dev Spaces link, you get access to Red Hat OpenShift Dev Spaces-supported web IDE with a ready-to-use workspace where you can run a linter, unit tests, the build and more.

Prerequisites

  • You have access to the repository hosted by your Git provider.
  • You have access to a OpenShift Dev Spaces instance.

Procedure

  1. Open the feature branch to review in OpenShift Dev Spaces. A clone of the branch opens in a workspace with tools for debugging and testing.
  2. Check the pull or merge request changes.
  3. Run your desired debugging and testing tools:

    • Run a linter.
    • Run unit tests.
    • Run the build.
    • Run the application to check for problems.
  4. Navigate to UI of your Git provider to leave comment and pull or merge your assigned request.

Verification

  • (optional) Open a second workspace using the main branch of the repository to reproduce a problem.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.