= Red Hat OpenShift Dev Spaces CLI README

Red Hat OpenShift Dev Spaces CLI

== About Red Hat OpenShift Dev Spaces

See product _Release Notes and Known Issues_ for more information about the product and the current version:

https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.0/html/release_notes_and_known_issues/


== Installing Red Hat OpenShift Dev Spaces

See the Red Hat OpenShift Dev Spaces _Administration Guide_ for instructions on how to deploy the product using various configurations and on different flavors of the OpenShift platform. The _Administration Guide_ includes instructions on how to:

* deploy with different parameters on Red Hat OpenShift Container Platform 3.11 **[no longer supported after 2.15]**
* deploy on Red Hat OpenShift Container Platform 4.x
* deploy on Red Hat OpenShift Dedicated
* deploy on Red Hat OpenShift Container Platform in a restricted environment
* migrate from the previous version of the product
* uninstall the product

https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.0/html/administration_guide/

== Installing with OperatorHub

On Openshift 4.x, the recommended way to install Workspaces is via OperatorHub. See link:https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.0/html-single/installation_guide/index#installing-codeready-workspaces-on-openshift-4-from-operatorhub_installing-codeready-workspaces-on-openshift-container-platform-4[Installing Red Hat OpenShift Dev Spaces on OpenShift 4 from OperatorHub].

However, the instructions below should also work, as dsc is the recommended solution for installing Workspaces to an airgapped (restricted) environment, or for offline installs.

== Installing with dsc

To install Workspaces, see https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.0/html-single/installation_guide/index#installing-codeready-workspaces-on-openshift-4-using-the-cli_crw


== Overriding default images when deploying

If you need to swap out a default image for a custom one, eg., for testing a change, you can do so in three ways.

=== Override operator and default images

See https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.0/html-single/installation_guide#starting-codeready-workspaces-installation-in-a-restricted-environment-using-cli-management-tool

=== Override containers in the plugin registry

Once deployed to your cluster, you can override the link:https://github.com/redhat-developer/devspaces/tree/devspaces-3-rhel-8/dependencies/che-plugin-registry/v3/plugins/eclipse[default CRW containers referenced in the plugin registry] using specific environment variables.

First, get the environment variables:

```
oc get deployment plugin-registry -o=json | jq '.spec.template.spec.containers[0].env'
```

Then you can set new values with something like this:
```
oc set env deployment/plugin-registry RELATED_IMAGE_codeready_workspaces_machineexec_plugin_registry_image_GIXDCNIK=quay.io/devspaces/machineexec-rhel8:next
```

=== Override containers in the devfile registry

Once deployed to your cluster, you can override the link:https://github.com/redhat-developer/devspaces/tree/devspaces-3-rhel-8/dependencies/che-devfile-registry/v3/plugins/eclipse[default CRW containers referenced in the devfile registry] using specific environment variables.

First, get the environment variables:

```
oc get deployment devfile-registry -o=json | jq '.spec.template.spec.containers[0].env'
```

Then you can set new values with something like this:
```
oc set env deployment/devfile-registry RELATED_IMAGE_jboss_eap_7_eap_xp3_openjdk11_openshift_devfile_registry_image_GMXDALJZBI______=registry.redhat.io/jboss-eap-7/eap-xp3-openjdk11-openshift-rhel8:latest
```
