Skip to content
Mario Loriedo edited this page Mar 13, 2023 · 34 revisions

Theia IDE + Che questions

https://stackoverflow.com/questions/tagged/eclipse-che+theia

Theia IDE is included in Che anymore. The new included IDEs are VS Code, IntelliJ and PyCharm.

Che on Red Hat Developer Sanbox (workspaces.openshift.com)

How to clean up PV content on Red Hat Developer Sandbox

Performance when starting workspaces is affected by the number of files in your Persistent Volume in the Che namespace on OpenShift. When projects are deleted, you may ending up with several workspace folders with lots of files on this volume.

You can connect directly to OpenShift, attach this volume to another container, and remove any files which you do not require any more. Here are the commands to clean them up.

Connecting to OpenShift from the command line

A kubeconfig file is automatically configured at workspace startup. The developer is logged in with its OpenShift user and can use the Kubernetes API (from the terminal or from the IDE) without any manual step.

Cleaning up storage space

After logging in to OpenShift, you can attach to a container with this volume mounted, and clean up the files:

oc project xxxx-devspaces # usually xxx-devspaces is username-devspaces - selects your Che project
oc run cleanup --image=registry.access.redhat.com/rhel7 -- tail -f /dev/null # This file will remove unused images from your local instance cache
oc set volume dc/cleanup --add -t pvc --name=cleanup --claim-name=claim-che-workspace --mount-path=/workspaces # Mount your persistent volume to the local path /workspaces
oc get pods #Identify the name of the active Che pod
oc rsh cleanup-X-XXXXX # Use the name found above here - this will log you in to the container with your workspaces mounted in the `/workspaces` folder
# find and remove the orphans workpace folders if any in the `/workspaces` using normal Unix shell commands
oc delete all -l run=cleanup # once the folders removed, delete the image
Clone this wiki locally