Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 1 of the series on enabling the DevWorkspace Operator as workspace engine #4

Merged
merged 10 commits into from
Oct 13, 2021

Conversation

l0rd
Copy link
Contributor

@l0rd l0rd commented Oct 12, 2021

Signed-off-by: Mario Loriedo [email protected]

@l0rd l0rd requested a review from MichalMaler October 12, 2021 06:47
Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only few remarks

- It introduces the volume component type.
- Events and parent are two new components types.
- Besides Che it’s used by the OpenShift Developer Console, `odo` and the [Devfile Docker plugin](https://github.com/devfile/devfile-docker-plugin).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • it introduces Universal Developer Image


### A new way to specify the editor and its plugins
As mentioned above, version 2 of the Devfile, doesn’t include cheEditor and chePlugins component types anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a good point. I have added the reference.

@l0rd l0rd closed this Oct 13, 2021
@l0rd l0rd reopened this Oct 13, 2021
@l0rd l0rd merged commit 245bbb8 into eclipse-che:main Oct 13, 2021
metadata:
name: python-hello-world
attributes:
che-theia.eclipse.org/sidecar-policy: USE_DEV_CONTAINER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theia attributes should not be a part of devfile I believe.
Instead, it should be defined somewhere in .che/che-editor.yaml
and if this is a default policy, then better to omit it in any case

mountSources: true
- name: venv
volume:
size: 1G
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note that size does not any effect anything in devworkspace

registryUrl: https://my-registry.com # optional
override: # optional
containers:
- name: theia-ide
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it already published? Since AFAIK it's not implemented yet, so would be good to avoid confusion and ask users to try out something that is not going to work.

Update: Alright, that's already published https://che.eclipseprojects.io/2021/10/12/@mario.loriedo-devfile-v2-and-the-devworkspace-operator-p1.html


With version [7.28 of Che](https://github.com/eclipse/che/releases/tag/7.28.0) we have introduced a new workspace engine, [the DevWorkspace Operator](https://github.com/devfile/devworkspace-operator), that supports v2 of the Devfile specification. Although the default engine is still the che-server we plan to replace it with the DevWorkspace in the next few months.

Switching to the DevWorkspace engine has some important consequences. Notably on the authentication subsystem that will be lighter and more flexible, on the workspaces network managed by a central gateway powered by [Traefik](https://github.com/traefik/traefik) and simpler configuration options for Che administrators.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lighter is more or less true for OpenShift, but I would say not for Kubernetes (at least for local).
It makes sense to note that on Kubernetes now we require OpenID provide(or OAuth, I'm not sure)

But yeah, that's not something we already support. And on kubernetes we still depends on Keycloak.

Update. Ah, that's delayed till next blogpost:

Keycloak is not required anymore and Che users have to be Kubernetes users

Having the Devfile at the root of a repository makes it possible to use a simple factory link to the repository to start the workspace. For example [workspaces.openshift.com/#https://github.com/eclipse/che-docs](https://workspaces.openshift.com/#https://github.com/eclipse/che-docs) is a factory link: when a user click on it, a workspace defined by the Devfile in the repo [github.com/eclipse/che-docs](https://github.com/eclipse/che-docs) will be started on the public Che instance hosted by Red Hat at workspaces.openshift.com.

Recommending to colocate and evolve a v2 Devfile with the source code has two consequences:
- the `project` section of a Devfile can be omitted: it’s implicitly set to the git repo where the Devfile lives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: project -> projects

- Che samples will include a Devfile at their root (those Devfiles used to be published in the Devfile registry)

### Only one running workspace per user
A user cannot have more than one running workspace at a time. This limitation is related to the persistent volume strategy (“common”) that is used by Che. The same Volume is mounted by every workspace of the same user. This is implemented using Pods `volumeMounts.subPath` property and guarantees that the number of Volumes mounted by Che matches the number of users.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same Volume is mounted by every workspace of the same user

Volume -> PersistentVolume not to initiate confusion with devfile volume

This is implemented using Pods volumeMounts.subPath property and guarantees that the number of Volumes mounted by Che matches the number of users.

This mixes two stuff:

  • volumeMounts.subPath: the way we isolate files of different workspace in one PV
  • show a motivation why we stick to one PV per user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants