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

[JetBrains] Preconfigured global settings on Host. #14566

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Nov 9, 2022

Description

JetBrains products have global settings which are applied to all projects on a machine. In remote scenario such settings should be preconfigured for different use cases, i.e. they can be specific to a project, image, user, team or entire organisation, and applied to each newly started Gitpod workspace. Unfortunately some global settings cannot be configured via env variables, properties or vm options, for instance proxy settings. Only via UI of JetBrains client.

This PR introduces a mid term workaround which enables users to preconfigure settings via JetBrains Client in predefined locations. In long term we hope JetBrains to find own way to enable users to configure and share global settings for different use cases. If you are using this workaround please leave your use case on #6576.

Preconfigured global settings are applied by Gitpod before very first start of JetBrains backend by copying into /workspace/.config/JetBrains(-latest)?/RemoteDev-{productCode}/{project}/options location from locations and according order specified in the table below. A user have to manually find global settings generated by JetBrains backend under this location, put under Git or copy to Docker image, and maintain them up-to-date.

A user can also leverage .dotflies to share global settings for own account among all workspaces. A dotfile install script should copy settings from a dotfile repo to predefined locations as specified below. Dotfiles are guaranteed to apply before any JetBrains product startup.

Predefined location JetBrains global settings for
~/.gitpod/jetbrains/options
Example: /home/gitpod/.gitpod/jetbrains/options
Each JetBrains product configured in a Docker image.
~/.gitpod/jetbrains/{product}/options
Example: /home/gitpod/.gitpod/jetbrains/intellij/options
A specific JetBrains product configured in a Docker image.
/{project}/.gitpod/jetbrains/options
Example: /workspace/gitpod/.gitpod/jetbrains/options
Each JetBrains product configured in a Git repo of your project.
/{project}/.gitpod/jetbrains/{product}/options
Example: /workspace/gitpod/.gitpod/jetbrains/intellij/options
A specific product configured in a Git repo of the project.

For an example see https://github.com/akosyakov/parcel-demo/tree/jb-proxy-test applying proxy settings via Docker image.

Related Issue(s)

Fixes #

How to test

Release Notes

[JetBrains] Preconfigured global settings on Host.
JetBrains products have global settings which are applied to all projects on a machine. In remote scenario such settings should be preconfigured for different use cases, i.e. they can be specific to a project, image, user, team or entire organisation, and applied to each newly started Gitpod workspace. Unfortunately some global settings cannot be configured via env variables, properties or vm options, for instance proxy settings. Only via UI of JetBrains client.

This PR introduces a mid term workaround which enables users to preconfigure settings via JetBrains Client in predefined locations. In long term we hope JetBrains to find own way to enable users to configure and share global settings for different use cases. If you are using this workaround please leave your use case on https://github.com/gitpod-io/gitpod/issues/6576.

Preconfigured global settings are applied by Gitpod before very first start of JetBrains backend by copying into `/workspace/.config/JetBrains(-latest)?/RemoteDev-{productCode}/{project}/options` location from locations and according order specified in the table below. A user have to manually find global settings generated by JetBrains backend under this location, put under Git or copy to Docker image, and maintain them up-to-date.

A user can also leverage [.dotflies](https://www.gitpod.io/docs/configure/user-settings/dotfiles) to share global settings for own account among all workspaces. A dotfile install script should copy settings from a dotfile repo to predefined locations as specified below. Dotfiles are guaranteed to apply before any JetBrains product startup. 

| Predefined location | JetBrains global settings for |
| ------------- | ------------- |
| `~/.gitpod/jetbrains/options`<br>Example: `/home/gitpod/.gitpod/jetbrains/options` | Each JetBrains product configured in a Docker image. | 
| `~/.gitpod/jetbrains/{product}/options`<br>Example: `/home/gitpod/.gitpod/jetbrains/intellij/options` | A specific JetBrains product configured in a Docker image. |
| `/{project}/.gitpod/jetbrains/options`<br>Example: `/workspace/gitpod/.gitpod/jetbrains/options` | Each JetBrains product configured in a Git repo of your project. | 
| `/{project}/.gitpod/jetbrains/{product}/options`<br>Example: `/workspace/gitpod/.gitpod/jetbrains/intellij/options` | A specific product configured in a Git repo of the project. |

For an example see https://github.com/akosyakov/parcel-demo/tree/jb-proxy-test applying proxy settings via Docker image.

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com

This comment was marked as resolved.

@werft-gitpod-dev-com

This comment was marked as resolved.

@akosyakov

This comment was marked as resolved.

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed it during a mob session with @andreafalzetti and @akosyakov

@akosyakov akosyakov marked this pull request as ready for review November 15, 2022 10:49
@akosyakov akosyakov requested a review from a team November 15, 2022 10:49
@roboquat roboquat merged commit 983b483 into main Nov 15, 2022
@roboquat roboquat deleted the ak/jb_sync_options branch November 15, 2022 10:49
@akosyakov akosyakov changed the title [jb] sync initial options [JetBrains] Preconfigured global settings on Host. Nov 15, 2022
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production editor: jetbrains release-note size/L team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants