(Addendum to CRW 1.2 Guide for using Che 7 IDE in CRW deployment - https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/1.2/html-single/administration_guide/index#using-the-che-7-ide-in-codeready-workspaces )
-
Deploy CRW 1.2 to OCP using OperatorHub.
-
Or, use the Operator-based deploy script:
git clone https://github.com/redhat-developer/codeready-workspaces-deprecated && cd codeready-workspaces-deprecated/operator-installer && git checkout 6.19.x ./deploy.sh -d --server-image=quay.io/crw/server-rhel8 -v=1.2-35 --operator-image=quay.io/crw/operator-rhel8:1.2-13 --verbose -p=crw-che7d
-
Get the che plugin registry sources that include the v1 and v2 registries:
git clone https://github.com/eclipse/che-plugin-registry.git && \ cd che-plugin-registry && \ git checkout registry-v2
-
Build it & push to quay (or use my image)
docker build . -t quay.io/nickboldt/che-plugin-registry-v2:nightly && \ docker push quay.io/nickboldt/che-plugin-registry-v2:nightly
-
If you deployed your own, go to the Settings tab for your quay repo, eg., https://quay.io/repository/nickboldt/che-plugin-registry-v2?tab=settings. Mark the image public.
-
Deploy the new registry to your cluster, in the same project as CRW deployment, using the image you built above.
oc login <my cluster> oc project <my crw deployment> cd che-plugin-registry; oc new-app --name=che-plugin-registry -f openshift/che-plugin-registry.yml \ -p IMAGE="quay.io/nickboldt/che-plugin-registry-v2" \ -p IMAGE_TAG="nightly" \ -p PULL_POLICY="Always"
-
Update the CRW deployment to use the new registry:
routebits=$(oc get routes | grep plugin-registry) && \ route=( $routebits ) && regurl=${route[1]} && echo $regurl for d in codeready-operator codeready; do oc set env deployment/${d} \ CHE_WORKSPACE_PLUGIN__REGISTRY__URL=${regurl} && \ oc scale deployment/${d} --replicas=0 && \ oc scale deployment/${d} --replicas=1 done
-
Verify the correct registry is defined in the CodeReady Workspaces server pod:
oc rsh $(oc get pods | grep codeready | grep -v operator | grep Running | sed -e "s# \+1/1.\+##") /bin/bash -c "env | grep CHE_WORKSPACE_PLUGIN__REGISTRY__URL"
-
Browse to your CRW dashboard, eg., at http://codeready-crw-che7d.apps.crw.codereadyqe.com/dashboard/#/
-
Create a new workspace, eg. the Java 8 one. Instead of starting the workspace, click the menu next to Create & Open and select Create & Proceed Editing. Select the Config tab and edit the default config to remove the installers and add these plugins/editors:
"attributes": { "editor": "org.eclipse.che.editor.theia:next", "plugins": "che-machine-exec-plugin:0.0.1,ms-vscode.node-debug2:1.31.6,redhat.vscode-yaml:0.4.0,redhat.vscode-openshift-connector:0.0.19" },
The result should be something like this:
{ "defaultEnv": "default", "environments": { "default": { "machines": { "dev-machine": { "attributes": { "memoryLimitBytes": "2147483648" }, "servers": { "eap": { "port": "8080", "attributes": {}, "protocol": "http" }, "eap-debug": { "port": "8000", "attributes": {}, "protocol": "http" } }, "volumes": { "m2": { "path": "/home/jboss/.m2" }, "javadata": { "path": "/home/jboss/jdtls/data" } }, "installers": [], "env": {} } }, "recipe": { "type": "dockerimage", "content": "registry.redhat.io/codeready-workspaces/stacks-java-rhel8" } } }, "projects": [], "name": "wksp-e1wz", "attributes": { "editor": "org.eclipse.che.editor.theia:next", "plugins": "che-machine-exec-plugin:0.0.1,ms-vscode.node-debug2:1.31.6,redhat.vscode-yaml:0.4.0,redhat.vscode-openshift-connector:0.0.19" }, "commands": [ { "commandLine": "mvn clean install -f ${current.project.path}/pom.xml", "name": "build", "attributes": { "goal": "Build", "previewUrl": "" }, "type": "mvn" }, { "commandLine": "${HOME}/stack-analysis.sh -f ${current.project.path}/pom.xml -p ${current.project.path}", "name": "dependency_analysis", "attributes": { "goal": "Run", "previewUrl": "" }, "type": "custom" } ], "links": [] }
-
Open the new workspace. Voila, Che 7 IDE in CRW 1.2!
Haha, thanks. Now we just need to actually figure out the steps for this to work. :(
The walkthru above doesn't work for me.