question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Dogfooding] Cannot build che-theia on che.openshift.io

See original GitHub issue

Describe the bug

For daily development using che.openshift.io I need to be able to build Che-Theia project. For now it’s impossible to do.

Steps to reproduce

Create a workspace using this devfile

metadata:
  name: test
projects:
  - name: theia
    source:
      location: 'https://github.com/eclipse-theia/theia.git'
      type: git
      branch: master
components:
  - id: redhat/vscode-yaml/latest
    type: chePlugin
  - mountSources: true
    endpoints:
      - name: theia-dev-flow
        attributes:
          protocol: http
          public: 'true'
        port: 3010
    memoryLimit: 3Gi
    type: dockerimage
    alias: che-dev
    image: 'eclipse/che-theia-dev:next'
  - id: che-incubator/typescript/latest
    memoryLimit: 2048M
    type: chePlugin
  - id: eclipse/che-machine-exec-plugin/latest
    type: chePlugin
  - id: eclipse/che-theia/latest
    memoryLimit: 2Gi
    type: cheEditor
    alias: theia-editor
apiVersion: 1.0.0

Then open a terminal in che-dev container, go to theia directory and build by yarn command.

Screenshot from 2020-01-13 15-50-05

When I turned off persist volumes, it did not affect the result.

attributes:
  persistVolumes: 'false'

After some playing with files (yarn builder creates, copies some files, etc), I got a message that quota has been exceeded.

Screenshot from 2020-01-13 15-04-03

Runtime

  • che.openshift.io

Screenshots

Screenshot from 2020-01-13 15-08-56

Screenshot from 2020-01-13 15-07-49

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
l0rdcommented, Jun 22, 2020
1reaction
vitaliy-guliycommented, Jan 29, 2020

@ibuziuk let me copy here a part of my email to che-dev where I explained how I develop che-theia.

The main idea is using temporary directory in the root where the limitation of disk space is 3 gigabytes, which is pretty enough to build the project.

The development flow includes:

  • workspace creation, cloning theia sources
  • copying sources to /tmp/theia directory
  • initializing che-theia
  • building
  • launching
  • making and applying changes

Workspace creation, cloning theia sources

To create a workspace I use devdile[1], which has a set of commands helping me to operate with source code. After starting, my workspace has cloned two theia and che-theia projects. I’m focused on developing packages in theia core, that’s why sources of che-theia temporary are not used.

Copying sources to ‘/tmp/theia’ directory

To copy sources to ‘/tmp/theia’ directory I use rsync, running in che-dev container. As eclipse/che-theia-dev image does not have rsync tool, I had to extend that image[2] and install rsync. The devfile has ‘1 Rsync Theia’ command to easily synchronizing ‘/protects/theia’ directory with ‘/tmp/theia’.

$ rsync -rtv --exclude='node_mobules' /projects/theia/ /tmp/theia/;

Initlalizing che-theia

To initialize che-theia we need to run ‘che:theia init’ in ‘/tmp/theia’ directory. The ‘2 Init che:theia’ command does that in one click.

Building

‘3 Build che:theia’ command runs ‘yarn’ in ‘/tmp/theia’ directory.

Launching

For Che-Theia I prefer to use dedicated directories for plugins, default plugins and for projects, which is used as Theia workspace directory. In the directory with default plugins I copy all the plugins from ‘/default-theia-plugins’, which is accessible only from ‘theia-ide’. That’s why ‘4.1 Prepare theia-* dirs’ command is running in that container.

$ mkdir -v /projects/theia-default-plugins
$ mkdir -v /projects/theia-plugins
$ mkdir -v /projects/theia-projects-dir
$ cd /default-theia-plugins
$ cp -v * /projects/theia-default-plugins/

‘4.2 Launch’ command sets necessary variables and launches Che-Theia in ‘che-dev’ container.

$ cd /tmp/theia/examples/assembly
$ export CHE_PROJECTS_ROOT="/projects/theia-projects-dir"
$ export THEIA_DEFAULT_PLUGINS="local-dir:///projects/theia-default-plugins"
$ export THEIA_PLUGINS="local-dir:///projects/theia-plugins"
$ export THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT='2506'
$ theia start /projects/theia-projects-dir --hostname=0.0.0.0 --port=3010

To open Che-Theia, click ‘che-dev/theia-dev-flow’ node in My Workspace view.

Making and applying changes

Each time after doing changes, I synchronize sources from ‘/projects/theia’ with sources in ‘/tmp/theia’ using ‘1 Rsync Theia’ command. Then I build Theia with ‘3 Build che:theia’ and launch with ‘4.2 Launch’.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulse · eclipse/che · GitHub
The Kubernetes-Native IDE for Developer Teams. Contribute to eclipse/che development by creating an account on GitHub.
Read more >
Che Dev Meetings - eclipse/che GitHub Wiki
Migrate maven projects involved in building Che server to new eclipse-che org (issue) (Sergii ... che.openshift.io March 1st EOL reminder (Ilya Buziuk) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found