<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Florent Benoit on Medium]]></title>
        <description><![CDATA[Stories by Florent Benoit on Medium]]></description>
        <link>https://medium.com/@florent.benoit?source=rss-312ab6f67ec8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MPi-najWzGwcWW4n2YV4zg.jpeg</url>
            <title>Stories by Florent Benoit on Medium</title>
            <link>https://medium.com/@florent.benoit?source=rss-312ab6f67ec8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:49:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@florent.benoit/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Devfile v2 and IDE plug-ins in Eclipse Che]]></title>
            <link>https://medium.com/eclipse-che-blog/devfile-v2-and-ide-plug-ins-in-eclipse-che-7a560ae724b1?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a560ae724b1</guid>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[registry]]></category>
            <category><![CDATA[devfile]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Wed, 23 Jun 2021 07:22:04 GMT</pubDate>
            <atom:updated>2021-06-23T07:22:04.953Z</atom:updated>
            <content:encoded><![CDATA[<h3>Definition</h3><p>Devfile has been incubated by Eclipse Che project providing <a href="https://redhat-developer.github.io/devfile/">devfile v1 specification</a>. To allow other projects to use a common definition, devfile has moved out of Eclipse Che and has its own development and definition at <a href="https://devfile.io/">https://devfile.io</a> with current <a href="https://docs.devfile.io/devfile/2.1.0/user-guide/api-reference.html">v2.1.0 specification</a>.</p><p>Devfile v1 were handled by Eclipse Che Server workspace engine using Java/Kubernetes API. There is a new engine for devfile v2 called DevWorkspace Controller available. Source code is hosted on the devfile organization: <a href="https://github.com/devfile/devworkspace-operator">https://github.com/devfile/devworkspace-operator</a>. DevWorkspaces are custom kubernetes resources and can be created/listed/deleted using k8s tools like kubectl.</p><p>A devWorkspace will correspond to a workspace using this new engine and supporting devfile V2 definition.</p><h3>Milestones</h3><p>Devfile v2 support in Eclipse Che is done through milestones enhancements.</p><ul><li><a href="https://github.com/eclipse/che/milestone/136">Milestone 1</a> introduced the first support of devfile v2 (start a basic workspace)</li><li><a href="https://github.com/eclipse/che/milestone/139">Milestone 2</a> just landed in Eclipse Che 7.32.0 with the support of Theia plug-ins for DevWorkspaces</li><li><a href="https://github.com/eclipse/che/milestone/140">Milestone 3</a> is the next target, including Kubernetes support and more.</li></ul><h3>How to test ?</h3><p>The support of devfile v2/devWorkspaces is optional and need to be opt-in.<br>When the support is enabled, both devfile v1 and v2 are supported. You can still work with your previous workspaces and devfile v1.</p><ul><li>If the devfile.yaml has apiVersion1.0.0, it will use che server workspace engine to deploy this devfile.</li><li>If the devfile.yaml has schemaVersion22.0.0 (or greater like 2.1.0), it will use DevWorkspace controller to deploy this devfile.</li></ul><p><a href="https://emojipedia.org/warning/">⚠️</a> DevWorkspaces requires Openshift as platform until Milestone 3 is reached(no Kubernetes yet)</p><p>ℹ️ Enabling devWorkspace is also defaulting to use single-host deployment. So no need to install certificates on your computer.</p><p>To enable devWorkspace, it uses a custom spec object for Che Operator:<br>Creates a file in your ${HOME} folder for example ${HOME}/enable-che-devworkspace.yamlwith the following content:</p><pre>spec:<br>  devWorkspace:<br>    enable: true</pre><p>Install Eclipse Che (latest stable ≥7.32 or next channel) with chectl:</p><pre>$ chectl update next # (or stable)<br>$ chectl server:deploy --che-operator-cr-patch-yaml=${HOME}/enable-che-devworkspace.yaml</pre><p>Then, search for the Dashboard link in the chectl output:</p><pre>✔ Eclipse Che 7.33.0-SNAPSHOT has been successfully deployed.<br>  ✔ Documentation        : <a href="https://www.eclipse.org/che/docs/">https://www.eclipse.org/che/docs/</a><br>  ✔ -------------------------------------------------------------<br>  ✔ Users Dashboard      : https://che-eclipse-che.my-che.com/<br>  ✔ -------------------------------------------------------------<br></pre><p>Opening the Dashboard page will display the new getting started:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*oYwtnBBBHuoxzUrWdIkA0w.png" /></figure><p>Clicking on a sample will use a devfile v2 and DevWorkspace engine.</p><p>ℹ️ <a href="https://www.eclipse.org/che/docs/che-7/installation-guide/enabling-dev-workspace-engine/">Installation guide is also available in Che documentation</a></p><h3>Updating from devfile v1</h3><p>While the syntax between v1 and v2 yaml definition is close, there is a major change in the devWorkspace definition: the IDE plug-ins are no longer part of the devfile.</p><p>It brings more clarity: for example, it was possible to specify a java plug-in but if the editor was not Eclipse Theia then there was no Java plug-in in the resulting workspace. Also when using other tools that don’t provide IDE like <a href="https://developers.redhat.com/products/odo/overview">odo</a>, when consuming the devfile definition, these plug-ins were not available.</p><p>Another change in the lifecycle of a workspace is that the project clone operation is done by the devWorkspace engine. So whatever editor is picked-up, project is always cloned in <em>/projects/&lt;your-project&gt;</em> location after the workspace is started (no matter if there is an editor/IDE or not)</p><h3>Plug-ins definition</h3><h4>IDE preferences</h4><p>While IDE plug-ins are no longer part of the devfile.yaml, instead or reinventing how to specify a plug-in for IDE, the idea was to leverage existing plug-in definition of the IDEs.</p><p>Example: VS Code has .vscode/extensions.json file where plug-ins can be recommended. Eclipse Che will use this input by adding these VS Code extensions to the devWorkspace.</p><p>Specifying</p><pre>{<br>  &quot;recommendations&quot;: [<br>    &quot;redhat.java&quot;<br>  ]<br>}</pre><p>in .vscode/extensions.json will automatically installredhat/java VS Code extension in the Eclipse Che workspace.</p><p>Note: if the specified set of extensions IDs are not available in the Eclipse Che plug-in registry, it won’t fail but the extensions won’t be available.</p><p>Current plug-ins are available at registry at <a href="https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/">https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/</a> which is following main branch of the plug-in registry.</p><h4>Custom definition</h4><p>Relying on .vscode/extensions.json is great but sometimes some specific settings could be provided in addition to that file. <br>Here comes the .che/che-theia-plugins.yaml optional file.</p><p>For example, overriding some container settings like the memoryLimit for theredhat.java plug-in.</p><pre>- id: redhat/java<br>  override:<br>    sidecar:<br>      memoryLimit: 2Gi</pre><h4>Inlining</h4><p>Sometimes it may not be possible to add the .vscode/extensions.json or the .che/che-theia-plugins.yaml files inside the repository.</p><p>Inlining the content of these files in the devfile.yaml file is somehow possible using the following syntax of the devfile:</p><pre>schemaVersion: 2.1.0<br>metadata:<br>  name: my-example<br>attributes:<br>  .vscode/extensions.json: |<br>    {<br>      &quot;recommendations&quot;: [<br>        &quot;redhat.java&quot;<br>      ]<br>    }</pre><p>To inline .che/che-theia-plugins.yaml :</p><pre>schemaVersion: 2.1.0<br>metadata:<br>  name: my-example<br>attributes:<br>  .che/che-theia-plugins.yaml: |<br>    - id: redhat/java</pre><h3>New Features for plug-ins</h3><p>While there is big change by excluding the IDE plug-ins from the devfile, each editor can bring new features more easily, as each editor is handling the devWorkspace templates update based on some definition of files (like optional .vscode/extensions.jsonor .che/che-theia-plugins.yaml files)</p><h4>Deploy plug-ins in existing containers</h4><p>By default, in Eclipse Che and when using Eclipse Theia editor, IDE plug-ins are deployed either in the Che-Theia container (when it only requires nodejs runtime) or through a new sidecar container (for example for Java, Go, Python, Php, etc.)</p><p>Now, there is a new attribute of the devfile specific to Che-Theia:</p><pre>attributes:<br>  che-theia.eclipse.org/sidecar-policy: USE_DEV_CONTAINER</pre><p>In that case, all plugins requiring a sidecar will be deployed in theuser defined container and not bring any sidecar container.</p><p>Example:</p><p>If a repository contains these two files:</p><p>devfile.yamlwith the following content:</p><pre>schemaVersion: 2.1.0<br>metadata:<br>  name: my-example<br>attributes:<br>  che-theia.eclipse.org/sidecar-policy: USE_DEV_CONTAINER<br>components:<br>  - name: tools<br>    container:<br>      image: registry.access.redhat.com/ubi8/openjdk-11<br>      command: [&#39;tail&#39;]<br>      args: [&#39;-f&#39;, &#39;/dev/null&#39;]</pre><p>And the file .vscode/extensions.json containing</p><pre>{<br>   &quot;recommendations&quot;:[<br>      &quot;redhat.java&quot;<br>   ]<br>}</pre><p>The plug-in redhat.java will be started inside the tools container and not bring another sidecar container.</p><p>It also means that all dependencies required by the plug-ins need to be there else the VS Code java extension may fail to start.</p><h4>Prebuilt DevWorkspace templates</h4><p>Today, the flow is the following with devfile v1: user pickup a getting started, then dashboard fetches the devfile then plug-in broker will analyze the devfile.yaml and fetch content from linked plug-in registries, parse the meta.yaml of these plug-ins to find sidecar definition, and then at the end some containers are added.</p><p>With devfile v2, there is still these kind of steps where a lot of yaml/json files are fetched, analyzed to result at the end in a set of devWorkspace templates.</p><p>The Che-Theia library allows to generate a single yaml file with all the analysis being done offline.</p><pre>node lib/devworkspace-handler --devfile-url:<a href="https://github.com/che-samples/spring-petclinic/tree/devfilev2">https://github.com/che-samples/spring-petclinic/tree/devfilev2</a> --output-file:$(pwd)/all-in-one.yaml</pre><p>Then this file can be used directly by kubectl :</p><p>kubectl apply -f all-in-one.yaml -n my-namespace</p><p>These templates will be stored in the devfile registry in the getting started example so Eclipse Che dashboard, if defined, will directly use this content instead of processing at every click the full analysis.</p><h3>Plug-in registry changes</h3><p>For workspaces using devfile v1, Eclipse Che server fetches meta.yaml files from the plug-in registry. There are some limitations, for example plug-in preferences are only possible if there is a sidecar being defined, etc.</p><p>With devWorkspaces, the plug-in registry export now the content provided in different formats. It still export meta.yaml but it also expose devfile.yaml files for Eclipse Che editors definition and for some plug-ins that are not IDE plug-ins like che-machine-exec (library to be able connect to a specific container in a workspace/pod).</p><p>Also the Che-Theia IDE plug-ins are now exposed by their che-theia-plugin.yaml fragment. Every Che-Theia plug-in fragment is generated from the <a href="https://github.com/eclipse-che/che-plugin-registry/blob/main/che-theia-plugins.yaml">che-theia-plugins.yaml file</a>.</p><p>An hosted version of the che-plugin-registry is available after each commit at <a href="https://eclipse-che.github.io/che-plugin-registry/main">https://eclipse-che.github.io/che-plugin-registry/main</a></p><p>Corresponding definition forredhat/java IDE plug-in is available at:</p><p><a href="https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/redhat/java/latest/che-theia-plugin.yaml">https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/redhat/java/latest/che-theia-plugin.yaml</a></p><p>It references the dependencies of this IDE plug-in and the preferences (so .vsix are not grouped directly in the meta.yaml file)</p><pre>preferences:<br>  java.server.launchMode: Standard<br>dependencies:<br>  - vscjava/vscode-java-debug<br>  - vscjava/vscode-java-test</pre><h3>Eclipse Che Devfile registry changes</h3><p>The index of the devfile registry is providing a list of devfiles to use. But now, with devfile V2 as some other optional files may be required, it’s better to reference a repository rather than a devfile.yaml</p><p>New links are available in the devfile registry. The v2 links are links to either repositories or devfiles.</p><p>example:</p><p><a href="https://github.com/eclipse-che/che-devfile-registry/blob/main/devfiles/java-web-spring/meta.yaml#L7">eclipse-che/che-devfile-registry</a></p><p>If Eclipse Che has devWorkspaces support enabled and there are some v2 links in the devfile registry, the dashboard will only display Devfile v2 getting started. Each of these samples will use the new DevWorkspace engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oYwtnBBBHuoxzUrWdIkA0w.png" /><figcaption>Getting started with devfile v2</figcaption></figure><p>There is ongoing work merging Che Devfile registry and <a href="https://registry.devfile.io/">Community Devfile registry</a> supported by <a href="https://github.com/devfile/registry">devfile organization</a>.</p><h3>Full workflow with either devfile v1 or v2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8c7iV88dwEt-UY3yY6ZiVw.png" /><figcaption>starting a workspace</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a560ae724b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/devfile-v2-and-ide-plug-ins-in-eclipse-che-7a560ae724b1">Devfile v2 and IDE plug-ins in Eclipse Che</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to quickly deploy a VS Code extension on Eclipse Che]]></title>
            <link>https://medium.com/eclipse-che-blog/how-to-quickly-deploy-a-vs-code-extension-on-eclipse-che-d7c2f25f5853?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7c2f25f5853</guid>
            <category><![CDATA[vscode-extension]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Fri, 24 Jul 2020 09:46:37 GMT</pubDate>
            <atom:updated>2020-07-24T12:14:37.361Z</atom:updated>
            <content:encoded><![CDATA[<h4>Try a custom VS Code extension</h4><h4>Introduction</h4><p>Eclipse Che is supporting VS Code extensions in its IDE.</p><p>Each workspace can have its own set of plug-ins. This definition of plug-ins is stored inside a devfile.yamlfile containing as well the list of projects to clone.</p><p>From the dashboard, there is a list of plug-ins that can be enabled on a given workspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AljynvaP6VGvLx1hr4UdwA.png" /><figcaption>toggle plug-ins</figcaption></figure><p>When a plug-in is enabled, a new entry is added in the devfile.yaml file.</p><p>For example, enabling AsciiDoc plug-in is adding the following snippet in my devfile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*JDXduFwsoaxMokw49VxXpA.png" /></figure><p>It’s easy but what if the plug-in that I want to try is not in the default Eclipse Che plug-in registry ?</p><p>Here come multiple ideas. One of them is to fork the current plug-in-registry repository, rebuild the docker image, deploy it and use this registry. It’s very powerful for ‘in-house’ use-cases, etc but it might be a big effort at first.</p><h4>Setup configuration</h4><p>Let’s try to make it very simple by just using Github and its <a href="https://gist.github.com/">gist</a> service.</p><p>Go on <a href="https://gist.github.com/">https://gist.github.com/</a> and create a README.md file saying for example that : Try Bracket Pair Colorizer extension in Eclipse Che</p><p>It’s because I want to try <a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer">https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer</a> with its 3M of downloads !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9B6-Ivap24YRGPvlEXYkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9fowXf0ylqqqSZacNRa0w.png" /></figure><p>And click on Create secret gist button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2f_G6UbZ_MXvjY2NtbWdQ.png" /></figure><p>You might not know, but behind a gist, there is a git repository. Let’s clone this repository by using the URL from the navbar.</p><p>Git clone command will look like:</p><pre>$ git clone <a href="https://gist.github.com/benoitf/85c60c8c439177ac50141d527729b9d9">https://gist.github.com/&lt;github-username&gt;/&lt;</a>very-long-id&gt;                                                                                                                                                </pre><p>In my case it was</p><pre>git clone <a href="https://gist.github.com/benoitf/85c60c8c439177ac50141d527729b9d9">https://gist.github.com/benoitf/85c60c8c439177ac50141d527729b9d9</a>                                                                                                                                                       <br>Cloning into &#39;85c60c8c439177ac50141d527729b9d9&#39;...<br>remote: Enumerating objects: 3, done.<br>remote: Counting objects: 100% (3/3), done.<br>remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0<br>Unpacking objects: 100% (3/3), done.</pre><p>then we enter into this cloned directory</p><pre>$ cd <a href="https://gist.github.com/benoitf/85c60c8c439177ac50141d527729b9d9">85c60c8c439177ac50141d527729b9d9</a></pre><h4>Create the devfile and plug-ins definition</h4><p>First, download the plug-in from the VS Code marketplace <a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer">https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer</a> or from its github page <a href="https://github.com/CoenraadS/BracketPair/releases">https://github.com/CoenraadS/BracketPair/releases</a> and store the file in the cloned directory</p><p>Then, we need to add a definition of this plug-in through a yaml file.</p><p>Let’s create this file in the cloned directory</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21fc7aac69d1ce133513c5e29745bcbb/href">https://medium.com/media/21fc7aac69d1ce133513c5e29745bcbb/href</a></iframe><p>Two remarks there:</p><ul><li>This extension seems to only require nodejs runtime so in the yaml definition I didn’t specified a custom runtime image.</li><li>I’m using {{REPOSITORY}} in URL to later compute this link to avoid to search the public URL of the file for now.</li></ul><p>note: in the spec section, we can specify a custom runtime image, memory limit and some extra volumes, but for the use-case of this simple extension, it was not required.</p><pre>spec:<br>  containers:<br>    - image: &quot;quay.io/eclipse/che-sidecar-java:8-0cfbacb&quot;<br>      name: vscode-java<br>      memoryLimit: &quot;1500Mi&quot;<br>      volumes:<br>      - mountPath: &quot;/home/theia/.m2&quot;<br>        name: m2</pre><p>So, plugin.vsixfile is there, plugin.yaml file is there and we only need our workspace definition: devfile.yaml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7be23e0ab82ddc6eedd0c3f58e26c0ed/href">https://medium.com/media/7be23e0ab82ddc6eedd0c3f58e26c0ed/href</a></iframe><p>You could have taken any other devfile definition., the only important information from this devfile are the lines</p><pre>components:<br>  - type: chePlugin<br>    reference: &quot;{{REPOSITORY}}/plugin.yaml&quot;</pre><p>It means that we’ll add a custom plug-in using an external reference vs just an id pointing to a definition inside the default plug-in registry.</p><p>To sum up, we have 4 files in the current git directory:</p><pre>$ ls -la<br>.git<br>CoenraadS.bracket-pair-colorizer-1.0.61.vsix<br>README.md<br>devfile.yaml<br>plugin.yaml</pre><p>We will need to commit the files to our repository, but before, we’ll add a pre-commit hook to update {{REPOSITORY}} variable to the public external raw gist link.</p><pre># download this script<br>$ curl -s <a href="https://gist.githubusercontent.com/benoitf/e1dd101a6ae157e7e498453dbf683137/raw/2c332278c5a8018b6669da661bbdc6fa10dfb872/pre-commit.sh">https://gist.githubusercontent.com/benoitf/e1dd101a6ae157e7e498453dbf683137/raw/2c332278c5a8018b6669da661bbdc6fa10dfb872/pre-commit.sh</a> &gt; .git/hooks/pre-commit</pre><pre># make it executable<br>$ chmod u+x .git/hooks/pre-commit</pre><p>Pre-commit hook is in place, it’s time to commit our files</p><pre>$ git add *</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*0FbflRWYdDICdYwAfPYRGA.png" /><figcaption>git status output</figcaption></figure><p>…commit the files…</p><pre>$ git commit -m &quot;Initial Commit for the test of our extension&quot; .                                                                                                                      </pre><pre>[master 98dd370] Initial Commit for the test of our extension<br> 3 files changed, 61 insertions(+)<br> create mode 100644 CoenraadS.bracket-pair-colorizer-1.0.61.vsix<br> create mode 100644 devfile.yaml<br> create mode 100644 plugin.yaml</pre><p>… and push the files to the main branch</p><pre>$ git push origin </pre><p>By going back to the gist website, we can see that all links have been updated with the correct public URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUjdaNPgGRmZSeEe44fqYg.png" /></figure><p>Now it’s time to experiment our devfile by entering the command to check that online !</p><pre>$ open &quot;<a href="https://che.openshift.io/f/?url=$(git">https://che.openshift.io/f/?url=$(git</a> config --get remote.origin.url)/raw/devfile.yaml&quot;</pre><p>or if you only want the link</p><pre>$ echo &quot;<a href="https://che.openshift.io/f/?url=$(git">https://che.openshift.io/f/?url=$(git</a> config --get remote.origin.url)/raw/devfile.yaml&quot;</pre><p>I can now code with nice brackets :-)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0IcGezki-m-bHM8DB3V7A.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c2f25f5853" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/how-to-quickly-deploy-a-vs-code-extension-on-eclipse-che-d7c2f25f5853">How to quickly deploy a VS Code extension on Eclipse Che</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working offline with Eclipse Che]]></title>
            <link>https://medium.com/eclipse-che-blog/working-offline-with-eclipse-che-ee5cdb29d0ec?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee5cdb29d0ec</guid>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[rsync]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[laptop]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Wed, 29 Apr 2020 13:59:14 GMT</pubDate>
            <atom:updated>2020-04-29T13:59:14.532Z</atom:updated>
            <content:encoded><![CDATA[<h3>Working Offline with Eclipse Che</h3><p>Eclipse Che has many thousands of users. Most of them use the VS Code-inspired browser IDE, but sometimes you know you’re going to be offline for awhile and want to be able to work with a local editor, then sync back your changes when you’re back online.</p><p>Obviously if you only care about changes to the source code then git will handle this just fine. But if you want to run it offline, make changes to your tools, runtimes or dependencies then it’s great to be able to have all that synced back to Eclipse Che.</p><p>In this article we’ll cover how to set this up, by:</p><ol><li>Updating your Eclipse Che workspace to allow rsync.</li><li>Importing files into your local computer/laptop.</li><li>Edit/work with your project on your laptop</li><li>Synchronize back all code changes from your laptop to the remote workspace.</li></ol><h3>Prerequisites</h3><h3>1. On my laptop: check all tools are available</h3><ul><li>Check local installation of rsync on the laptop by trying to execute the command $ rsync.</li><li>Check installation of kubectl to execute remote rsync command.</li><li>Check installation of theoc CLI if Eclipse Che is running on OpenShift.</li></ul><p>These tools will need to be on your local machine if they’re not already.</p><h3>2. In Eclipse Che Workspace</h3><p>The rsync tool needs to be part of the workspace.</p><p>Note: with OpenShift we could use oc rsync command. But there is no exclude filter taken into account, for example. So in this blog post I will use only kubectl and rsync.</p><p>Your Eclipse Che workspaces may include several running containers. (Workspace pod). Let’s add a new container that will manage only rsync operations.</p><p>I will use the rsync tool included in the image quay.io/fbenoit/rsync-simple so no need to build it.</p><p>The image includes the following:</p><pre>FROM alpine:latest<br>...<br>RUN apk add --no-cache rsync<br>...</pre><p>As you can see this just adds the rsync tool inside the smallest container possible (based on alpine linux).</p><p>I’ve also added an entry-point to keep the container always-on, and an extra permissions to make it compliant with the random user-id generated by OpenShift.</p><h3>Workflow</h3><h3>1. Updating your Eclipse Che workspace to allow rsync</h3><p>The devfile is responsible of the definition of the Eclipse Che workspace.</p><p>Edit the devfile of the workspace from the Eclipse Che dashboard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S4LpqN66DslDBspmSlejwQ.gif" /><figcaption>Editing your Che workspace’s devfile in the Che user dashboard</figcaption></figure><p>As seen in prerequisites, rsync tool needs to be part of the workspace and by default it’s not there. Let’s add a new rsync component and let it have access to /projects folder using mountSources: true</p><p>Add this component into components section (or create a new components section first if it’s not there).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66edab7fa97cbf4ceb729fa5f344d399/href">https://medium.com/media/66edab7fa97cbf4ceb729fa5f344d399/href</a></iframe><p>Now restart the workspace to finish the inclusion of this new rsync component. You can check if you’ve been successful by opening the workspace in an IDE and opening the Workspace panel (the cube icon on the right of the IDE):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*GTpgDTQKdz5EIaKhFb4qAA.gif" /><figcaption>Checking rsync is in the workspace</figcaption></figure><h3>3. Importing files into your local computer/laptop</h3><p>To share files on our laptop and use rsync, we will need some information.</p><ol><li>kubectl ready-to-use (authentication performed)</li><li>The name of the running remote workspace pod</li><li>An rsync bash script</li></ol><h3>3.1. kubectl</h3><p>In my example, I am using the online Eclipse Che instance hosted on che.openshift.io. I will copy the command to be able to log into OpenShift instance.</p><p>I can use the OpenShift web console to do that. To get the web console link, open a terminal inside the IDE by using the Workspace panel within the IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*MhsYrMqF5OTUPDqI.gif" /></figure><p>Open a terminal inside the Theia IDE container for example. Then type:</p><pre>$ echo ${CHE_OSO_CLUSTER//api/console}</pre><p>It will display the URL of the console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*i0COfDvwSTNLulHk.png" /></figure><p>Use command+click on <a href="https://console.starter-us-east-2.openshift.com/">https://console.starter-us-east-2.openshift.com/</a><br>It will open link in default browser. Note that your workspace might be assigned to a different cluster, so the URL might be different as well.</p><p>When logged in in the OpenShift console:</p><ul><li>Open the top right corner link</li><li>Click on copy Login command and execute that command on your laptop.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cW62ijAisPJtRFrD.png" /></figure><p>copy the oc login command and execute it on your laptop:</p><pre>$ oc login <a href="https://api.starter-us-east-2.openshift.com/">https://api.starter-us-east-2.openshift.com</a> — token=tHeEnCoDeDtOkEn<br>Logged into “<a href="https://api.starter-us-east-2.openshift.com/">https://api.starter-us-east-2.openshift.com:443</a>&quot; using the token provided.</pre><p>Then use your namespace (ending with -che) using oc project &lt;namespace&gt; command:</p><pre>$ oc project &lt;namespace&gt;-che</pre><p>And we can check that the workspace pod is there by using oc get pods or kubectl get pods commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H1wbQjKPG9855lJK.png" /><figcaption>list pods using the kubectl command</figcaption></figure><h3>3.2. Name of the workspace pod</h3><p>We will copy files from the remote workspace to our local machine.</p><p>We need the name of the workspace. It is available from a terminal with the following command:</p><pre>$ echo $HOSTNAME</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FNc5U92npf5UhCs8.png" /><figcaption>Grab workspace pod name</figcaption></figure><p>Another way is to use the kubectl or oc tool to find the workspace pod name ($ kubectl get pods or $ oc get pods).</p><p>The name of the container that includes rsync is “rsync” as it’s the alias name we defined in the devfile.</p><h3>3.3. The rsync script</h3><p>To import the project files into Eclipse Che workspace, we will now use rsync.</p><p>We will need a shell script to perform the copy and this script will use kubectl exec command.</p><p>Create a new file kubectl-rsync.sh with the following content:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1f82cf9b193ebe36816e44d745cf923/href">https://medium.com/media/b1f82cf9b193ebe36816e44d745cf923/href</a></iframe><p>Don’t forget to make it executable: chmod u+x kubectl-rsync.sh and now let’s assume you copy it to ${HOME}/bin folder.</p><p>Now, let’s create another script named workspace-sync.sh</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bfddc04e933343509aeef39df9e9f0e/href">https://medium.com/media/4bfddc04e933343509aeef39df9e9f0e/href</a></iframe><p>Apply permissions by using chmod u+x workspace-sync.sh.</p><p>Copy it, for example, to ${HOME}/bin folder. We’re using the -e option in rsync parameters to specify another shell.</p><p>Now that our scripts have been setup, it’s time to use them.</p><p>First, we store the workspace pod into an env variable:</p><pre>$ export WORKSPACE_POD=workspacelmog4zkmikhxpc87.workspace-74d787cf95-xbd26</pre><p>Let’s proceed to the first import.</p><p>Assuming our remote workspace has files in /projects/ and that we want to copy workspace files it to ${HOME}/my-workspace on our laptop, execute the following command:</p><pre>$ RSYNC_OPTIONS=&quot;--progress --stats&quot; RSYNC_FROM=&quot;${WORKSPACE_POD}:/projects/&quot; RSYNC_TO=&quot;${HOME}/my-workspace&quot; ${HOME}/bin/workspace-sync.sh</pre><p>Now files are being transferred into our laptop.</p><p>We see progress due to --progress option. You may add--exclude ‘node_modules&#39; in RSYNC_OPTIONS for nodejs projects to exclude unwanted files.</p><p>In your laptop you should see my-project folder in ${HOME} directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*ts2FYhqX1f_MI4umWvhPiw.png" /><figcaption>initial import of our workspace’s files</figcaption></figure><h3>4. Edit/work with your project on your laptop</h3><p>Well here, you can do whatever you like with your project that has been synchronized to ${HOME}/my-workspace/my-project</p><p>For example if it’s a java/maven project you can run mvn command there or run yarn for nodejs project, etc.</p><h3>5. Synchronize back all the changes</h3><p>All modified files are now on your local computer so you can edit them. But at some point you’ll want those changes back in the remote Che workspace.</p><p>We’ll use the same workspace-sync.sh script but we’ll reverse the source and destination. Because now we want to copy laptop’s changes to the remote workspace and not the previous way. Also, we’ll set this time RSYNC_INFINITE=true to do rsync every 15s (to never miss local changes).</p><pre>$ RSYNC_FROM=&quot;${HOME}/my-workspace/&quot; RSYNC_TO=&quot;${WORKSPACE_POD}:/projects/&quot; RSYNC_INFINITE=&quot;true&quot; ${HOME}/bin/workspace-sync.sh</pre><p>You can drop --progress --stats from RSYNC_OPTIONS so you don’t generate too much output now that you’ve confirmed it works.</p><p>One issue is that when syncing back the changes, we don’t want to upload the whole node_modules folder. Adding the --exclude node_modules parameter takes care of that.</p><pre>RSYNC_OPTIONS=&quot;--exclude node_modules&quot;</pre><p>The script now checks all the changes every 15 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pvDlDYPzSFvS1GJoiWpkiA.png" /></figure><p>All changes from my filesystem are now inside my remote workspace.</p><p>Let’s check:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HaCqORV_sD3gozrIE847oQ.png" /><figcaption>rsync to remote workspace</figcaption></figure><h3>6. Finishing</h3><p>When we’re done working we can double-check that the rsync script has finished to copy all files remotely and then delete the project on our laptop.</p><p>One you have this all set up it’s easy to either leave it running all the time and fluidly move from editing on your laptop and editing in the cloud. Or only turn it on when you know you’ll be offline for awhile (like for a trip).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee5cdb29d0ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/working-offline-with-eclipse-che-ee5cdb29d0ec">Working offline with Eclipse Che</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Work on my laptop’s project from a remote Eclipse Che workspace.]]></title>
            <link>https://medium.com/eclipse-che-blog/work-on-my-laptops-project-from-a-remote-eclipse-che-workspace-b42c68a77e1?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b42c68a77e1</guid>
            <category><![CDATA[rsync]]></category>
            <category><![CDATA[import]]></category>
            <category><![CDATA[synchronize]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[projects]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Thu, 02 Apr 2020 21:13:38 GMT</pubDate>
            <atom:updated>2020-04-21T14:57:40.176Z</atom:updated>
            <content:encoded><![CDATA[<h3>Import a project from your laptop to an Eclipse Che workspace.</h3><p>Eclipse Che is a Kubernetes-Native IDE. It might be interesting to work on your project using remote resources instead of consuming your laptop resources. Another interesting way is to use containers that might be used in production as well.</p><p>Also let say you’re running out of battery, you may spare CPU and get extra time !</p><p>In this article we’ll cover how to set this up, by:</p><ol><li>Defining an Eclipse Che workspace for a project (create a devfile).</li><li>Starting an Eclipse Che workspace ready to receive the project.</li><li>Pushing / importing the local files into the remote Eclipse Che workspace.</li><li>Coding using Eclipse Che.</li><li>Synchronizing all code changes with rsync.</li><li>Stopping the Che workspace and even deleting it without impacting the local copy.</li></ol><h3>Prerequisites</h3><h4>1. On my laptop: check all tools are available</h4><ul><li>Check local installation of rsync on the laptop by trying to execute the command $ rsync</li><li>Check installation of kubectl to execute rsync command.</li><li>Check installation of oc if Eclipse Che is running on top of OpenShift.</li></ul><p>If these tools are not installed, please install them.</p><h4>2. In Eclipse Che Workspace</h4><p>rsynctool needs to be part of the workspace.</p><p>Note: with OpenShift we could useoc rsync command. But there is no exclude filter taken into account for example. So in this blog post I will use only kubectland rsynctools</p><p>Eclipse Che workspaces may include several running containers. (Workspace pod). Let’s add a new container that will manage only rsync operations.</p><p>For the demo, I will create a custom OCI image based on alpine. In this custom image, I will install rsync tool.</p><p>I’ve published this image under quay.io/fbenoit/rsync-simple so no need to build it.</p><p>The image includes the following:</p><pre>FROM alpine:latest<br>...<br>RUN apk add --no-cache rsync<br>...</pre><p>As you can see this just adds thersync tool inside the smallest container possible (based on alpine linux).</p><p>I’ve also added an entry-point to keep the container always-on. I added extra permissions to make it compliant with random user-id for OpenShift.</p><h4>3. A local project</h4><p>To make sure that everyone can reproduce the test, it’s important to use the same local project :-)</p><p>The project I’m using is a clone of <a href="https://github.com/che-samples/react-web-app">https://github.com/che-samples/react-web-app</a></p><p>I’ve cloned it into $HOME/react-web-app folder.</p><p>The application is a Nodejs example.</p><h3>Workflow</h3><h4>1. Define an Eclipse Che workspace for my project (create a devfile)</h4><p>Let’s start with a minimalist devfile. The devfile is responsible of creating the Eclipse Che workspace.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a5c50fc48eb50d783b62cfacd9fa073/href">https://medium.com/media/3a5c50fc48eb50d783b62cfacd9fa073/href</a></iframe><p>I set persistVolumes to false as the storage will be our laptop. I don’t want to use remote storage to save my project files.</p><p>As seen in prerequisites, rsynctool needs to be part of the workspace. Let’s add a new rsync component and let it have access to /projects folder using mountSources: true</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/04255043463039a08c75264b1a6918f8/href">https://medium.com/media/04255043463039a08c75264b1a6918f8/href</a></iframe><p>The workspace now includes the rsync tool.</p><p>Let’s add new components to work on the project with Eclipse Che.</p><p>The project that I want to import is a Nodejs project.</p><p>Now I add :</p><ul><li>Intellisense with a typescript plugin</li><li>nodejs component to have node tools.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0e50ef148d6ec9737fb5fcd3d810584/href">https://medium.com/media/f0e50ef148d6ec9737fb5fcd3d810584/href</a></iframe><h4>2. Start an Eclipse Che workspace ready to receive my project</h4><p>The workspace definition is ready with the devfile.</p><p>There are a few ways we can start the Che workspace:</p><ul><li>Importing this devfile into the Eclipse Che dashboard</li><li>Using chectl with the devfile</li><li>Opening this <a href="http://che.openshift.io/f/?url=https://gist.githubusercontent.com/benoitf/90499b50bf081ef4eb43a5cb3bb39290/raw/6b5fcb5fa9abf28693dc74ac20cb8d6c01cc4345/devfile.yaml">direct link </a>that creates and starts the workspace</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LsTwkOIAEZ1N_R4xcOB2zg.png" /><figcaption>Creating workspace from a custom devfile from dashboard</figcaption></figure><p>After the startup of the workspace, we can see the IDE. We can see that there are no files in project tree. This is normal because we want to import our local project folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQdSPCSpzoy8GWf2r4LlKQ.png" /></figure><h4>3. Push/Import into the remote Eclipse Che workspace the local files</h4><p>To push files to the remote workspace and use rsync, we will need some information.</p><ol><li>kubectl ready-to-use (authentication performed)</li><li>The name of the workspace pod</li><li>A rsync bash script</li></ol><h4>3.1. kubectl</h4><p>In my example, I am using the online Eclipse Che instance hosted on che.openshift.io. I will copy the command to be able to log into OpenShift instance.</p><p>I can use the OpenShift web console to do that. To get the web console link, open a terminal inside the IDE by using the Workspace panel within the IDE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*8tRQjynD-Vz105I7QAEMMg.gif" /><figcaption>Open a terminal inside Theia IDE container for example</figcaption></figure><pre>$ echo ${CHE_OSO_CLUSTER//api/console}</pre><p>It will display the URL of the console</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*t40cl9LnEzFjKK308q6CdQ.png" /></figure><p>Use command+click on <a href="https://console.starter-us-east-2.openshift.com/">https://console.starter-us-east-2.openshift.com/</a><br>It will open link in default browser.<br>Note: your cluster might be different so the URL might be different as well.</p><p>When logged in in the OpenShift console:</p><ul><li>Open the top right corner link</li><li>Click on copy Login command and execute that command on your laptop.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74zeKYsoqUWIr6hIMx3keQ.png" /><figcaption>copy oc login command</figcaption></figure><p>You should be now connected from your laptop to the OpenShift cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hejFl6A3OUzstkjPNjZDUg.png" /><figcaption>list pods using the kubectl command</figcaption></figure><h4>3.2. Name of the workspace pod</h4><p>We will copy files from the remote workspace.</p><p>We need the name of the workspace. It is available from a terminal with the following command:</p><pre>$ echo $HOSTNAME</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e94TBeKu3SR2HLmA5AXrRg.png" /><figcaption>Grab workspace pod name</figcaption></figure><p>Another way is to usekubectl or octool to find the workspace pod name ($ kubectl get podsor $ oc get pods).</p><p>Name of the container that includes rsync is rsync as it’s the alias name we defined in the devfile.</p><h4>3.3. The rsync script</h4><p>To import the project files into Eclipse Che workspace, we will now use rsync.</p><p>We will need a shell script to perform the copy and this script will use kubectl exec command.</p><p>Create a new file kubectl-rsync.sh with the following content:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1f82cf9b193ebe36816e44d745cf923/href">https://medium.com/media/b1f82cf9b193ebe36816e44d745cf923/href</a></iframe><p>And make it executable: chmod u+x kubectl-rsync.sh and now let’s assume you copy it to ${HOME}/bin folder.</p><p>Now, let’s create another script named workspace-sync.sh</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bfddc04e933343509aeef39df9e9f0e/href">https://medium.com/media/4bfddc04e933343509aeef39df9e9f0e/href</a></iframe><p>Apply permissions by using chmod u+x workspace-sync.sh</p><p>Copy it for example to ${HOME}/bin folder. We’re using the -e option in rsync parameters to specify another shell.</p><p>Now that our scripts have been setup, it’s time to use them.</p><p>First, we store the workspace pod into an env variable:</p><pre>$ export WORKSPACE_POD=workspacelmog4zkmikhxpc87.workspace-74d787cf95-xbd26</pre><p>Let’s proceed to the first import.</p><p>Assuming our local Nodejs app is in ${HOME}/react-web-app, execute the following command:</p><pre>$ RSYNC_OPTIONS=&quot;--progress --stats --exclude &#39;node_modules&#39;&quot; RSYNC_FROM=&quot;${HOME}/react-web-app&quot; RSYNC_TO=&quot;${WORKSPACE_POD}:/projects/&quot; ${HOME}/bin/workspace-sync.sh</pre><p>Files are being transferred into the remote workspace.</p><p>We see progress due to --progress option.</p><p>In the UI now we see react-web-app folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ILdTv5LWAp_oHzVmIrO1A.png" /><figcaption>After initial sync</figcaption></figure><h4>4. Code using Eclipse Che</h4><p>Let’s use yarn command to launch the project inside Eclipse Che.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*stAPWxgcnhcvPkSgqTto4g.gif" /><figcaption>yarn</figcaption></figure><p>And now start the webapp using yarn start command inside /projects/react-web-app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1MlP-Ejs6JS8fBniZZUMHw.gif" /></figure><p>And edit src/App.tsx file and see the result.</p><h4>5. Synchronize back all the changes</h4><p>All modified files are in my Eclipse Che workspace. But I want to keep my local folder on my laptop in sync with my new remote changes.</p><p>We’ll use the same workspace-sync.sh script but we’ll reverse the source and destination. Because now we want to copy remote changes to the laptop and not the previous way. Also, we’ll set this time RSYNC_INFINITE=true to do rsync every 15s (to never miss remote changes).</p><pre>$ RSYNC_OPTIONS=&quot;--exclude node_modules&quot; RSYNC_FROM=&quot;${WORKSPACE_POD}:/projects/react-web-app/&quot; RSYNC_TO=&quot;${HOME}/react-web-app/&quot; RSYNC_INFINITE=&quot;true&quot; ${HOME}/bin/workspace-sync.sh</pre><p>I dropped --progress --stats from RSYNC_OPTIONS to not generate too much output.</p><p>One issue is that when syncing back the changes, we don’t want to download the whole node_modules folder. Adding the --exclude node_modules parameter takes care of that.</p><p>The script now checks all the changes every 15 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8fhfbCvpuX2FX7RRDF-9A.png" /></figure><p>All changes from Eclipse Che workspace are now inside my filesystem.</p><p>Let’s check:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*ukJ137UX5FqrEehw3jd-7g.png" /></figure><h4>6. Finishing</h4><p>When we’re done working we can double-check that the rsync script has finished to copy all files to my laptop, then stop the Eclipse Che workspace. We can even delete the stopped Che workspace as we have all the up-to-date changes saved on our local drive.</p><p>Note: With persistVolumes=false , restarting the workspace will result in an empty project tree again until you re-run the laptop-to-remote-Che sync script.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b42c68a77e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/work-on-my-laptops-project-from-a-remote-eclipse-che-workspace-b42c68a77e1">Work on my laptop’s project from a remote Eclipse Che workspace.</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discover Che 7 : devfile]]></title>
            <link>https://medium.com/eclipse-che-blog/discover-che-7-devfile-85a8cc83d860?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/85a8cc83d860</guid>
            <category><![CDATA[devfile]]></category>
            <category><![CDATA[eclipse]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Wed, 02 Oct 2019 14:32:35 GMT</pubDate>
            <atom:updated>2019-10-02T14:32:35.889Z</atom:updated>
            <content:encoded><![CDATA[<h3>Discover Eclipse Che 7 : devfile</h3><h4>Developer environments as code</h4><p><a href="https://che.eclipse.org/discover-eclipse-che-7-7515e74a99ca">In a previous blog post</a>, we’ve experimented ready-to-use workspaces and how to write/run/debug code easily.</p><p>But when we are open a ready-to-use workspace, it seems that there is some magic:</p><ul><li>The runtime already has language tooling</li><li>There is code completion with pre-installed plug-ins for the given language</li><li>The project is already cloned into the workspace, and we have commands to build, debug and manipulate the runtime</li></ul><p>In this blog post, we’ll discover what drives this workspace magic: the devfile.</p><h4>Definition</h4><p>A devfile defines the configuration of the workspace, which is the developer’s environment. This definition is portable - we can create any number of identical workspaces from the same devfile. Anyone can share a devfile and everyone using this devfile will get the same workspace including projects, tooling, commands, etc…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/0*o_SxIc5VuMqc0BtS.png" /><figcaption>devfile definition</figcaption></figure><h4>Explore</h4><p>To make exploration easier, we’ll use the hosted Eclipse Che service (version 7) run by Red Hat at <a href="https://che.openshift.io/">https://che.openshift.io</a>.</p><p>For our example, let’s start with a pre-built workspace Stack: From the user dashboard, click on Stacks in the left nav bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*edyrQNdKqzpJC9jhh3MQLA.png" /><figcaption>Starting with Stacks is the easiest way to begin working with devfiles</figcaption></figure><p>Now click on Python stack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rOhOHjaU4cdimuJXeGjlA.png" /><figcaption>Python stack selection</figcaption></figure><p>The raw configuration section shows the devfile content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYww8WAOL7YbRjhNzFwWxQ.png" /><figcaption>The Python devfile</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/390875aafc23063ff443c20f84d0c612/href">https://medium.com/media/390875aafc23063ff443c20f84d0c612/href</a></iframe><h3>Deconstructing the devfile</h3><h4>Metadata</h4><p>metadata.generateName is used for the workspace prefix name. When a user creates a workspace from the devfile, their workspace name will be named python-&lt;random-4-digits-id&gt;. By using instead of generateName metadata.name there will be no prefix so workspace names will all use only that name, however, if a single user tries to create a second workspace from the same devile, they’ll get an error notifying them that they can’t create another workspace because one with that name already exists.</p><h4>Projects</h4><p>Describes the projects to clone into the workspace. The type field can be git or zip. In this case, we’re using git so we specify the repository URL (there can be multiple URLs to clone in multiple projects).</p><pre>projects:<br> -<br>  name: python-hello-world<br>  source:<br>   type: git<br>   location: &#39;<a href="https://github.com/che-samples/python-hello-world.git&#39;">https://github.com/che-samples/python-hello-world.git&#39;</a></pre><p>Alternatively, when using the zip type you can link to a zip file containing the project source code.</p><h4>Components</h4><p>This example devfile uses two kind of components: a Che plug-in and a docker image.</p><pre>-<br>  type: <strong>chePlugin</strong><br>  id: ms-python/python/latest<br>  memoryLimit: 512Mi<br> -<br>  type: <strong>dockerimage</strong><br>  alias: python<br>  image: &#39;quay.io/eclipse/che-python-3.6:nightly&#39;<br>  memoryLimit: 512Mi<br>  mountSources: true</pre><p>The cheplugin type is used for plugins in the Eclipse Che plug-in registry. The id field includes the vendor name, name and version divided by slashes. In this case, latest is an alias to the latest stable definition of the plug-in. This Che Plug-in is a VS Code extension that is instantiated in a sidecar container with its own code and dependencies. This is held outside the source code container so that it doesn’t “pollute” the behaviour of the project itself.</p><p>The dockerimage type is used to generate the runtime container. In this case that includes everything in the che-python-3.6 nightly container build. The alias is what will be used to identify this container when we want commands executed in it (we’ll cover that in the next section). Setting the mountSources flag to true will make the projects source code available inside this container. Typically in the/projects folder. If you make it false then there will be no folder that uses attached storage (this is fine for certain use cases like teaching examples where code changes don’t need to be retained after the course unit is completed).</p><p>memoryLimit can be given in either case to change the default memory allocation.</p><h4>Commands</h4><p>Commands defined in the devfile will be available in the IDE.</p><pre>commands:<br>-<br>  name: run<br>  actions:<br>   -<br>    type: exec<br>    component: python<br>    command: python hello-world.py<br>    workdir: &#39;${CHE_PROJECTS_ROOT}/python-hello-world&#39;</pre><p>In this example a new run command is defined. It is executing the hello-world.py source file with the python interpreter. The working directory is set with the workdir line.</p><p>The component: python line tells Che to execute this command in the container with the python alias (we defined that in the section above).</p><p>Variables can be used in commands like ${CHE_PROJECTS_ROOT} to specify the folder where the source code is mounted in the container.</p><h4>Experiment with devfiles for yourself</h4><p>You can click on different stacks from the Che user dashboard and see the associated devfile — this is a great way to discover more examples.</p><p>Read about the full devfile schema at <a href="https://redhat-developer.github.io/devfile/devfile">https://redhat-developer.github.io/devfile/devfile</a></p><h3>Get Involved!</h3><p><a href="http://www.eclipse.org/che/docs/#getting-started">Quick Start with Eclipse Che</a>.</p><p>Join the community:</p><ul><li><strong>Support</strong>: You can ask questions, report bugs, and request features using <a href="https://github.com/eclipse/che/issues">GitHub issues</a>.</li><li><strong>Public Chat</strong>: Join the public <a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-che">eclipse-che</a> Mattermost channel to discuss with community and contributors.</li><li><strong>Weekly Meetings</strong>: Join us in our <a href="https://github.com/eclipse/che/wiki/Che-Dev-Meetings">Che community meeting</a> every second monday.</li><li><strong>Mailing list</strong>: che-dev@eclipse.org</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85a8cc83d860" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/discover-che-7-devfile-85a8cc83d860">Discover Che 7 : devfile</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discover Eclipse Che 7]]></title>
            <link>https://medium.com/eclipse-che-blog/discover-eclipse-che-7-7515e74a99ca?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7515e74a99ca</guid>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Thu, 26 Sep 2019 15:11:51 GMT</pubDate>
            <atom:updated>2019-09-26T15:11:51.219Z</atom:updated>
            <content:encoded><![CDATA[<h4>Get a tour of Eclipse Che 7 — and discover the new exciting features !</h4><p>Eclipse Che 7 has been announced few days ago, if you have not yet tried it, it’s time to experiment with all the new exciting capabilities!</p><p>This guide will drive you through different steps and allow you to experiment Che 7. To follow this guide, you’ll not need to install Che on your machine or your K8S cluster, we’ll just be using a free online instance of Eclipse Che that is running at <a href="https://che.openshift.io/">https://che.openshift.io</a></p><p>It’s a free-to-use instance that is powered by latest Eclipse Che 7 version and providing 3GB of memory for a single workspace. It requires a Red Hat Developer account but you can log-in with different third parties accounts like github, facebook, google, twitter, etc.</p><h3>Pre-requisities</h3><ul><li>Go to <a href="https://che.openshift.io/">https://che.openshift.io</a> and log-in or create an account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zP2mhFXfO1JpH6LWA3ElYQ.png" /><figcaption>che.openshift.io login page</figcaption></figure><ul><li>After creating a new account or simply log-in, you’re redirected to the dashboard page of Eclipse Che</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5GPheEfQ0cBPlt2f8ZcDA.png" /><figcaption>User Dashboard</figcaption></figure><h3>Discovering Che Workspaces</h3><p>Eclipse Che is using containers under the hood. It means all runtimes used in workspaces can be customized by some docker images: for example java runtime, nodejs runtime, etc. are provided on top of docker images.</p><p>But as it may be difficult to start by writing or providing first a Docker image, there are default ready-to-use workspace templates.</p><p>These ready-to-use workspaces are provided on top of community Docker images and are great to start to work on a given technology.</p><h4>Create a workspace</h4><p>Let’s create a simple go application</p><ul><li>On the dashboard, click “Create Workspace”</li><li>In the select stack section, click on go</li><li>Check that in projects section, example is selected</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cO5DKBY8AK_SV3pkbyJR8Q.gif" /><figcaption>create a go workspace</figcaption></figure><ul><li>After clicking on create &amp; open button we’re redirected to the IDE</li></ul><p><em>Note</em>: we use ephemeral mode flag as we don’t care about persisting changes for demos and want the fastest I/O storage.</p><h3>Discover the new IDE!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLTYUqtjMbGwq74hW2bxRw.png" /><figcaption>IDE welcome screen</figcaption></figure><p>In the IDE, there are several useful areas/panels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*hojbuZ8bNivG9Z191fxI9w.png" /><figcaption>View files</figcaption></figure><p>Clicking on the top left file icon will display all the files of the current workspace.</p><h4>Command palette</h4><p>Press F1 key or click on the command palette link in the Welcome Panel. Enter some keyword to filter out commands. Formatting can be done easily with a specific command invoked from command palette. Keyboard shortcuts are displayed on the right of the command. No need to bring command palette and select a command if you already know its shortcut.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*vV-Hbn81mE6uwmIOGMcNzA.png" /><figcaption>command palette</figcaption></figure><h4>Workspace panel</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YnWLY1ritG5ox-uB39vLGQ.png" /><figcaption>workspace panel</figcaption></figure><p>The workspace panel is a quick view allowing to interact with the workspace like launching pre-defined commands for this workspace or opening terminals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*RR_dBL6BgRdNEBf20HLNEQ.png" /></figure><p>There are two kind of containers:<br> — <em>Plugin’s runtime containers</em>: containers provided by plug-ins. It’s the execution runtime used by these plugins</p><p>— <em>User runtime container</em>: We may not have it at all or more than one. It’s used to run some commands you would like. All these commands can be found by using the command palette and using Run Task</p><p>By clicking on a command name (single click, no double-click), like run outyet it will invoke this command in the go-cli container. You may open a terminal as well from this view by clicking on New terminal link. Terminals can be opened on any containers.</p><h4>Status bar</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oqbKbfKGs1fJ6DypUYfjg.png" /><figcaption>status bar</figcaption></figure><p>Blue bar means that IDE is remotely connected to the workspace server. In case of connection failures, the bar will turn into orange and there is a text saying offline. Information like git information orephemeral mode are also displayed.</p><h3>Language tooling</h3><p>Ready-to-go workspaces are already providing the tooling for the selected language so no need to install plug-ins after in order to work on a project.</p><p>From the view/Plugins panel we can see that we already have go plug-in installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*XBcHoTOTvi693F3UqVCx9w.png" /><figcaption>Enabling Plug-ins view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*kCMiGIFWI-ZmDUM6kJwvLQ.png" /><figcaption>go plug-in already installed</figcaption></figure><p>by opening file src/github.com/golang/example/outyet/main.go there is already syntax highlighting in the go file.</p><p>Debugging is also easy. Just create a new launch configuration for go.</p><h4>Debugging the application</h4><p>After opening the debugger panel by going into the menu: View --&gt; Debug</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*zvqxk2R7Cfe9QopVGpiEHw.png" /><figcaption>open Debug view</figcaption></figure><p>Then, in the Debugger panel, click on the dropdown of the configurations and click on Add Configuration...</p><p>note: it’s also possible to add configurations by clicking in menuDebug/Add Configuration...</p><p>Using the code completion, select the Go: Launch file entry and let the default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i9er0ybeODHJTCRbVRJvEw.gif" /><figcaption>add go debug entry</figcaption></figure><p>Now, just hit some breakpoints in the code by clicking on the space before the line number</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*UyEyKnAxQ8m5B6Kgh2OA4A.gif" /><figcaption>setting a breakpoint</figcaption></figure><p>And launch the debug configuration (default name will Launch File )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_id4uipZuON1XSJVA08vCg.gif" /><figcaption>debugging with go</figcaption></figure><p>All options like step-in, step-out, resume, etc. are available in the debugger.</p><p>Inline operations are also available in the editor when you edit test files.</p><p>Opening file src/github.com/golang/example/outyet/main_test.go file and then going on test functions will display run/debug options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_H8IYlp74poxhyyLSg3xQ.gif" /><figcaption>quick run/debug for the tests</figcaption></figure><p>Now, you’re ready to experiment Eclipse Che on your own!</p><h3>Get Involved!</h3><p><a href="http://www.eclipse.org/che/docs/#getting-started">Quick Start with Eclipse Che</a>.</p><p>Join the community:</p><ul><li><strong>Support</strong>: You can ask questions, report bugs, and request features using <a href="https://github.com/eclipse/che/issues">GitHub issues</a>.</li><li><strong>Public Chat</strong>: Join the public <a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-che">eclipse-che</a> Mattermost channel to discuss with community and contributors.</li><li><strong>Weekly Meetings</strong>: Join us in our <a href="https://github.com/eclipse/che/wiki/Che-Dev-Meetings">Che community meeting</a> every second monday.</li><li><strong>Mailing list</strong>: che-dev@eclipse.org</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7515e74a99ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/discover-eclipse-che-7-7515e74a99ca">Discover Eclipse Che 7</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eclipse Che 7 — Extending developer workspaces to run VS Code extensions in the cloud.]]></title>
            <link>https://medium.com/eclipse-che-blog/eclipse-che-7-extending-developer-workspaces-to-run-vs-code-extensions-in-the-cloud-cbe97e11d4d4?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbe97e11d4d4</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[eclipse-theia]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Thu, 17 Jan 2019 10:42:21 GMT</pubDate>
            <atom:updated>2019-01-17T10:42:21.618Z</atom:updated>
            <content:encoded><![CDATA[<h3>Eclipse Che 7 — Extending developer workspaces capabilities to run VS Code extensions in the cloud</h3><p>Over the last month, the Eclipse Che community has been adopting Eclipse Theia as the default web IDE provided with Che developer workspaces. We’ve enriched the Eclipse Theia with a plug-in model to provide VS Code extension compatibility. This blog post explain why we decided to add the plug-in model to Eclipse Theia and what are the benefits when it’s used with Eclipse Che developer workspaces .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lQP7_HqXIafdcecV.jpg" /></figure><p>In <a href="https://www.eclipse.org/che">Eclipse Che</a> 6, it is possible to develop and plug-ins on top of the GWT IDE but it is not possible to load them at runtime without stopping/recompiling and then reloading the IDE.</p><h3>The Requirements</h3><p>A lot of people wanted to improve that extensibility model. For the upcoming version of <a href="http://eclipse.org/che">Eclipse Che</a>, Che 7, we ended up with the following requirements:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*G2fjiJG3NWqw8hPWJgVDfg.png" /></figure><ol><li>Plug-ins should be loaded at runtime easily and it should not involve any compilation step at that time. Plug-in should be already compiled and IDE should only load the code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*vUEntDKhbofTukMqGgyKkg.png" /></figure><p>2. A plug-in shouldn’t break the whole IDE if it is not well written. For example if I load a broken plug-in, I should still be able to use the current IDE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*rNDJzvEAo17bvtMVjEdQ0g.png" /></figure><p>3. In <a href="http://eclipse.org/che">Eclipse Che</a>, we wanted to guarantee that any plug-in shouldn’t block the main functions of the IDE like opening a file or typing. It could allow to identify if it’s the main product that has issue or if it’s due to a specific plug-in. Also, if two plug-ins are relying on the same dependency but in different versions it shouldn’t be a problem as well, each plug-in using its own dependency.</p><h3>Existing IDE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*DAEuLnhX-i4Xy0rbuQfLiQ.png" /><figcaption>GWT IDE in Eclipse Che 6</figcaption></figure><p>The current IDE (Eclipse Che 6) requires to recompile the whole IDE when a new plug-in is added. Some experiments were made to use <a href="http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJsInterop.html">JS-Interop</a> to dynamically load JavaScript plug-ins. But we need to take into consideration that many people dislike GWT, by saying it’s a technology of the past.</p><p>The API provided is a low-level API. It’s a great API but as you can change everything you can also break everything. And it is difficult to know each entry point.</p><h3>Alternative</h3><p><a href="https://www.eclipse.org/theia">Eclipse Theia</a> has been considered to be the alternative IDE in <a href="http://eclipse.org/che">Eclipse Che</a>. This IDE can be embedded and used in <a href="http://eclipse.org/che">Eclipse Che</a> as it’s a web based IDE and use modern technologies like <a href="https://reactjs.org/">React</a> and is written in <a href="https://www.typescriptlang.org/">TypeScript</a>. This IDE had only a single extension model: Theia extension.</p><p>The problem is that this extension model was mainly designed to develop customs IDE so it has issues for our requirements:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*RkQfX6SQfxESxkNPdcBXaw.png" /></figure><p>With Eclipse Theia extensions, once a new Theia extension is added, the whole IDE is recompiled. If an extension is not so clean, you may broke the full IDE. It’s a problem when you want to allow users to add custom plug-ins.<br>Let’s imagine you open a Che workspace and you see a blank page due to a compilation failure instead of the IDE…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*iL2dsirgV1lc9hnEv4uE3g.png" /></figure><p>Extensions are retrieved from npmjs repository. It’s nice but npmjs has tons of libraries and when you install an extension, it will download all dependencies again and again. If you’ve many dependencies, it may break. You might want to use a local repository easily as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*v9Q4xIot0okskDI8IfXmPw.png" /></figure><p>Theia extensions allow to customize the whole IDE but as for the GWT IDE in Eclipse Che 6, extensions may easily break the full IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*WGG-1miS8yq1iguGoDip4w.png" /></figure><p>It’s very nice when you are advanced users or power users but when you want to write your first extension, you’ve to master <a href="http://inversify.io/">inversify</a> and dependency injection and also you need to know which class is doing what and which interface you need to implement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*eapMvHtrxK92E9wYh9CV-A.png" /></figure><p>So this extension model was not matching the requirements. At Red Hat, we decided to bring another extensibility model into Eclipse Theia: the Theia plug-ins</p><h3>Theia plug-ins</h3><p>This new extensibility model has been integrated into Eclipse Theia upstream.</p><p>Here are key aspects of Theia plug-ins:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*hgD983O-549v2IzMMmx-SA.png" /></figure><p>Plug-ins can be loaded at any time at the runtime without having to restart/refresh the IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*5Gyw2iLfSa-bIdwoVS5czQ.png" /></figure><p>Eclipse Theia plug-ins are packaged into .theia files and contain all the runtime code for the plug-ins. No need to download anything else when you load this plug-in at runtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*9l4NrkIGBqwvCR1ibEOUtQ.png" /></figure><p>You might want to bring a dependency injection framework into your plug-in but it’s up to you. The model is as simple as importing only once namespace @theia/plugin (through npmjs package @theia/plugin) and you can get all stuff from this entry point with code completion on this object. Then you implement the lifecycle of your plug-in by implementing startand stop functions.</p><h4>Sample code of a theia plug-in</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e69c1f554c32a8f5e0772994d2a0448d/href">https://medium.com/media/e69c1f554c32a8f5e0772994d2a0448d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*zY8tCWOmX4YpUF5M0DtfOw.png" /></figure><p>It is a protocol. It means that we can run plug-ins anywhere. Some plug-ins can run in worker threads of the browser (they are called frontend plug-ins) or it can run on server side on separate processes (backend plug-ins). It’s easy to handle other kind of namespace, including VS Code extensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*N7ch7PdCcOkKtcknz-5jkQ.png" /><figcaption>Architecture</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*HbPE-preYemMYHCBHeSX9g.png" /></figure><p>It’s backward compliant. As plug-in model is provided through a TypeScript declaration file, even if the implementation of this model is entirely rewritten or if code refactoring is done on many Eclipse Theia classes, the model stay unchanged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*hKt1gsZTkWN0glPnJKfu4w.png" /></figure><p>As it’s a high level API, you may not be able to break the whole IDE but you may not do what you want in the way you want but surely there are many possibilities.</p><h4>Container Ready</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*n5Acsc2XWmy9RJVy6vSWQw.png" /></figure><p>Eclipse Che is using containers for the tooling. Theia plug-ins are written in TypeScript/Javascript and it works well. But sometimes, plug-ins writers need some dependencies that are not only pure npmjs dependencies. For example if people write a Language Server for Java, this plug-in will probably require java. So it might implies that the container that runs Eclipse Theia should have java already installed on it.</p><p>This is why in Eclipse Che, it’s possible to run each Eclipse Theia plug-in in its own container, allowing to use any system dependency from this plug-in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWMXjumXc-n3dH2UvTyDug.png" /></figure><p>By default all plug-ins are executed as separate processes in the Theia container.</p><h3>VS Code Extensions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/1*kPPtr8GFjknmji2-pTECEQ.png" /></figure><p>Eclipse Theia Plug-in protocol being extensible, support of VS Code API is being added inside Eclipse Theia. It allows to have some VS Code extensions running inside Eclipse Theia.</p><p>For example it’s possible to use SonarLint VS Code extension from VS Code marketplace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/0*gZ8B07jSd6On5t--" /><figcaption>marketplace with SonarLint extension</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*BCuitm8DmPZIR8zqm5bVrA.gif" /><figcaption>Load at runtime the SonarLint VS Code extension and see the immediate results in a javascript file.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/0*PHuAGo4Blrt99k_q" /><figcaption>Plug-ins view of Eclipse Theia with SonarLint VS Code extension</figcaption></figure><h3>Try Eclipse Che 7 Now!</h3><p>Want to give a try to the new version of Eclipse Che 7? Try the following:</p><p><strong>Click on </strong>the following factory URL : <a href="https://che.openshift.io/f?id=factoryvbwekkducozn3jsn">https://che.openshift.io/f?id=factoryvbwekkducozn3jsn</a></p><p><strong>Or Create your account</strong> on <a href="https://che.openshift.io/">che.openshift.io</a>, <strong>create a new workspace</strong> and select “Che 7” stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PChYzMeZ55Q7dJ4c3A1WSA.png" /></figure><p>You can also test that <strong>locally</strong>, by installing the latest version of Eclipse Che: <a href="http://www.eclipse.org/che/docs/#getting-started">Quick Start with Eclipse Che</a>.</p><h3>Want to learn more?</h3><p>Blog post about Eclipse Che 7:</p><ul><li>Read the <a href="https://medium.com/p/64d79b75ca02">blog post serie about Eclipse Che 7</a>.</li></ul><h3>Get Involved!</h3><p><a href="http://www.eclipse.org/che/docs/#getting-started">Quick Start with Eclipse Che</a>.</p><p>Join the community:</p><ul><li><strong>Support</strong>: You can ask questions, report bugs, and request features using <a href="https://github.com/eclipse/che/issues">GitHub issues</a>.</li><li><strong>Public Chat</strong>: Join the public <a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-che">eclipse-che</a> Mattermost channel to discuss with community and contributors.</li><li><strong>Weekly Meetings</strong>: Join us in our <a href="https://github.com/eclipse/che/wiki/Che-Dev-Meetings">Che community meeting</a> every second monday.</li><li><strong>Mailing list</strong>: che-dev@eclipse.org</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbe97e11d4d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/eclipse-che-7-extending-developer-workspaces-to-run-vs-code-extensions-in-the-cloud-cbe97e11d4d4">Eclipse Che 7 — Extending developer workspaces to run VS Code extensions in the cloud.</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Eclipse Che on Kubernetes using Docker Desktop for mac]]></title>
            <link>https://medium.com/eclipse-che-blog/running-eclipse-che-on-kubernetes-using-docker-desktop-for-mac-5d972ed511e1?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d972ed511e1</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker-desktop]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[docker-for-mac]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Tue, 06 Nov 2018 13:31:31 GMT</pubDate>
            <atom:updated>2021-04-15T05:36:43.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running Eclipse Che on Kubernetes using Docker Desktop on macOS or Windows</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rRRujynH7bO_K-jNF-qOlQ.png" /></figure><p><a href="https://www.docker.com/products/docker-desktop">Docker Desktop</a> on macOS (and on windows) is embedding Kubernetes since several releases.</p><p><a href="https://blog.docker.com/2018/01/docker-mac-kubernetes/">Docker for Mac with Kubernetes - Docker Blog</a></p><p>Kubernetes being a standard of deploying cloud applications, let’s try to use this embedded Kubernetes directly provided by Docker Desktop instead of using another Kubernetes installation like by installing <a href="https://github.com/kubernetes/minikube">minikube</a>.</p><p>First, check that a recent version of Docker Desktop is installed. Click on the whale in status bar and click on About Docker menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*_Mn0avDmIOqIyTNzbRTqgQ.png" /><figcaption>About docker</figcaption></figure><p>Running the latest stable edition should be fine. (18.06)</p><p>Eclipse Che will start several containers, let’s ensure that docker setup has enough memory to handle that. Here I used 4GiB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9Uo4gIGiHHVrR4Ql-_VTqg.png" /></figure><p>Then, check that kubernetes is enabled on your Docker Desktop instance.</p><p>In preferences menu, check Enable Kubernetes is checked and that default orchestrator is Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*FlQ-iFN4WqIl0HDoLYrFMg.png" /><figcaption>Preferences</figcaption></figure><p>After applying changes, two green lights should be displayed:</p><ul><li>Docker is running</li><li>Kubernetes is running</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*U_8F-U8xH-d1GpUvVriD-w.png" /><figcaption>Docker and Kubernetes are running</figcaption></figure><p>⚠️ it may take some time to have Kubernetes running.</p><p>If you think your local setup is broken you may reset Kubernetes by clicking on Reset Kubernetes clusterbutton in Reset menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*bAZ14XCrquy8_4DLhfmWkg.png" /></figure><p>Ok, now Kubernetes is running. Green lights are on.</p><p>Please verify that the context is the right one (docker-for-desktop ). If you already played with some other kubernetes tools, you may have a very big list there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*H8N98wUCU6v1pz8U3Dk3Qw.png" /></figure><p>Let’s check by using some kubernetes commands: kubectl</p><pre>$ kubectl get services</pre><pre>NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE<br>kubernetes   ClusterIP   10.96.0.1    &lt;none&gt;        443/TCP   4h</pre><h4>Update January, 2020:</h4><p>You can install Eclipse Che by using chectl tool <a href="https://github.com/che-incubator/chectl#installation">https://github.com/che-incubator/chectl#installation</a> that will do all the steps for you</p><pre>$ chectl server:deploy --platform=docker-desktop --installer=helm</pre><h4>Previous manual install:</h4><p>Before deploying Eclipse Che we need an Ingress controller. We’ll use nginx</p><p><a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md#docker-for-mac">kubernetes/ingress-nginx</a></p><p>and use the following commands to deploy it.</p><pre>$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.34.1/deploy/static/provider/cloud/deploy.yaml</pre><p>The <a href="https://helm.sh/">Helm</a> product will be used to deploy Eclipse Che. Let’s install it.</p><p><a href="https://github.com/helm/helm/blob/master/docs/install.md#installing-the-helm-client">helm/helm</a></p><p>On macos it can be installed with homebrew (brew install kubernetes-helm)or with direct link <a href="https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-darwin-amd64.tar.gz">https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-darwin-amd64.tar.gz</a></p><p>Then you can check helm is there by invoking helm command</p><pre>$ helm version</pre><pre>Client: &amp;version.Version{SemVer:&quot;v2.11.0&quot;, GitCommit:&quot;2e55dbe1fdb5fdb96b75ff144a339489417b146b&quot;, GitTreeState:&quot;clean&quot;}</pre><pre>Server: &amp;version.Version{SemVer:&quot;v2.11.0&quot;, GitCommit:&quot;2e55dbe1fdb5fdb96b75ff144a339489417b146b&quot;, GitTreeState:&quot;clean&quot;}</pre><p>Now, let’s clone Eclipse Che code in order to get deployment files. (We will grab 6.13.0 release source code)</p><pre>$ git clone -b &#39;6.13.0&#39; --single-branch --depth 1 <a href="https://github.com/eclipse/che">https://github.com/eclipse/che</a></pre><p>Then we go in che/deploy/kubernetes/helm/che folder.</p><pre>$ cd che/deploy/kubernetes/helm/che</pre><p>Then we need a tiller (<a href="https://docs.helm.sh/install/#installing-tiller">https://docs.helm.sh/install/#installing-tiller</a>) service which is the server side component of helm CLI that can be installed by following commands:</p><pre>$ kubectl create serviceaccount tiller --namespace kube-system<br>$ kubectl apply -f ./tiller-rbac.yaml<br>$ helm init --service-account tiller</pre><p>OK, now we’re able to deploy Eclipse Che on top of Kubernetes/Helm. Eclipse Che workspaces need to discuss with Eclipse Che master instance.</p><p>We might be able to use localhost IP address for accessing Eclipse Che master but then localhost will fail inside the new container as it’s not a remote address. Instead, we will pickup the cluster IP address which will be accessible locally and remotely from a container. In order to grab that IP we launch the command. It’s the value under CLUSTER-IP field.</p><pre>$ kubectl get services --namespace ingress-nginx<br>NAME          TYPE         CLUSTER-IP    EXTERNAL-IP   PORT(S)                      <br>ingress-nginx LoadBalancer 10.110.237.20 localhost     80:31763/TCP</pre><p>Let’s use jsonpath to grab that value automatically</p><pre>$ export CHE_DOMAIN=$(kubectl get services --namespace ingress-nginx -o jsonpath=&#39;{.items[*].spec.clusterIP}&#39;)</pre><p>Then add this IP address as an alias of localhost (root password will be asked)</p><pre>$ sudo ifconfig lo0 alias ${CHE_DOMAIN}</pre><p>ℹ️ Alias is temporary. After a reboot it will be gone. It can be removed using the following command. (you may replace CHE_DOMAIN by a specific ip address if you don’t have anymore value of CHE_DOMAIN). ifconfig lo0 command displays all the aliases.</p><pre>$ sudo sudo ifconfig lo0 -alias ${CHE_DOMAIN}</pre><p>On Windows (thanks <a href="https://medium.com/u/cd65b757b30b">Gerben Oolbekkink</a>) the IP alias can be added with:</p><pre>$ <em>netsh interface ip add address Loopback &lt;Cluster-IP&gt; 255.255.255.255</em></pre><p>Check that all pods are in runningstate (customize the columns to make it more readable on medium)</p><pre>$ kubectl get pods --all-namespaces -o custom-columns=NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.phase</pre><pre>NAMESPACE       NAME                                         STATUS<br>docker          compose-api-85fcf6ff58-5lbfr                 Running<br>docker          compose-f6b797fc9-l9bmk                      Running<br>ingress-nginx   nginx-ingress-controller-f88c75bc6-fnqb2     Running<br>kube-system     etcd-docker-for-desktop                      Running<br>kube-system     kube-apiserver-docker-for-desktop            Running<br>kube-system     kube-controller-manager-docker-for-desktop   Running<br>kube-system     kube-dns-86f4d74b45-7smp2                    Running<br>kube-system     kube-proxy-wnz69                             Running<br>kube-system     kube-scheduler-docker-for-desktop            Running<br>kube-system     tiller-deploy-778f674bf5-thcvm               Running</pre><p>On Windows the following command (update) needs to be called before (thanks <a href="https://medium.com/u/cd65b757b30b">Gerben Oolbekkink</a>)</p><pre>$ helm update</pre><p>Last step, now we can deploy Eclipse Che with the command</p><pre>$ helm upgrade --install che --namespace che --set cheImage=eclipse/che-server:6.13.0 --set global.cheWorkspacesNamespace=&quot;che&quot; --set global.ingressDomain=${CHE_DOMAIN}.nip.io ./</pre><p>Eclipse Che will be accessible at <a href="http://che-che.${che_domain}.nip.io./">http://che-che.${CHE_DOMAIN}.nip.io.</a></p><p>At the end of this post, commands to update or delete Eclipse Che can be found.</p><p>Images of Eclipse Che will be pulled. Progress events can be tracked using the following command</p><pre>$ kubectl get events --namespace che  -o custom-columns=TIMESTAMP:lastTimestamp,TYPE:type,MESSAGE:message -w</pre><p>and when you’ll see the following events</p><pre>Normal    Successfully pulled image &quot;eclipse/che-server:6.13.0&quot;<br>Normal    Created container<br>Normal    Started container</pre><p>You can now check that Eclipse Che server is running</p><pre>$ kubectl get pod --namespace che</pre><pre>NAME                  READY     STATUS    RESTARTS<br>che-dc7db84fb-m9zwg   1/1       Running   0</pre><p>You can see logs by doing</p><pre>$ kubectl logs -f --namespace che pod/$(kubectl get pod --namespace che -o jsonpath=&#39;{.items[*].metadata.name}&#39;)</pre><p>If server is ready log file should contain something like:</p><pre>[INFO ] [o.a.c.http11.Http11NioProtocol 632]  - Starting ProtocolHandler [&quot;http-nio-8080&quot;]<br>[INFO ] [o.a.catalina.startup.Catalina 683]   - Server startup in 21505 ms</pre><p>When the log file is displaying “server startup in xxx ms” then, let’s use this command to open Eclipse Che:</p><pre>$ open <a href="http://che-che.${che_domain}.nip.io/">http://che-che.${CHE_DOMAIN}.nip.io</a></pre><p>It will open Eclipse Che in your favorite browser automatically with the right URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7Bxy6JmZhhJwnFo5Xp8Qg.png" /></figure><p>Then create a workspace by clicking on Add Workspace button. Select Java stack, add console java project and click on create button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFVs8flj2h6jy-Dl7BUBBg.gif" /><figcaption>Create a new workspace</figcaption></figure><p>And once you’re redirected into the IDE, click on the play button to start the Java command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*2GKX4weker6YBdpQqtNyNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8cY7_NK1vBo4BmLYZQxAkw.gif" /><figcaption>Running a java command</figcaption></figure><p>Congrats 🚀 🎆 !!! your Eclipse Che instance is now running on top of Kubernetes provided by Docker Desktop for mac.</p><h4>Command to update Eclipse Che</h4><p>Let say someone want to update the current Eclipse Che 6.13.0 image to the nightly image of che server. It can de done using the following command</p><pre>$ helm upgrade che --set cheImage=eclipse/che-server:nightly --reuse-values .</pre><p>Command to uninstall Eclipse Che</p><p>In order to get remove Eclipse Che with helm, helm provides a delete option:</p><pre>$ helm delete che --purge</pre><p>👏 to <a href="https://medium.com/u/2f216595f6c7">Mario Loriedo</a> and <a href="https://medium.com/u/f587dade21ac">Stevan Le Meur</a> for the review and great feedback.</p><h3>Get Involved!</h3><p><a href="http://www.eclipse.org/che/docs/#getting-started">Quick Start with Eclipse Che</a>.</p><p>Join the community:</p><ul><li><strong>Support</strong>: You can ask questions, report bugs, and request features using <a href="https://github.com/eclipse/che/issues">GitHub issues</a>.</li><li><strong>Public Chat:</strong> Join the public <a href="https://mattermost.eclipse.org/eclipse/channels/eclipse-che">eclipse-che</a> Mattermost channel to discuss with community and contributors.</li><li><strong>Weekly Meetings:</strong> Join us in our <a href="https://github.com/eclipse/che/wiki/Che-Dev-Meetings">Che community meeting</a> every second monday.</li><li><strong>Mailing list:</strong> che-dev@eclipse.org</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d972ed511e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/running-eclipse-che-on-kubernetes-using-docker-desktop-for-mac-5d972ed511e1">Running Eclipse Che on Kubernetes using Docker Desktop for mac</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache OpenWhisk, Eclipse Che and OpenShift / MiniShift]]></title>
            <link>https://medium.com/eclipse-che-blog/apache-openwhisk-eclipse-che-and-openshift-minishift-13627bf2452?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/13627bf2452</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[openwhisk]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Fri, 12 Jan 2018 14:03:47 GMT</pubDate>
            <atom:updated>2018-01-12T14:41:32.505Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*9kUKM1qnsM8n53Ue6uSyUw.png" /></figure><p>In this blog post, we’ll demonstrate how to use the serverless capabilities of Apache OpenWhisk by writing actions within Eclipse Che.</p><p><a href="https://openwhisk.incubator.apache.org/">Apache OpenWhisk is a serverless, open source cloud platform</a></p><p>There are several ways to deploy Apache OpenWhisk. I’ve followed the MiniShift setup which deploys both Eclipse Che and Apache OpenWhisk on top of MiniShift. It’s easy to setup and to reproduce.</p><h3>Setup of Apache OpenWhisk</h3><p>Here is the installation guide for Apache OpenWhisk on MiniShift</p><p><a href="https://github.com/projectodd/incubator-openwhisk-deploy-kube/blob/simplify-deployment-openshift/resources/README.md#oc-minishift">projectodd/incubator-openwhisk-deploy-kube</a></p><p>Note: do not forget to launch this command after MiniShift startup (else pods won’t start correctly)</p><pre>$ minishift ssh -- sudo ip link set docker0 promisc on</pre><p>We can check OpenWhisk is running by using the following command (it can take time as there are a lot of docker images to download)</p><pre>$ oc logs -f controller-0 | grep &quot;invoker status changed&quot;<br>[2018-01-05T10:05:29.844Z] [INFO] [#sid_121] [InvokerPool] invoker status changed to 0 -&gt; UnHealthy<br>[2018-01-05T10:06:30.243Z] [INFO] [#sid_121] [InvokerPool] invoker status changed to 0 -&gt; Healthy</pre><p>We can check actions as well. We’re using -i flag as the HTTP certificate is self signed.</p><p>The wsk binary can be downloaded from <a href="https://github.com/apache/incubator-openwhisk-cli/releases">https://github.com/apache/incubator-openwhisk-cli/releases</a></p><p>The CLI will be installed as well in the workspace’s image of Eclipse Che, so there is no extra download step.</p><pre>$ wsk -i list</pre><pre>Entities in namespace: <strong>default<br>packages<br></strong>/whisk.system/combinators                                              shared<br>/whisk.system/utils                                                    shared<br>/whisk.system/websocket                                                shared<br>/whisk.system/github                                                   shared<br>/whisk.system/watson-speechToText                                      shared<br>/whisk.system/weather                                                  shared<br>/whisk.system/watson-translator                                        shared<br>/whisk.system/slack                                                    shared<br>/whisk.system/samples                                                  shared<br>/whisk.system/watson-textToSpeech                                      shared</pre><pre><strong>actions</strong></pre><pre>/whisk.system/samples/curl                                             private nodejs:6<br>/whisk.system/utils/head                                               private nodejs:6<br>/whisk.system/utils/echo                                               private nodejs:6<br>/whisk.system/utils/date                                               private nodejs:6<br>/whisk.system/samples/greeting                                         private nodejs:6<br>/whisk.system/watson-speechToText/speechToText                         private nodejs:6<br>/whisk.system/combinators/retry                                        private nodejs:6<br>/whisk.system/utils/sort                                               private nodejs:6<br>/whisk.system/utils/cat                                                private nodejs:6<br>/whisk.system/combinators/forwarder                                    private nodejs:6<br>/whisk.system/utils/hosturl                                            private nodejs:6<br>/whisk.system/utils/namespace                                          private nodejs:6<br>/whisk.system/watson-translator/translator                             private nodejs:6<br>/whisk.system/combinators/eca                                          private nodejs:6<br>/whisk.system/combinators/trycatch                                     private nodejs:6<br>/whisk.system/utils/smash                                              private nodejs:6<br>/whisk.system/samples/wordCount                                        private nodejs:6<br>/whisk.system/samples/helloWorld                                       private nodejs:6<br>/whisk.system/github/webhook                                           private nodejs:6<br>/whisk.system/utils/split                                              private nodejs:6<br>/whisk.system/watson-translator/languageId                             private nodejs:6<br>/whisk.system/watson-textToSpeech/textToSpeech                         private nodejs:6<br>/whisk.system/websocket/send                                           private nodejs:6<br>/whisk.system/slack/post                                               private nodejs:6<br>/whisk.system/weather/forecast                                         private nodejs:6</pre><pre><strong>triggers</strong></pre><pre><strong>rules</strong></pre><h3>Setup of Eclipse Che</h3><p>Using shell scripts, we can deploy easily Eclipse Che on top of MiniShift.</p><p><a href="https://github.com/eclipse/che/blob/master/dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh">eclipse/che</a></p><p>Let’s run ./deploy_che.sh script from the previous link.</p><p>Now we have two MiniShift projects, openwhisk with all Apache OpenWhisk deployments and eclipse-che with Eclipse Che images running.</p><p>Eclipse Che can be reached at <a href="http://che-eclipse-che.192.168.64.5.nip.io/dashboard">http://che-eclipse-che.192.168.64.5.nip.io/dashboard</a> on my current setup. (the link is displayed at the end of the run of the sh script)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MvjCGP94kzRBRDVsqtCtVA.png" /></figure><p>Let’s create a workspace by using the following docker image: florentbenoit/centos_openwhisk This image integrates Java, NodeJS and Python runtime but also OpenShift client (oc)and OpenWhisk client (wsk)</p><p>Once the workspace is created, let’s import a maven Java project so we will be able to create a Java action with OpenWhisk. The project source code is at <a href="https://github.com/benoitf/openwhisk-action">https://github.com/benoitf/openwhisk-action</a></p><p><a href="https://github.com/benoitf/openwhisk-action">benoitf/openwhisk-action</a></p><p>Let’s build the maven project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ak-embtGh0s7EZNqrIh3w.gif" /></figure><p>In the target folder, the jar file was generated.</p><p>Now, let’s connect Eclipse Che to OpenWhisk.</p><p>First, we login from the Che terminal to MiniShift (192.168.64.5 being the IP that is displayed by using $ minishift ip command)</p><pre><em>$ oc login </em><a href="https://192.168.0.64/"><em>https://192.168.64.5:8443</em></a><em><br>(we use developer/developer as login and password)</em></pre><pre>Authentication required for <a href="https://192.168.64.5:8443/">https://192.168.64.5:8443</a> (openshift)<br>Username: developer<br>Password:<br>Login successful.</pre><pre>You have access to the following projects and can switch between them with &#39;oc<br>project &lt;projectname&gt;&#39;:</pre><pre>eclipse-che<br>    myproject<br>    openwhisk<br>  * workspacewdsw9iop4nubfh7m</pre><pre>Using project &quot;workspacewdsw9iop4nubfh7m&quot;.</pre><p>We need to get data from OpenWhisk, so we enter the command oc project openwhisk</p><pre>$ oc project openwhisk<br>Now using project &quot;openwhisk&quot; on server &quot;<a href="https://192.168.64.5:8443/">https://192.168.64.5:8443</a>&quot;.</pre><p>Then we’re able to configure OpenWhisk client</p><pre>$ AUTH_SECRET=$(oc get secret openwhisk -o yaml | grep &quot;system:&quot; | awk &#39;{print $2}&#39; | base64 --decode)<br>$ wsk property set --auth $AUTH_SECRET --apihost $(oc get route/openwhisk --template={{.spec.host}})</pre><p>then we can build the action from the JAR file</p><pre>$ cd target/<br>$ wsk -i action create helloJava openwhisk-action-1.0-SNAPSHOT.jar --main Hello<br>$ wsk -i action invoke --result helloJava --param name &quot;Eclipse Che&quot;</pre><p>so we were able to write an action from Eclipse Che, create it in OpenWhisk and invoke it by providing “Eclipse Che” parameter.</p><pre>[user@workspacewdsw9iop4nubfh7m target]$ wsk -i action invoke --result helloJava --param name &quot;Eclipse Che&quot;<br>{<br>    &quot;greeting&quot;: &quot;Hello Eclipse Che!&quot;<br>}<br>[user@workspacewdsw9iop4nubfh7m target]$ wsk -i action invoke --result helloJava --param name &quot;Eclipse Che test&quot;<br>{<br>    &quot;greeting&quot;: &quot;Hello Eclipse Che test!&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5KCftW_aMynTi6hYxHFnUw.gif" /></figure><p>As always please let us know your thoughts by connecting with us on twitter @eclipse_che or by filing issues in the Che GitHub repo at <a href="https://github.com/eclipse/che">https://github.com/eclipse/che</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13627bf2452" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/apache-openwhisk-eclipse-che-and-openshift-minishift-13627bf2452">Apache OpenWhisk, Eclipse Che and OpenShift / MiniShift</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java 9 — Part 2: Compiling and Running Eclipse Che]]></title>
            <link>https://medium.com/eclipse-che-blog/java-9-part-2-compiling-and-running-eclipse-che-797fe3d5f014?source=rss-312ab6f67ec8------2</link>
            <guid isPermaLink="false">https://medium.com/p/797fe3d5f014</guid>
            <category><![CDATA[eclipse-che]]></category>
            <category><![CDATA[ide]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java9]]></category>
            <category><![CDATA[eclipse]]></category>
            <dc:creator><![CDATA[Florent Benoit]]></dc:creator>
            <pubDate>Wed, 13 Dec 2017 15:11:01 GMT</pubDate>
            <atom:updated>2017-12-13T15:11:01.114Z</atom:updated>
            <content:encoded><![CDATA[<h3>Java 9 — Part 2: Compiling and Running Che</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zv5KXdAW988QNEeyKlB83A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/bphc6kyobMg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Chester Alvarez</a></figcaption></figure><p>In the first post, I described what needed to be done to make Che workspaces run Java 9 (which means getting the Che server to run Java 9 too).</p><p>Now I want to explain what had to be done so contributors to the Che project could compile and run with Java 9.</p><p>The latest Eclipse Che stable release (v5) was designed and built on top of Java 8. So when a new version of the JDK, Java 9, was released we had to ensure that Eclipse Che could be built and run on top of Java 9 as well.</p><p>Eclipse Che uses many dependencies and in order to be compliant with Java 9 all dependencies need to be compliant as well. So making Eclipse Che compliant with Java 9 required a lot of updates.</p><h3>Compiling Eclipse Che with Java 9</h3><p><strong>Maven and Java 9</strong></p><p>We had numerous failures when we first tried to build Eclipse Che with Java 9. Eclipse Che uses maven to build the project but when trying to build it most of the existing maven plugins were not ready to use Java 9 so we had to wait for those plugins to be updated.</p><p>Plus, as an Eclipse project when we update a component we have to file a CQ (<a href="https://wiki.eclipse.org/Development_Resources/Contribution_Questionnaire#Third_Party_Libraries">Contribution Questionnaire</a>) for each one. With 20+ plugins to update it meant getting approval for each one.</p><p><a href="https://github.com/eclipse/che-parent/commit/d18be1d93dc4e1a5dbda7747c6012a6bc8c03907">Update plugins · eclipse/che-parent@d18be1d</a></p><p>After those plugins were updated, we still had issues around some Java components. Most of the failures were linked to the fact that in Java 9 the system class loader is no longer a URLClassLoader and many components assumed that and performed a cast to URLClassLoader …which would fail.</p><p><strong>JDK Reflection / Internal Classes</strong></p><p>The easiest problem to solve was with JDK reflection. We had some methods that performed internal introspection of JDK classes but these methods were not used anymore so instead of trying to fix them we simply removed them!</p><p><a href="https://github.com/eclipse/che/pull/6946">Remove unused SystemInfo attributes (cpu, freeMemory, totalMemory) by benoitf · Pull Request #6946 · eclipse/che</a></p><p><strong>JDK and </strong><strong>tools.jar</strong></p><p>Until Java 9, when you required classes provided by tools.jar you had to add a system dependency in your pom.xml by using the path to the tools.jar file:</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;sun.jdt&lt;/groupId&gt;<br>  &lt;artifactId&gt;tools&lt;/artifactId&gt;<br>  &lt;scope&gt;system&lt;/scope&gt;<br>  &lt;systemPath&gt;${java.home}/../lib/tools.jar&lt;/systemPath<br>&lt;/dependency&gt;</pre><p>With Java 9, tools.jar is no longer there (modularity!) and classes are available with the JVM so we instead added this dependency in a maven profile that is only enabled if the Java version is lower than Java 9.</p><pre>&lt;profile&gt;<br>  &lt;id&gt;java8-tools&lt;/id&gt;<br>  &lt;activation&gt;<br>    &lt;jdk&gt;(,1.9)&lt;/jdk&gt;<br>  &lt;/activation&gt;<br>  &lt;dependencies&gt;<br>    &lt;dependency&gt;<br>      &lt;groupId&gt;sun.jdt&lt;/groupId&gt;<br>      &lt;artifactId&gt;tools&lt;/artifactId&gt;<br>      &lt;scope&gt;system&lt;/scope&gt;<br>      &lt;systemPath&gt;${java.home}/../lib/tools.jar&lt;/systemPath&gt;<br>    &lt;/dependency&gt;<br>  &lt;/dependencies&gt;<br>&lt;/profile&gt;</pre><p><strong>Compiling?</strong></p><p>At that point when we tried to compile Eclipse Che by disabling all unit tests and checks it <em>almost</em> worked. All the modules were marked <em>“build success”</em> until the last module that tried to build GWT app which…failed…oh no!</p><p><strong>GWT and Java9</strong></p><p>This meant we had to upgrade to GWT 2.8.2 to get Java 9 compliance. Note that you still have to use Java 8 language features, but GWT 2.8.2 allows you to use a Java 9 runtime.</p><p><a href="http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2">GWT Project</a></p><p>After all these compiling dependencies updates it was finally possible to build Eclipse Che with Java9!</p><p>But we really wanted to have unit tests working as well! ;-)</p><p><strong>Che and Unit Tests with Java9</strong></p><p>We were using Mockito 1.x in Eclipse Che but to get Java 9 support we needed Mockito 2.10. This meant converting all existing tests to Mockito 2.x. This was quite a bit of work because some of classes which were deprecated in 1.x were removed in 2.x while other methods (like any()) handle null differently.</p><p>Last but not least, we were using a maven artifact named mockito-all and this artifact is no longer supported on 2.x so we had to remove it everywhere it was used (many, many places…).</p><p>Now tests could be launched but some failures were still reported on EclipseLink and Apache Lucene — the versions that we were using of those were not compliant with Java 9.</p><p>After upgrading EclipseLink to 2.7.0, and Lucene to 7.0.1 the issues were solved. For Lucene we’d previously used version 5.2.1 so it was a big update to move to 7.0.1.</p><p><strong>GWT Mockito<br></strong>As before the last unit tests that needed fixing were related to the GWT Mockito tests. Specifically, there was an issue with classloaders</p><pre>Caused by: java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by com/google/gwtmockito/GwtMockitoTestRunner$GwtMockitoClassLoader cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl<br>	at java.base/java.lang.ClassLoader.defineClass1(Native Method)<br>	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)<br>	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:868)<br>	at javassist.Loader.findClass(Loader.java:377)<br>	at com.google.gwtmockito.GwtMockitoTestRunner$GwtMockitoClassLoader.findClass(GwtMockitoTestRunner.java:421)</pre><p>A pull request was merged but we have not yet released.</p><p><a href="https://github.com/google/gwtmockito/pull/73">Make jdk.internal.reflect package being loaded by the standard classloader by benoitf · Pull Request #73 · google/gwtmockito</a></p><p>With all the updates and patches we finally had Eclipse Che compiling with all unit tests when using Java 9 (my tests were with Oracle JDK on macOS)</p><pre>java version &quot;9.0.1&quot;<br>Java(TM) SE Runtime Environment (build 9.0.1+11)<br>Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)</pre><h3>Running</h3><p>OK great — Eclipse Che was compiling, tests were working, but could we launch Che with Java 9?</p><p>Quick answer…no :-(</p><p>Eclipse Che uses APIs provided in the javax namespace (javax.activation and javax.xml.bind). With Java 9, all packages that are not in thejava namespace are not exposed by default.</p><p>So we had to enable extra modules when using Java 9 or higher:</p><pre>JAVA_OPTS=&quot;$JAVA_OPTS --add-modules java.activation --add-modules java.xml.bind&quot;</pre><p>You may notice that the name of the modules are just java.xxx not javax.xxx — that’s not a typo, java.activation provides the javax.activation package at runtime.</p><p>With that flag Eclipse Che was finally able to start!</p><p>But there was a big stack trace in Tomcat saying that the logging.properties file was not found. This file was found in java.home/lib folder previously but in Java 9 it’s moved to the conf folder.</p><p>So we needed a Tomcat version change that included that fix.</p><p><a href="http://tomcat.10.x6.nabble.com/svn-commit-r1809831-in-tomcat-tc8-5-x-trunk-java-org-apache-juli-ClassLoaderLogManager-java-webapps-l-td5067695.html">Tomcat - Dev - svn commit: r1809831 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/juli/ClassLoaderLogManager.java webapps/docs/changelog.xml</a></p><p>By using Tomcat 8.5.23 we could move forward.</p><p>Finally!</p><p><strong>Eclipse Che is Now Compiling and Running with Java 9!</strong></p><p>As always please let us know your thoughts by connecting with us on twitter @eclipse_che or by filing issues in the Che GitHub repo at <a href="https://github.com/eclipse/che">https://github.com/eclipse/che</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=797fe3d5f014" width="1" height="1" alt=""><hr><p><a href="https://medium.com/eclipse-che-blog/java-9-part-2-compiling-and-running-eclipse-che-797fe3d5f014">Java 9 — Part 2: Compiling and Running Eclipse Che</a> was originally published in <a href="https://medium.com/eclipse-che-blog">Eclipse Che Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>