This documentation is for a release that is no longer maintained
See documentation for the latest supported version.Este conteúdo não está disponível no idioma selecionado.
Chapter 2. Installing Dev Spaces
This section contains instructions to install Red Hat OpenShift Dev Spaces.
You can deploy only one instance of OpenShift Dev Spaces per cluster.
2.1. Installing the dsc management tool Copiar o linkLink copiado para a área de transferência!
You can install dsc, the Red Hat OpenShift Dev Spaces command-line management tool, on Microsoft Windows, Apple MacOS, and Linux. With dsc, you can perform operations the OpenShift Dev Spaces server such as starting, stopping, updating, and deleting the server.
Prerequisites
Linux or macOS.
NoteFor installing
dscon Windows, see the following pages:
Procedure
-
Download the archive from https://developers.redhat.com/products/openshift-dev-spaces/download to a directory such as
$HOME. -
Run
tar xvzfon the archive to extract the/dscdirectory. -
Add the extracted
/dsc/binsubdirectory to$PATH.
Verification
Run
dscto view information about it.dsc
$ dscCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
2.2. Installing Dev Spaces on OpenShift using CLI Copiar o linkLink copiado para a área de transferência!
You can install OpenShift Dev Spaces on OpenShift.
Prerequisites
- OpenShift Container Platform
-
An active
ocsession with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. -
dsc. See: Section 2.1, “Installing the dsc management tool”.
Procedure
Optional: If you previously deployed OpenShift Dev Spaces on this OpenShift cluster, ensure that the previous OpenShift Dev Spaces instance is removed:
dsc server:delete
$ dsc server:deleteCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the OpenShift Dev Spaces instance:
dsc server:deploy --platform openshift
$ dsc server:deploy --platform openshiftCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification steps
Verify the OpenShift Dev Spaces instance status:
dsc server:status
$ dsc server:statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow Navigate to the OpenShift Dev Spaces cluster instance:
dsc dashboard:open
$ dsc dashboard:openCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Installing Dev Spaces on OpenShift using the web console Copiar o linkLink copiado para a área de transferência!
This section describes how to install OpenShift Dev Spaces using the OpenShift web console. Consider Section 2.2, “Installing Dev Spaces on OpenShift using CLI” instead.
Prerequisites
- An OpenShift web console session by a cluster administrator. See Accessing the web console.
Procedure
Optional: If you previously deployed OpenShift Dev Spaces on this OpenShift cluster, ensure that the previous OpenShift Dev Spaces instance is removed:
dsc server:delete
$ dsc server:deleteCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the Red Hat OpenShift Dev Spaces Operator. See Installing from OperatorHub using the web console.
Create the
openshift-devspacesproject in OpenShift as follows:oc create namespace openshift-devspaces
oc create namespace openshift-devspacesCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
In the Administrator view of the OpenShift web console, go to
. -
In the YAML view, replace
namespace: openshift-operatorswithnamespace: openshift-devspaces. - Select Create. See Creating applications from installed Operators.
Verification
- To verify that the OpenShift Dev Spaces instance has installed correctly, navigate to the Dev Spaces Cluster tab of the Operator details page. The Red Hat OpenShift Dev Spaces instance Specification page displays the list of Red Hat OpenShift Dev Spaces instances and their status.
-
Click devspaces
CheClusterand navigate to the Details tab. See the content of the following fields:
-
The Message field contains error messages. The expected content is
None. - The Red Hat OpenShift Dev Spaces URL field contains the URL of the Red Hat OpenShift Dev Spaces instance. The URL appears when the deployment finishes successfully.
-
The Message field contains error messages. The expected content is
- Navigate to the Resources tab. View the list of resources assigned to the OpenShift Dev Spaces deployment and their status.
2.4. Installing Dev Spaces in a restricted environment Copiar o linkLink copiado para a área de transferência!
On an OpenShift cluster operating in a restricted network, public resources are not available.
However, deploying OpenShift Dev Spaces and running workspaces requires the following public resources:
- Operator catalog
- Container images
- Sample projects
To make these resources available, you can replace them with their copy in a registry accessible by the OpenShift cluster.
Prerequisites
- The OpenShift cluster has at least 64 GB of disk space.
- The OpenShift cluster is ready to operate on a restricted network, and the OpenShift control plane has access to the public internet. See About disconnected installation mirroring and Using Operator Lifecycle Manager on restricted networks.
-
An active
ocsession with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. -
An active
oc registrysession to theregistry.redhat.ioRed Hat Ecosystem Catalog. See: Red Hat Container Registry authentication.
-
opm. See Installing theopmCLI. -
jq. See Downloadingjq. -
podman. See Installing Podman. -
An active
skopeosession with administrative access to the <my_registry> registry. See Installing Skopeo, Authenticating to a registry, and Mirroring images for a disconnected installation. -
dscfor OpenShift Dev Spaces version 3.4. See Section 2.1, “Installing the dsc management tool”.
Procedure
Download and execute the mirroring script to install a custom Operator catalog and mirror the related images: prepare-restricted-environment.sh.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install OpenShift Dev Spaces with the configuration set in the
che-operator-cr-patch.yamlduring the previous step:dsc server:deploy --platform=openshift \ --che-operator-cr-patch-yaml=che-operator-cr-patch.yaml
$ dsc server:deploy --platform=openshift \ --che-operator-cr-patch-yaml=che-operator-cr-patch.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Allow incoming traffic from the OpenShift Dev Spaces namespace to all Pods in the user projects. See: Section 3.7.1, “Configuring network policies”.
Additional resources