Ce contenu n'est pas disponible dans la langue sélectionnée.
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 Copier lienLien copié sur presse-papiers!
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 Copier lienLien copié sur presse-papiers!
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 TaskEnterche.
-
To see the drop-down list of available tasks, type: F1
- 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
githubAuthentication 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 ViewEnter.
-
To display the endpoint list, type: F1
- 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.onDidChangeTextDocumentevent
- Terminal
- Opens a terminal to a Dev Workspace container.
1.2. Stack samples Copier lienLien copié sur presse-papiers!
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.
| Language | Builders, runtimes, and databases | Maturity |
|---|---|---|
| Apache Camel K |
| GA |
| Java |
| GA |
| Node.js |
| GA |
| Python |
| GA |
| C/C++ |
| Technology Preview |
| C# |
| Technology Preview |
| Go |
| Technology Preview |
| PHP |
| Technology Preview |
1.3. Badge for first-time contributors Copier lienLien copié sur presse-papiers!
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
Substitute your OpenShift Dev Spaces URL (
https://<openshift_dev_spaces_fqdn>) and repository URL (<your_repository_url>), and add the link to your repository in the projectREADME.mdfile.[](https://<openshift_dev_spaces_fqdn>/#https://<your_repository_url>)-
The
README.mdfile 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 Copier lienLien copié sur presse-papiers!
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
- 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.
- Check the pull or merge request changes.
Run your desired debugging and testing tools:
- Run a linter.
- Run unit tests.
- Run the build.
- Run the application to check for problems.
- 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.