Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Describe running and debugging plugins in sidecars #803

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

tsmaeder
Copy link
Contributor

Signed-off-by: Thomas Mäder [email protected]

What does this PR do?

Describes workflows for working with plugins in sidecar containers in detail.

What issues does this PR fix or reference?

eclipse-che/che#13249

@che-bot
Copy link
Contributor

che-bot commented Jul 13, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:803
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:803

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

CONTRIBUTING.md Outdated
{
"type": "node",
"request": "attach",
"name": "Java",
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming it Java is confusing in IMO, maybe vscodejava is more appropriate?

CONTRIBUTING.md Show resolved Hide resolved
@ericwill ericwill mentioned this pull request Jul 15, 2020
38 tasks
@ericwill ericwill added this to the 7.17 milestone Jul 15, 2020
CONTRIBUTING.md Outdated
But please note, you have to restart server to which changes is made.
# Working with Plugins in Sidecars

In a real Che workspace, many plugins are run in their own "sidecar" container. The idea is that the container furnishes any "native" dependencies the the plugins needs. For example the container that runs the theia IDE back end does not contain a Java SDK, so in order to run a plugin that needs a Java installation, we'll run the plugin inside a container that has Java installed.
Copy link
Contributor

Choose a reason for hiding this comment

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

the the plugins needs -> the plugin needs

CONTRIBUTING.md Outdated

## Setting up plugins to run

We can now add plugins to run in the sidecar container by adding them to the folder `/projects/plugins-1`(or whaterver we define as `THEIA_PLUGINS`env variable). If we're just interested in debugging the theia plugins host process, we can download a *.vsix file to the folder: it will be unpacked to a subfolder of `/tmp`. If we need to debug the plugin, we can checkout the source code and built it according the the instructions for the plugin:
Copy link
Contributor

Choose a reason for hiding this comment

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

and built it -> and build it

@ericwill
Copy link
Contributor

@tsmaeder can we get this one merged before the sprint is out?

@ericwill ericwill mentioned this pull request Jul 30, 2020
29 tasks
@tsmaeder tsmaeder force-pushed the 13249_describe_sidecar_debug branch from 0280358 to 9db092a Compare July 31, 2020 07:54
@benoitf
Copy link
Contributor

benoitf commented Jul 31, 2020

FYI, would be nice to fix vale errors (the plug-in used when working on che documentation)

image

image

CONTRIBUTING.md Outdated

This way, the IDE and the remote plugin host process can find each other.

The container in question must be able to work as a plugin sidecar for any plugin you want to run in it. If you are trying to debug a plugin that already has a sidecar container, it would make sense to base `remote-1`container on the sidecar that runs the original plugin. In that case, you would have to add a copy of node to sidecar container, since they generally don't contain one and we need to run the runtime host process, which is a node application. In this case, however, I've started with a `theia-dev`image and just point it to a JDK I've copied to `/projects/java-11-openjdk`by setting `JAVA_HOME`.
Copy link
Contributor

@benoitf benoitf Jul 31, 2020

Choose a reason for hiding this comment

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

Suggested change
The container in question must be able to work as a plugin sidecar for any plugin you want to run in it. If you are trying to debug a plugin that already has a sidecar container, it would make sense to base `remote-1`container on the sidecar that runs the original plugin. In that case, you would have to add a copy of node to sidecar container, since they generally don't contain one and we need to run the runtime host process, which is a node application. In this case, however, I've started with a `theia-dev`image and just point it to a JDK I've copied to `/projects/java-11-openjdk`by setting `JAVA_HOME`.
The container in question must be able to work as a plugin sidecar for any plugin you want to run in it. If you are trying to debug a plugin that already has a sidecar container, it would make sense to base `remote-1` container on the sidecar that runs the original plugin. In that case, you would have to add a copy of node to sidecar container, since they generally don't contain one and we need to run the runtime host process, which is a node application. In this case, however, I've started with a `theia-dev` image and just point it to a JDK I've copied to `/projects/java-11-openjdk` by setting `JAVA_HOME`.

suggested change is just to add the extra space after closing words

CONTRIBUTING.md Outdated

The container in question must be able to work as a plugin sidecar for any plugin you want to run in it. If you are trying to debug a plugin that already has a sidecar container, it would make sense to base `remote-1`container on the sidecar that runs the original plugin. In that case, you would have to add a copy of node to sidecar container, since they generally don't contain one and we need to run the runtime host process, which is a node application. In this case, however, I've started with a `theia-dev`image and just point it to a JDK I've copied to `/projects/java-11-openjdk`by setting `JAVA_HOME`.

If we want to debug later on, we'll have to add the `node-debug2`Che plugin to our workspace:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If we want to debug later on, we'll have to add the `node-debug2`Che plugin to our workspace:
If we want to debug later on, we'll have to add the `node-debug2` Che plugin to our workspace:

CONTRIBUTING.md Outdated

## Setting up plugins to run

We can now add plugins to run in the sidecar container by adding them to the folder `/projects/plugins-1`(or whaterver we define as `THEIA_PLUGINS`env variable). If we're just interested in debugging the theia plugins host process, we can download a *.vsix file to the folder: it will be unpacked to a subfolder of `/tmp`. If we need to debug the plugin, we can checkout the source code and build it according the the instructions for the plugin:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
We can now add plugins to run in the sidecar container by adding them to the folder `/projects/plugins-1`(or whaterver we define as `THEIA_PLUGINS`env variable). If we're just interested in debugging the theia plugins host process, we can download a *.vsix file to the folder: it will be unpacked to a subfolder of `/tmp`. If we need to debug the plugin, we can checkout the source code and build it according the the instructions for the plugin:
We can now add plugins to run in the sidecar container by adding them to the folder `/projects/plugins-1` (or whaterver we define as `THEIA_PLUGINS` env variable). If we're just interested in debugging the theia plugins host process, we can download a *.vsix file or *.theia file to the folder: it will be unpacked to a subfolder of `/tmp`. If we need to debug the plugin, we can checkout the source code and build it according the the instructions for the plugin:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Long term, we're trying to de-emphasize the theia API. Plus, the only theia-format plugins I'm aware of are our own, which run in the theia container.

@che-bot
Copy link
Contributor

che-bot commented Jul 31, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:803
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:803

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

@tsmaeder tsmaeder force-pushed the 13249_describe_sidecar_debug branch from 9db092a to 815bf09 Compare August 3, 2020 08:06
@che-bot
Copy link
Contributor

che-bot commented Aug 3, 2020

❌ E2E Happy path tests failed ❗

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:803
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:803

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Aug 4, 2020

crw-ci-test

@benoitf
Copy link
Contributor

benoitf commented Aug 4, 2020

I think you need to rebase to current master first.

@che-bot
Copy link
Contributor

che-bot commented Aug 4, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:803
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:803

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

@tsmaeder tsmaeder force-pushed the 13249_describe_sidecar_debug branch from 815bf09 to c55bfb4 Compare August 4, 2020 08:35
@che-bot
Copy link
Contributor

che-bot commented Aug 4, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:803
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:803

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

@benoitf benoitf merged commit 5155d75 into eclipse-che:master Aug 4, 2020
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Aug 11, 2020
vinokurig pushed a commit that referenced this pull request Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants