Multi-user Eclipse Che (#6441) #### How to run it. ```docker run -it -e CHE_MULTIUSER=true -e CHE_HOST=<your ip> -e CHE_KEYCLOAK_AUTH-SERVER-URL=http://<your ip>:5050/auth -v /var/run/docker.sock:/var/run/docker.sock -v ~/.che-multiuser:/data eclipse/che:nightly start --skip:pull --skip:nightly``` #### How to manage it - Keycloak configured with two realms. ```Master``` and ```che```. Also we have one user admin/admin in both realm. Admin user in master realm is - super admin. - Eclipse Che configured for che realm - We enabled user registration in ```Che``` realm #### Known limitation - swagger would not work. We need to upgrade a version. to support openid authentification https://github.com/eclipse/che/issues/6015 - It's working on local docker. We are going to provide scalable version based on OpenShift on next versions. - Invitation of non-existent users to Eclipse Che organization https://github.com/eclipse/che/issues/6335 #### How to run it when it is in a branch To run an multiuser Che version, the following steps are required after building the branch: - Rebuild init, cli and che images (in the given sequence). To do that, proceed to folder _dockerfiles/<image_name>_ and run _build.sh_ - Run Che in a usual way using cli, with additional parameters: `-e CHE_MULTIUSER=true` and `--skip:pull --skip:nightly` Full command example: `docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/user/.che:/data -e CHE_MULTIUSER=true eclipse/che-cli:nightly start --skip:pull --skip:nightly` - MacOS users may need to edit _che.env_ file in the data folder, changing `CHE_HOST` and `CHE_KEYCLOAK_AUTH__SERVER__URL` values to their specific IP. When start is succeeded, the following docker containers should be created: - che, exposing 8080 port; - che_keycloak, exposing 5050 port; - che_postgres, exposing 5432 port; |
||
|---|---|---|
| .. | ||
| che-sample-plugin-json-ide | ||
| che-sample-plugin-json-server | ||
| che-sample-plugin-json-shared | ||
| README.md | ||
| pom.xml | ||
README.md
Description
The JSON Example is a providing a plugin sample which is use as a continuous example in the plugin documentation. You can learn more about it at: https://www.eclipse.org/che/docs/assemblies/intro/index.html
This sample demonstrate how to extend the Eclipse Che in various ways:
-
How to register a new file type and add code completion (Read the tutorial at:https://www.eclipse.org/che/docs/assemblies/sdk-code-editors/index.html#code-completion)
-
How to define a custom project type with project creation wizard and register project-specific actions (Read the tutorial at: https://www.eclipse.org/che/docs/assemblies/sdk-project-types/index.html)
How to build sample-plugin-json plugin
1- Link to IDE assembly
The plugin-json extension has a client-side (IDE) part and an server part. It also includes some code shared between the IDE and the server. You have to introduce the extension as a dependency in /che/assembly/assembly-ide-war/pom.xml.
Add:
...
<dependency>
<groupId>org.eclipse.che.sample</groupId>
<artifactId>che-sample-plugin-json-ide</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.sample</groupId>
<artifactId>che-sample-plugin-json-shared</artifactId>
</dependency>
...
You can insert the dependency anywhere in the list. After you have inserted it, run mvn sortpom:sort and maven will order the pom.xml for you.
2- Link to WS-Agent assembly
Introduce the server part of the extension as a dependency in /che/assembly/assembly-wsagent-war.
Add:
...
<dependency>
<groupId>org.eclipse.che.sample</groupId>
<artifactId>che-sample-plugin-json-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.sample</groupId>
<artifactId>che-sample-plugin-json-shared</artifactId>
</dependency>
...
You can insert the dependency anywhere in the list. After you have inserted it, run mvn sortpom:sort and maven will order the pom.xml for you.
2- Rebuild Eclipse Che
# Build a new IDE.war
# This IDE web app will be bundled into the assembly
cd che/assembly/assembly-ide-war
mvn clean install
# Create a new web-app that includes the server-side extension
cd che/assembly/assembly-wsagent-war
mvn clean install
# Creates a new workspace agent that includes new web app w/ your extension
cd assembly/assembly-wsagent-server
mvn clean install
# Create a new Che assembly that includes all new server- and client-side extensions
cd assembly/assembly-main
mvn clean install
3- Run Eclipse Che
# Start Che using the CLI with your new assembly
# Replace <local-repo> with the path to your Che repository, to use local binaries in your local image
# Replace <version> with the actual version you are working on
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v <local-path>:/data \
-v <local-repo>:/repo \
eclipse/che:<version> start --debug
Documentation resources
- IDE Setup: https://www.eclipse.org/che/docs/plugins/setup-che-workspace/index.html
- Building Extensions: https://www.eclipse.org/che/docs/plugins/create-and-build-extensions/index.html
- Run local Eclipse Che binaries: https://www.eclipse.org/che/docs/setup/configuration/index.html#development-mode