Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Che-Theia dogfooding on che.openshift.io

Thanks for sharing, Vitaliy
This is great that you are able to do the che-theia development on Hosted Che! Any chance you can document the flow and make it available in the dev-guide?

Do we know where those limitations (3G for root and 1G for /projects) are configured? @Ilya Buziuk any idea?

No those are not configurable and I believe after the increasing of RAM we would need to start tackling the PVC size thingy (not sure if those two efforts should be done in parallel)

I would much rather we invest our efforts in a reliable build process for che-theia + theia: our approach based on source symlinks is broken. I have ideas on how to fix it, but no time.

IMO this two efforts should be done in parralel and we should encourage the teams to use Hosted Che on a daily basis. I personally much appreciate the fact that Vitalli is doing his every day job on che.openshift.io


On Thu, Jan 30, 2020 at 8:11 AM Thomas Mäder <tmader@xxxxxxxxxx> wrote:

Hi Vitaliy,

I appreciate you investing time in dog-fooding, I really do. But any approach that loses my changes when my workspace is idled (which I believe is true for your proposal) is an immediate non-starter for me.

Personally, I have given up on developing on che.openshift.io until we have reliable persistent volumes. Currently, we do not.

I would much rather we invest our efforts in a reliable build process for che-theia + theia: our approach based on source symlinks is broken. I have ideas on how to fix it, but no time.

/Thomas

On 29/01/2020 11:51, Vitaliy Gulyy wrote:
Hello team,

I'd like to share the way how to develop che-theia on che.openshift.io
where we have a restriction on disk space for projects in one gigabyte.
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'.

## Solve problem with build

If you try to repeat this flow, you may face a problem with building of Che-Theia.
It’s because some build scripts in Theia upstream have been changed[3], but Che-Theia
is still not updated.
The solution is to checkout to the previous commit 'e1d08d00f' immediately after workspace startup.

[1] - https://github.com/vitaliy-guliy/che.openshift.io-resources/blob/master/devfile.yaml
[2] - https://github.com/vitaliy-guliy/che.openshift.io-resources/blob/master/Dockerfile
[3] - https://github.com/eclipse/che/issues/15851


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/che-dev


--

ILYA BUZIUK

SENIOR SOFTWARE ENGINEER

Red Hat


Back to the top