Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 2.68 KB

DEVELOPING.md

File metadata and controls

48 lines (35 loc) · 2.68 KB

Building & Using the Codewind Plugin on Che

Set the Codewind container image

If deploying a custom image of Codewind from https://github.com/eclipse/codewind, make sure to update https://github.com/eclipse/codewind-che-plugin/blob/master/codewind-che-sidecar/deploy-pfe/pkg/constants/defaults.go to point to your tagged and pushed codewind-pfe-amd64 and codewind-performance-amd64 docker images.

  • Otherwise, leave them as eclipse/codewind-pfe-amd64 and eclipse/codewind-performance-amd64

Build the Codewind plugin

Run the script build.sh to build the Codewind Che sidecar.

Deploying a Custom Codewind Che sidecar

  1. First, run the publish script located in this repository: scripts/publish.sh $REGISTRY, where $REGISTRY is a docker registry that you can push to, such as docker.io/testuser or quay.io/testuser.

    • The script will push the sidecar image up to the registry, and then generate the meta.yamls for codewind-sidecar and codewind-theia under the publish/ folder.
  2. Upload the meta.yamls somewhere publicly accessible, such as a GitHub repository.

  3. Finally, to create a Che Codewind workspace, write a devfile and host it publicly, such as on Github. Make sure to set the URLs for codewind-sidecar and codewind-theia accordingly. If hosting the plugin meta.yamls on GitHub, make sure you use the raw Github link

apiVersion: 1.0.0
metadata:
  name: codewind-che
projects:
  - name: goproj
    source:
      type: git
      location: 'https://github.com/microclimate-dev2ops/microclimateGoTemplate'
components:
  - alias: theia-ide
    type: cheEditor
    id: eclipse/che-theia/7.0.0-rc-3.0
  - alias: codewind-sidecar
    type: chePlugin
    id: https://raw.githubusercontent.com/eclipse/codewind-che-plugin/master/plugins/codewind/codewind-sidecar/latest/meta.yaml
  - alias: codewind-theia
    type: chePlugin
    id: https://raw.githubusercontent.com/eclipse/codewind-che-plugin/master/plugins/codewind/codewind-theia/latest/meta.yaml

Then create the workspace in Che by accessing http://$CHE_DOMAIN/f?url=${DEVFILE_LINK} in your browser, where ${DEVFILE_LINK} is the direct link to the devfile you created. Che will then create a workspace from that devfile.