Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to create a workspace via Try in Dev Spaces extension

June 22, 2023
David Kwon
Related topics:
Developer ToolsGitOps
Related products:
Developer SandboxDeveloper ToolsRed Hat OpenShift Dev Spaces

Share:

    In early June, we released a new web extension for Red Hat OpenShift Dev Spaces called Try in Dev Spaces. Version 1.0 of the extension is available for Chromium-based browsers (Google Chrome, Microsoft Edge, Brave, Opera, etc.), Safari, and Firefox.

    You can download the web extension from these marketplaces:

    • Chrome Web Store
    • Mac App Store
    • Firefox Browser Add-ons

    How to use the Try in Dev Spaces web extension

    Are you new to OpenShift Dev Spaces? Try it for free in the Developer Sandbox for Red Hat OpenShift.

    This extension provides a Dev Spaces button in the GitHub project page that creates and opens a new workspace with the GitHub project on an OpenShift Dev Spaces installation (Figure 1). OpenShift Dev Spaces is a platform for creating reproducible, container-based cloud development environments (or workspaces) for your Git projects on Red Hat OpenShift. In a workspace, you can code, build, test, and deploy your application within an OpenShift cluster.

    The 'Dev Spaces' button within the GitHub UI and the button's dropdown items displaying different Dev Spaces instances/
    Figure 1. Screenshots of the extension's Dev Spaces button within the GitHub UI.

    By default the web extension opens the GitHub project on the free OpenShift Dev Spaces instance accessible on the Developer Sandbox for Red Hat OpenShift. However, additional Dev Spaces instances (or upstream Eclipse Che instances) for creating workspaces can also be configured. Configuring different Dev Spaces instances is done in the extension’s options page. The Dev Spaces button provides a dropdown menu, allowing you to select which OpenShift Dev Spaces installation you want to create the workspace.

    Figure 2 shows a quick demo of the extension in action. In the demo, we add a new Dev Spaces instance in the extension’s options, and start a new workspace on the newly added instance with the new Dev Spaces button on GitHub.

    A demo of how to use the Dev Spaces button, adding new Dev Spaces endpoint and creating a workspace.
    Figure 2. A demo of how to use the Dev Spaces button. 

    How does the Dev Spaces button work?

    If you have worked with OpenShift Dev Spaces (or the upstream project Eclipse Che®) before, you may already know that you can create workspaces by constructing and accessing a custom URL.

    The custom URL consists of at least two main parts. There can be more parts if you want to customize the workspace further with URL parameters.

    Figure 3 displays a simple example of creating a new workspace with the https://github.com/<user>/<repo> repository on the imaginary https://devspaces.example.com Dev Spaces instance.

    For a concrete example, try accessing https://workspaces.openshift.com/#https://github.com/che-incubator/quarkus-api-example to create a new workspace on the Developer Sandbox for Red Hat OpenShift using the https://github.com/che-incubator/quarkus-api-example GitHub project.

    Example of a URL to create a new Dev Spaces workspace.
    Figure 3. The URL used to create a new workspace in OpenShift Dev Spaces.

    Clicking the Dev Spaces button is essentially just accessing a custom-made URL. As the customization options for the URL grows, creating the custom URL by hand can be more time-consuming. The button is there for convenience, constructing URLs so you don’t have to.

    Installing the web extension on an air-gapped environment

    You can download the web extension’s source code from the GitHub repository, build and sideload it into your browser.

    To build the extension, run the following on a non-air-gapped machine:

    $ git clone https://github.com/redhat-developer/try-in-dev-spaces-browser-extension/tree/v1.0.0
    
    $ cd try-in-dev-spaces-browser-extension/
    
    $ yarn
    
    $ yarn build:prod # build the extension for Chromium based browsers
    
    $ yarn build:prod-sf # build the extension for Safari and Firefox

    You can find the built extension for Chromium-based browsers in dist/chromium and the extension built for Safari and Firefox in dist/safari-firefox. Copy the built extension to the air-gapped machine and sideload the extension to the web browser by following the browser-specific steps from this document.

    Upcoming plans for Try in Dev Spaces

    We plan to expand the extension's functionality by adding support for Azure DevOps Services, GitLab, and BitBucket in a future release. Additionally, we will make it easier to configure the created workspace using URL parameters (e.g., automatically setting up Git remotes when starting a workspace from a forked repository). If you have a question, please create an issue in the GitHub repository. We welcome your feedback.

    Last updated: August 12, 2024

    Related Posts

    • How to run VS Code with OpenShift Dev Spaces

    • Sharing your Container Development Environment with Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)

    • Test pull requests with the Try in Web IDE GitHub action

    • How to access the Developer Sandbox for Red Hat OpenShift

    Recent Posts

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    • How to integrate vLLM inference into your macOS and iOS apps

    What’s up next?

    In this activity, you'll deploy and update a distributed application on the fly using OpenShift Dev Spaces and Eclipse JKube. 

    Start learning
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue