This documentation is for a release that is no longer maintained
See documentation for the latest supported version.Questo contenuto non è disponibile nella lingua selezionata.
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 Dev Spaces on OpenShift using CLI Copia collegamentoCollegamento copiato negli appunti!
You can install OpenShift Dev Spaces on OpenShift.
Prerequisites
- OpenShift Container Platform
-
An active
oc
session with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. -
dsc
. See: Section 1.2, “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:delete
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the OpenShift Dev Spaces instance:
dsc server:deploy --platform openshift
$ dsc server:deploy --platform openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification steps
Verify the OpenShift Dev Spaces instance status:
dsc server:status
$ dsc server:status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Navigate to the OpenShift Dev Spaces cluster instance:
dsc dashboard:open
$ dsc dashboard:open
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. Installing Dev Spaces on OpenShift using the web console Copia collegamentoCollegamento copiato negli appunti!
If you have trouble installing OpenShift Dev Spaces on the command line, you can install it through the OpenShift web console.
Prerequisites
- An OpenShift web console session by a cluster administrator. See Accessing the web console.
-
An active
oc
session with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. - For a repeat installation on the same OpenShift cluster: you uninstalled the previous OpenShift Dev Spaces instance according to Chapter 7, Uninstalling Dev Spaces.
Procedure
-
In the Administrator view of the OpenShift web console, go to Operators
OperatorHub and search for Red Hat OpenShift Dev Spaces
. Install the Red Hat OpenShift Dev Spaces Operator.
TipCreate the
openshift-devspaces
project in OpenShift as follows:oc create namespace openshift-devspaces
oc create namespace openshift-devspaces
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Go to Operators
Installed Operators Red Hat OpenShift Dev Spaces instance Specification Create CheCluster YAML view. -
In the YAML view, replace
namespace: openshift-operators
withnamespace: openshift-devspaces
. Select Create.
Tip
Verification
- In Red Hat OpenShift Dev Spaces instance Specification, go to devspaces, landing on the Details tab.
- Under Message, check that there is None, which means no errors.
- Under Red Hat OpenShift Dev Spaces URL, wait until the URL of the OpenShift Dev Spaces instance appears, and then open the URL to check the OpenShift Dev Spaces dashboard.
- In the Resources tab, view the resources for the OpenShift Dev Spaces deployment and their status.
2.3. Installing Dev Spaces in a restricted environment Copia collegamentoCollegamento copiato negli appunti!
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
oc
session with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. -
An active
oc registry
session to theregistry.redhat.io
Red Hat Ecosystem Catalog. See: Red Hat Container Registry authentication.
-
opm
. See Installing theopm
CLI. -
jq
. See Downloadingjq
. -
podman
. See Podman Installation Instructions. -
An active
skopeo
session with administrative access to the <my_registry> registry. See Installing Skopeo, Authenticating to a registry, and Mirroring images for a disconnected installation. -
dsc
for OpenShift Dev Spaces version 3.7. See Section 1.2, “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.yaml
during 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.yaml
Copy 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
2.4. Finding the fully qualified domain name (FQDN) Copia collegamentoCollegamento copiato negli appunti!
You can get the fully qualified domain name (FQDN) of your organization’s instance of OpenShift Dev Spaces on the command line or in the OpenShift web console.
You can find the FQDN for your organization’s OpenShift Dev Spaces instance in the Administrator view of the OpenShift web console as follows. Go to Operators
Prerequisites
-
An active
oc
session with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. -
dsc
. See Section 1.2, “Installing the dsc management tool”.
Procedure
Run the following command:
dsc server:status
$ dsc server:status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy the Red Hat OpenShift Dev Spaces URL without the trailing
/dashboard/
.