Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support ideaIU and WebStorm #1683

Merged
merged 4 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions modules/end-user-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
** xref:publishing-metadata-for-a-vs-code-extension.adoc[]
** xref:testing-a-visual-studio-code-extension-in-che.adoc[]
** xref:using-alternative-ides-in-che.adoc[]
*** xref:support-for-jetbrains-ides.adoc[]
**** xref:using-jetbrains-intellij-idea-community-edition.adoc[]
**** xref:using-jetbrains-intellij-idea-ultimate-edition.adoc[]
**** xref:using-jetbrains-webstorm.adoc[]
**** xref:provisioning-jetbrains-activation-code-for-offline-use.adoc[]
** xref:adding-tools-to-che-after-creating-a-workspace.adoc[]
** xref:editing-a-devfile-and-plug-in-at-runtime.adoc[]
* xref:configuring-oauth-authorization.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="provisioning-jetbrains-activation-code-for-offline-use"]
// = Provision activation code for offline usage
:navtitle: Provisioning activation code for offline use
:keywords: end-user-guide, jetbrains-activation-code-for-offline-use

include::partial$proc_provisioning-jetbrains-activation-code-for-offline-use.adoc[]
7 changes: 7 additions & 0 deletions modules/end-user-guide/pages/support-for-jetbrains-ides.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[id="support-for-jetbrains-ides"]
// = JetBrains IDEs
:navtitle: JetBrains IDEs
:keywords: end-user-guide, jetbrains-ides
// :page-aliases: .:jetbrains-ides

include::partial$con_support-for-jetbrains-ides.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="using-jetbrains-intellij-idea-community-edition"]
// = IntelliJ Idea Community Edition
:navtitle: Using IntelliJ Idea Community Edition
:keywords: end-user-guide, jetbrains-intellij-idea-community-edition

include::partial$proc_using-jetbrains-intellij-idea-community-edition.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="using-jetbrains-intellij-idea-ultimate-edition"]
// = IntelliJ Idea Ultimate Edition
:navtitle: Using IntelliJ Idea Ultimate Edition
:keywords: end-user-guide, jetbrains-intellij-idea-ultimate-edition

include::partial$proc_using-jetbrains-intellij-idea-ultimate-edition.adoc[]
6 changes: 6 additions & 0 deletions modules/end-user-guide/pages/using-jetbrains-webstorm.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="using-jetbrains-webstorm"]
// = WebStorm
:navtitle: Using WebStorm
:keywords: end-user-guide, jetbrains-webstorm

include::partial$proc_using-jetbrains-webstorm.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

You can extend {prod} in three different ways:

* *Alternative IDEs* provide specialized tools for {prod}. For example, a Jupyter notebook for data analysis. Alternate IDEs can be based on Eclipse Theia or any other web IDE. The default IDE in {prod} is Che-Theia.
* *Alternative IDEs* provide specialized tools for {prod}. For example, a Jupyter notebook for data analysis. Alternate IDEs can be based on Eclipse Theia or any other IDE (web or desktop based). The default IDE in {prod} is Che-Theia.

* *Che-Theia plug-ins* add capabilities to the Che-Theia IDE. They rely on plug-in APIs that are compatible with Visual Studio Code. The plug-ins are isolated from the IDE itself. They can be packaged as files or as containers to provide their own dependencies.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Module included in the following procedures:
//
// provisioning-jetbrains-activation-code-for-offline-use

[id="jetbrains-product-name-mapping"]
= JetBrains product-name mapping

This section provides mapping used internally between JetBrains products and the product name during image build.

[cols="<,",options="header"]
|===
|JetBrains Product |`PRODUCT_NAME`
|IntelliJ Idea Community Edition |`ideaIC`
|IntelliJ Idea Ultimate Edition |`ideaIU`
|WebStorm |`WebStorm`
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[id="con_support-for-jetbrains-ides_{context}"]
= Support for JetBrains IDEs

This section contains information about supported JetBrains IDEs that can be used in {prod} workspaces.

{prod} supports running a workspace with the following list of JetBrains IDEs:

* IntelliJ Idea Community Edition
* IntelliJ Idea Ultimate Edition
* WebStorm

List of JetBrains IDEs that are planned to be supported:

* GoLand
* PhpStorm
* PyCharm Professional Edition
* PyCharm Community Edition

NOTE: The version of supported JetBrains products should is 2018.1 or higher.

The following sections describe how to create an image with a specific IDE and workspace based on the built image:

* xref:using-jetbrains-intellij-idea-community-edition.adoc[]
* xref:using-jetbrains-intellij-idea-ultimate-edition.adoc[]
* xref:using-jetbrains-webstorm.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[id="provisioning-jetbrains-activation-code-for-offline-use_{context}"]
= Provisioning JetBrains activation code for offline use

An activation code for offline use is a file with a license code that can be retrieved from the license management section of your JetBrains account for the license that is assigned to you. When you purchase a personal subscription or are assigned a commercial subscription by your organization, you receive an email prompting you to create a JetBrains account that becomes connected with the license.

NOTE: When using an activation code to activate a product, you need to generate a new activation code and apply it to your product each time the subscription is renewed.

.Prerequisites

* JetBrains account
* Personal or organization subscription

.Procedure

. Retrieve the activation code from the JetBrains account:
+
image::jetbrains/jetbrains-account.jpg[]
+
JetBrains provides a ZIP archive with two types of the activation code. Use the `<License{nbsp}ID>{nbsp}-{nbsp}for{nbsp}2018.1{nbsp}or{nbsp}later.txt` file:
+
image::jetbrains/activation-code.jpg[]

. Provision the activation code for offline use with Che. This procedure is performed through the {orch-name} Secrets.

. Create a {orch-name} Secret to instruct {prod-short} to mount the activation code into a container based on JetBrains specific product:
+
[source,yaml,subs="+quotes"]
----
apiVersion: v1
kind: Secret
metadata:
name: _<secret name>_ <1>
labels:
app.kubernetes.io/component: workspace-secret
app.kubernetes.io/part-of: che.eclipse.org
annotations:
che.eclipse.org/automount-workspace-secret: 'false'
che.eclipse.org/mount-path: /tmp/
che.eclipse.org/mount-as: file
data:
__<product name (ideaIU or WebStorm)>__.key: _<base64-encoded data content>_ <2>
----
<1> `<secret name>` – The section that specifies the secret name. It may have a different name, for example, `ideaiu-offline-activation-code`. Provide the secret name in lowercase.
<2> Product name and activation code:
* `<product name (ideaIU or WebStorm)>` – Replace with the JetBrains product name. See section
xref:jetbrains-product-name-mapping[].
* `<base64-encoded data content>` – The activation code content encoded in base64.

Use the `automount-workspace-secret` option set to `false` to disable the mounting process until it is explicitly requested in a devfile component using the `automountWorkspaceSecrets:true` property. See the `workspace.yaml` example file above. This is the default behavior to avoid mounting the activation code into every container except specific ones that have to work with it.

As a result, in the Che Editor, the file with the activation code for offline use is mounted to the `/tmp/ideaIU.key` or `/tmp/WebStorm.key` path (or similar - based on the type of the build).

IntelliJ Idea Community Edition does not require this procedure. This has to be done for JetBrains products that need to be registered.

include::partial$con_jetbrains-product-name-mapping.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[id="using-intellij-idea-community-edition_{context}"]
= Using IntelliJ Idea Community Edition

.Procedure

. Clone the link:https://github.com/che-incubator/che-editor-intellij-community[che-editor-intellij-community] repository, which is needed to build IntelliJ Idea Community Edition located under the _che-incubator_ organization.

. Build IntelliJ Idea Community Edition by calling the following command inside the repository folder:
+
----
$ podman build -t idea-ic --build-arg PRODUCT_NAME=ideaIC .
----
+
This command builds an image with a `2020.2.3` version by default.

. Tag and push the built image to a user repository:
+
[subs="+quotes"]
----
$ podman tag idea-ic:latest __<username>__/idea-ic:latest
$ podman push __<username>__/idea-ic:latest
----

. Use this image as the {prod-short} editor. To achive this, create two YAML configuration files:
+
* `workspace.yaml` – workspace configuration. Do not forget to provide a correct URL to the `meta.yaml` file:
+
[source,yaml,subs="+quotes"]
----
metadata:
name: che-ideaic
components:
- type: cheEditor
reference: '__<URL to the meta.yaml>__'
alias: ideaic-editor
apiVersion: 1.0.0
----

* `meta.yaml` – {prod-short} editor configuration. Do not forget to replace `<username>` with the user name of the repository to which the image is pushed:
+
[source,yaml,subs="+quotes,attributes"]
----
apiVersion: v2
publisher: _<username>_
name: ideaic-NOVNC
version: 2020.2.3
type: Che Editor
displayName: IntelliJ IDEA Community Edition
title: IntelliJ IDEA Community Edition (in browser using noVNC) as editor for {prod}
description: IntelliJ IDEA Community Edition running on the Web with noVNC
icon: https://resources.jetbrains.com/storage/products/intellij-idea/img/meta/intellij-idea_logo_300x300.png
category: Editor
repository: https://github.com/che-incubator/che-editor-intellij-community
firstPublicationDate: "2020-10-27"
spec:
endpoints:
- name: "intellij"
public: true
targetPort: 8080
attributes:
protocol: http
type: ide
path: /vnc.html?resize=remote&autoconnect=true&reconnect=true
containers:
- name: ideaic-novnc
image: "__<username>__/idea-ic:latest"
mountSources: true
volumes:
- mountPath: "/JetBrains/ideaIC"
name: ideaic-configuration
ports:
- exposedPort: 8080
memoryLimit: "2048M"
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[id="using-intellij-idea-ultimate-edition_{context}"]
= Using IntelliJ Idea Ultimate Edition

.Procedure

. Clone the link:https://github.com/che-incubator/che-editor-intellij-community[che-editor-intellij-community] repository, which is needed to build IntelliJ Idea Community Edition located under the _che-incubator_ organization.

. Build IntelliJ Idea Ultimate Edition by calling the following command inside the repository folder:
+
----
$ podman build -t idea-iu --build-arg PRODUCT_NAME=ideaIU .
----
+
This command builds an image with a `2020.2.3` version by default.

. Tag and push the built image to a user repository:
+
[subs="+quotes"]
----
$ podman tag idea-iu:latest __<username>__/idea-iu:latest
$ podman push __<username>__/idea-iu:latest
----

. Provision the activation code for offline use to be able to use WebStorm with a registered license. See section xref:provisioning-jetbrains-activation-code-for-offline-use.adoc[].

. Create a workspace with the following `workspace.yaml` and `meta.yaml` files:
+
* `workspace.yaml` – workspace configuration. Do not forget to provide a correct URL to the `meta.yaml` file:
+
[source,yaml,subs="+quotes"]
----
metadata:
name: che-ideaiu
components:
- type: cheEditor
reference: '__<URL to the meta.yaml>__'
alias: ideaiu-editor
automountWorkspaceSecrets: true
apiVersion: 1.0.0
----
+
NOTE: In the current workspace definition, there is a new property: `automountWorkspaceSecrets: true`. This property instructs {prod} to provision secrets into a specific component. In this case, it provisions it into the {prod-short} editor based on IntelliJ Idea Ultimate Edition. This parameter is *mandatory* to successfully register the IDE with an activation code for offline use.

* `meta.yaml` – {prod-short} editor configuration. Do not forget to replace `<username>` with the user name of the repository to which the image is pushed:
+
[source,yaml,subs="+quotes,attributes"]
----
apiVersion: v2
publisher: _<username>_
name: ideaIU-NOVNC
version: 2020.2.3
type: Che Editor
displayName: IntelliJ IDEA Ultimate Edition
title: IntelliJ IDEA Ultimate Edition (in browser using noVNC) as editor for {prod}
description: IntelliJ IDEA Ultimate Edition running on the Web with noVNC
icon: https://resources.jetbrains.com/storage/products/intellij-idea/img/meta/intellij-idea_logo_300x300.png
category: Editor
repository: https://github.com/che-incubator/che-editor-intellij-community
firstPublicationDate: "2020-10-27"
spec:
endpoints:
- name: "intellij"
public: true
targetPort: 8080
attributes:
protocol: http
type: ide
path: /vnc.html?resize=remote&autoconnect=true&reconnect=true
containers:
- name: ideaiu-novnc
image: "__<username>__/idea-iu:latest"
mountSources: true
volumes:
- mountPath: "/JetBrains/ideaIU"
name: ideaiu-configuration
ports:
- exposedPort: 8080
memoryLimit: "2048M"
----
79 changes: 79 additions & 0 deletions modules/end-user-guide/partials/proc_using-jetbrains-webstorm.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[id="using-jetbrains-webstorm_{context}"]
= Using WebStorm

.Procedure

. Clone the link:https://github.com/che-incubator/che-editor-intellij-community[che-editor-intellij-community] repository, which is needed to build IntelliJ Idea Community Edition located under the _che-incubator_ organization.

. Build the image:
+
----
$ podman build -t webstorm --build-arg PRODUCT_NAME=WebStorm .
----
+
This command builds an image with a `2020.2.3` version by default.

. Tag and push the built image to a user repository:
+
[subs="+quotes"]
----
$ podman tag webstorm:latest __<username>__/webstorm:latest
$ podman push __<username>__/webstorm:latest
----

. Provision the activation code for offline use to be able to use WebStorm with a registered license. See section xref:provisioning-jetbrains-activation-code-for-offline-use.adoc[].

. Create a workspace with the following `workspace.yaml` and `meta.yaml` files:
+
* `workspace.yaml` – workspace configuration. Do not forget to provide a correct URL to the `meta.yaml` file:
+
[source,yaml,subs="+quotes"]
----
metadata:
name: che-webstorm
components:
- type: cheEditor
reference: '__<URL to meta.yaml>__'
alias: webstorm-editor
automountWorkspaceSecrets: true
apiVersion: 1.0.0
----
+
NOTE: In the current workspace definition, there is a new property: `automountWorkspaceSecrets: true`. This property instructs {prod} to provision secrets into a specific component. In this case, it provisions it into the {prod-short} editor based on IntelliJ Idea Ultimate Edition. This parameter is *mandatory* to successfully register the IDE with an activation code for offline use.

* `meta.yaml` – {prod-short} editor configuration. Do not forget to replace `<username>` with the user name of the repository to which the image is pushed:
+
[source,yaml,subs="+quotes,attributes"]
----
apiVersion: v2
publisher: _<username>_
name: webstorm-NOVNC
version: 2020.2.3
type: Che Editor
displayName: WebStorm
title: WebStorm (in browser using noVNC) as editor for {prod}
description: WebStorm running on the Web with noVNC
icon: https://resources.jetbrains.com/storage/products/webstorm/img/meta/webstorm_logo_300x300.png
category: Editor
repository: https://github.com/che-incubator/che-editor-intellij-community
firstPublicationDate: "2020-10-27"
spec:
endpoints:
- name: "intellij"
public: true
targetPort: 8080
attributes:
protocol: http
type: ide
path: /vnc.html?resize=remote&autoconnect=true&reconnect=true
containers:
- name: webstorm-novnc
image: "__<username>__/webstorm:latest"
mountSources: true
volumes:
- mountPath: "/JetBrains/WebStorm"
name: webstorm-configuration
ports:
- exposedPort: 8080
memoryLimit: "2048M"
----