Building images for IDEs based on the IntelliJ Platform

This section describes how to build images for IDEs based on the IntelliJ Platform version 2020.3.

Building an image for IntelliJ IDEA Community or PyCharm Community

This procedure describes how to build an image for IntelliJ IDEA Community or PyCharm Community.

Prerequisites
Procedure
  1. Get a local copy of the JetBrains Projector Editor Images repository.

    $ git clone https://github.com/che-incubator/jetbrains-editor-images
    $ cd jetbrains-editor-images
  2. Run the build script and select the IDE package and package version:

    $ ./projector.sh build
    [info] Select the IDE package to build (default is 'IntelliJ IDEA Community'):
           1) IntelliJ IDEA Community
           2) PyCharm Community
    [info] Select the IDE package version to build (default is '2020.3.3'):
           1) 2020.3.3
           2) 2020.3.2
           3) 2020.3.1
  3. To test the image, run it locally and go to http://localhost:8887 to access the IDE.

    $ ./projector.sh run
  4. Publish the image to a registry accessible by Che, and remember the location: <registry>/<image>:<tag>.

  5. Create a meta.yaml file with the following content:

    apiVersion: v2
    publisher: <publisher> (1)
    name: intellij-ide
    version: latest
    type: Che Editor
    displayName: IntelliJ Platform IDE
    title: IDE based on the IntelliJ Platform
    description: IDE based on the IntelliJ Platform running using Projector
    icon: https://www.jetbrains.com/apple-touch-icon.png
    category: Editor
    repository: https://github.com/che-incubator/jetbrains-editor-images
    firstPublicationDate: "2021-04-10"
    spec:
      endpoints:
       -  name: intellij
          public: true
          targetPort: 8887
          attributes:
            protocol: http
            type: ide
            path: /projector-client/index.html?backgroundColor=434343&wss
      containers:
       - name: intellij-ide
         image: <registry>/<image>:<tag> (2)
         mountSources: true
         volumes:
             - mountPath: "/home/projector-user"
               name: projector-user
         ports:
             - exposedPort: 8887
         memoryLimit: "4096M"
    1 <publisher>: Your publisher name.
    2 <registry>/<image>:<tag>: Location of the IDE image in a registry accessible by Che.
  6. Publish the meta.yaml file to an HTTPS resource accessible by Che and copy the resulting URL for use as <URL_to_meta.yaml> when configuring a workspace to use this IDE.

Building an image for an IDE based on the IntelliJ Platform

This procedure describes how to build an image for an IDE based on the IntelliJ Platform version 2020.3. For JetBrains IDEs, the IDE version number corresponds to the version of the IntelliJ Platform. See the list of compatible IDEs.

Prerequisites
Procedure
  1. Get a local copy of the JetBrains Projector Editor Images repository.

    $ git clone https://github.com/che-incubator/jetbrains-editor-images
    $ cd jetbrains-editor-images
  2. Run the build script with parameters:

    $ ./projector build --tag <tag> --url <URL>
    --tag <tag>

    The name and tag to apply to the image after build in name:tag format.

    --url <url>

    The URL pointing to an archive of the IDE based on the IntelliJ Platform version 2020.3. The archive must target the Linux platform, be in tar.gz format, and include JetBrains Runtime (JBR).

    Example 1. Building the image with IntelliJ IDEA Community 2020.3.3
    ./projector.sh build --tag che-idea:2020.3.3 \
      --url https://download-cdn.jetbrains.com/idea/ideaIC-2020.3.3.tar.gz
    Example 2. Building the image with PyCharm Community 2020.3.5
    $ ./projector.sh build --tag che-pycharm:2020.3.5 \
      --url https://download.jetbrains.com/python/pycharm-community-2020.3.5.tar.gz
    Example 3. Building the image with WebStorm 2020.3.3
    $ ./projector.sh build --tag che-webstorm:2020.3.3 \
      --url https://download.jetbrains.com/webstorm/WebStorm-2020.3.3.tar.gz
    Example 4. Building the image with IntelliJ IDEA Ultimate 2020.2.2
    $ ./projector.sh build --tag che-idea-ultimate:2020.2.2 \
      --url https://download.jetbrains.com/idea/ideaIU-2020.2.2.tar.gz
    Example 5. Building the image with Android Studio 4.2.0.22
    $ ./projector.sh build --tag che-android-studio:4.2.0.22 \
      --url https://redirector.gvt1.com/edgedl/android/studio/ide-zips/4.2.0.22/android-studio-ide-202.7188722-linux.tar.gz
  3. To test the image, run it locally and go to http://localhost:8887 to access the IDE.

    $ ./projector.sh run <tag>
    Example 6. Testing the image with IntelliJ IDEA Community 2020.3.3
    $ ./projector.sh run che-idea:2020.3.3
    Example 7. Testing the image with PyCharm 2020.3.5
    $ ./projector.sh run che-pycharm:2020.3.5
    Example 8. Testing the image with WebStorm 2020.3.3
    $ ./projector.sh run che-webstorm:2020.3.3
    Example 9. Testing the image with IntelliJ IDEA Ultimate 2020.2.2
    $ ./projector.sh run che-idea-ultimate:2020.2.2
    Example 10. Testing the image with Android Studio 4.2.0.22
    $ ./projector.sh run che-android-studio:4.2.0.22
  4. Publish the image to a registry accessible by Che, and remember the location: <registry>/<image>:<tag>.

  5. Create a meta.yaml file containing the IDE metadata for Che:

    apiVersion: v2
    publisher: <publisher> (1)
    name: intellij-ide
    version: latest
    type: Che Editor
    displayName: IntelliJ Platform IDE
    title: IDE based on the IntelliJ Platform
    description: IDE based on the IntelliJ Platform running using Projector
    icon: https://www.jetbrains.com/apple-touch-icon.png
    category: Editor
    repository: https://github.com/che-incubator/jetbrains-editor-images
    firstPublicationDate: "2021-04-10"
    spec:
      endpoints:
       -  name: intellij
          public: true
          targetPort: 8887
          attributes:
            protocol: http
            type: ide
            path: /projector-client/index.html?backgroundColor=434343&wss
      containers:
       - name: intellij-ide
         image: <registry>/<image>:<tag> (2)
         mountSources: true
         volumes:
             - mountPath: "/home/projector-user"
               name: projector-user
         ports:
             - exposedPort: 8887
         memoryLimit: "4096M"
    1 <publisher>: Your publisher name.
    2 <registry>/<image>:<tag>: Location of the IDE image in a registry accessible by Che.
  6. Publish the meta.yaml file to an HTTPS resource accessible by Che and copy the resulting URL for use as <URL_to_meta.yaml> when configuring a workspace to use this IDE.