Provisioning the JetBrains offline activation code

Some editions of JetBrains IDEs require a paid subscription beyond the evaluation period, which means buying a license from JetBrains. To register a license, you need to provision to Che the JetBrains activation code for offline usage. When you renew your subscription, you will need to generate and provision a new offline activation code.

  1. Log in to your JetBrains account, choose the desired subscription, and click on the Download activation code for offline usage link.

  2. Extract from the downloaded zip archive the file named <License ID> - for 2018.1 or later.txt.

  3. Convert the activation code to a base64 encoded single line for use in the next step as <base64_encoded_activation_code>.

    $ openssl base64 -e -A -in '<License ID> - for 2018.1 or later.txt'
  4. Create a secret.yaml file defining the Kubernetes Secret to provision the activation code to Che.

    apiVersion: v1
    kind: Secret
      name: jetbrains-offline-activation-code
      labels: workspace-secret
      annotations: 'false' (1) /tmp/ file
      idea.key: <base64_encoded_activation_code>
      pycharm.key: <base64_encoded_activation_code>
      webstorm.key: <base64_encoded_activation_code>
      phpstorm.key: <base64_encoded_activation_code>
      goland.key: <base64_encoded_activation_code>
    1 'false': disables the mounting process until a workspace component explicitly requests it with the automountWorkspaceSecrets: true property.
  5. Apply the Kubernetes Secret to the Kubernetes namespace running the workspace.

    $ kubectl apply -f secret.yaml
  6. To mount the activation codes into a workspace, update the workspace devfile configuration to set automountWorkspaceSecrets: true.

      - type: cheEditor
        automountWorkspaceSecrets: true
        reference: "<URL_to_meta.yaml>"
  7. Restart the workspace.