Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. 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.
4.1. Installing Dev Spaces in the cloud
Deploy and run Red Hat OpenShift Dev Spaces in the cloud.
Prerequisites
- A OpenShift cluster to deploy OpenShift Dev Spaces on.
- 
						dsc: The command line tool for Red Hat OpenShift Dev Spaces. See: Section 3.2, “Installing the dsc management tool”.
4.1.1. Deploying OpenShift Dev Spaces in the cloud
					Follow the instructions below to start the OpenShift Dev Spaces Server in the cloud by using the dsc tool.
				
- Section 4.1.2, “Installing Dev Spaces on OpenShift using CLI”
- Section 4.1.3, “Installing Dev Spaces on OpenShift using the web console”
- Section 4.1.4, “Installing Dev Spaces in a restricted environment”
- https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.24/html-single/user_guide/index#installing-che-on-microsoft-azure
- https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.24/html-single/user_guide/index#installing-che-on-amazon-elastic-kubernetes-service
4.1.2. Installing Dev Spaces on OpenShift using CLI
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 3.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 
Additional resources
4.1.3. Installing Dev Spaces on OpenShift using the web console
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 ocsession 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 10, 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. TipImportant- The Red Hat OpenShift Dev Spaces Operator depends on the Dev Workspace Operator. If you install the Red Hat OpenShift Dev Spaces Operator manually to a non-default namespace, ensure that the Dev Workspace Operator is also installed in the same namespace. This is required as the Operator Lifecycle Manager will attempt to install the Dev Workspace Operator as a dependency within the Red Hat OpenShift Dev Spaces Operator namespace, potentially resulting in two conflicting installations of the Dev Workspace Operator if the latter is installed in a different namespace. 
If you want to onboard Web Terminal Operator on the cluster make sure to use the same installation namespace as Red Hat OpenShift Dev Spaces Operator since both depend on Dev Workspace Operator. Web Terminal Operator, Red Hat OpenShift Dev Spaces Operator, and Dev Workspace Operator must be installed in the same namespace.
- Create the - openshift-devspacesproject 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-operatorswithnamespace: 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.
Additional resources
4.1.4. Installing Dev Spaces in a restricted environment
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. 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 Podman Installation Instructions.
- 
							skopeoversion 1.6 or higher. See Installing Skopeo.
- 
							An active skopeosession with administrative access to the private Docker registry. Authenticating to a registry, and Mirroring images for a disconnected installation.
- 
							dscfor OpenShift Dev Spaces version 3.24. See Section 3.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 - 1
- The private Docker registry where the images will be mirrored
 
- Install OpenShift Dev Spaces with the configuration set in the - che-operator-cr-patch.yamlduring the previous step:- 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 5.8.1, “Configuring network policies”.
Additional resources
4.1.4.1. Setting up an Ansible sample
Follow these steps to use an Ansible sample in restricted environments.
Prerequisites
- Microsoft Visual Studio Code - Open Source IDE
- A 64-bit x86 system.
Procedure
- Mirror the following images: - ghcr.io/ansible/ansible-devspaces@sha256:a28fa23d254ff1b3ae10b95a0812132148f141bda4516661e40d0c49c4ace200 registry.access.redhat.com/ubi8/python-39@sha256:301fec66443f80c3cc507ccaf72319052db5a1dc56deb55c8f169011d4bbaacb - ghcr.io/ansible/ansible-devspaces@sha256:a28fa23d254ff1b3ae10b95a0812132148f141bda4516661e40d0c49c4ace200 registry.access.redhat.com/ubi8/python-39@sha256:301fec66443f80c3cc507ccaf72319052db5a1dc56deb55c8f169011d4bbaacb- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Configure the cluster proxy to allow access to the following domains: - .ansible.com .ansible-galaxy-ng.s3.dualstack.us-east-1.amazonaws.com - .ansible.com .ansible-galaxy-ng.s3.dualstack.us-east-1.amazonaws.com- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
Support for the following IDE and CPU architectures is planned for a future release:
- CPU architectures - IBM Power (ppc64le)
- IBM Z (s390x)
 
4.2. Finding the fully qualified domain name (FQDN)
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 ocsession with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI.
Procedure
- Run the following command: - oc get checluster devspaces -n openshift-devspaces -o jsonpath='{.status.cheURL}'- oc get checluster devspaces -n openshift-devspaces -o jsonpath='{.status.cheURL}'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
4.3. Permissions to install Dev Spaces
Learn about the permissions required to install Red Hat OpenShift Dev Spaces on different Kubernetes clusters.
4.3.1. Permissions to install Dev Spaces on OpenShift using CLI
Below is the minimal set of permissions required to install OpenShift Dev Spaces on an OpenShift cluster using dsc:
Additional resources
4.3.2. Permissions to install Dev Spaces on OpenShift using web console
Below is the minimal set of permissions required to install OpenShift Dev Spaces on an OpenShift cluster using the web console:
Additional resources