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

docs: how to pre install JetBrains editors into VM / container image so that it doesn't have to download every time #13207

Open
bpmct opened this issue May 8, 2024 · 5 comments
Labels
docs Area: docs

Comments

@bpmct
Copy link
Member

bpmct commented May 8, 2024

Installing a JetBrains IDE can be slow. I believe sharkymark has some v2 templates with IntellIJ pre installed. Can we formalize these docs?

@coder-labeler coder-labeler bot added the docs Area: docs label May 8, 2024
@matifali
Copy link
Collaborator

matifali commented May 8, 2024

@bpmct AFAIR, Those templates were using the now deprecated JetBrains projector.
To document this will require investigating where the Gateway puts the downloaded IDE backend.

Additionally, the download happens only on the first connection to a workspace; all subsequent connections should be instant, given they are pinning the IDE versions and the workspace directory is persisted across restarts.

@roshvin
Copy link

roshvin commented May 8, 2024

Hi @bpmct thanks for creating the issue
hi @matifali , when we restart the Workspace or close / open the GW client , its downloading the packages again .

image

@matifali
Copy link
Collaborator

matifali commented May 9, 2024

@roshvin This package is JetBrainsClient. It's being downloaded to the client machine and not the workspace. I am currently unable to reproduce this. For me, this gets downloaded only the first time or if a newer version is available. It's being handled by Gateway automatically.

@code-asher
Copy link
Member

code-asher commented May 13, 2024

Yeah the backend should only be downloaded once per workspace and the client only once per client machine, if not then there could be a bug but I just tried and have not been able to reproduce as of yet.

The backend can be pre-installed anywhere, you just have to register it (basically it just creates a symlink in the right spot, you could probably do this manually too). For example, suppose you download and extract the editor to ~/.cache/editors/IU-232.10203.10:

~/.cache/editors/IU-232.10203.10/bin/remote-dev-server.sh registerBackendLocationForGateway

https://www.jetbrains.com/help/idea/remote-development-a.html#register_backend_IDE

I am not sure where the client goes though.

@code-asher
Copy link
Member

code-asher commented May 13, 2024

Also, if you ever want to check what is registered with Gateway without having to launch Gateway, I am not sure there is a better way but this does the trick for me (note the hash might be different for others):

$ ~/.cache/JetBrains/RemoteDev/remote-dev-worker/remote-dev-worker_fcf8a611ab8f9110082dc5a71cb4e287dc9ee35120fb7880e4e56e6b92abec56 installed-ides | jq '.data[] | fromjson | .idePath'
"/home/coder/.cache/JetBrains/RemoteDev/dist/5bffcb8389003_PhpStorm-241.15989.66"
"/home/coder/.cache/JetBrains/RemoteDev/dist/CL-233.14475.31"
"/home/coder/.cache/JetBrains/RemoteDev/dist/CL-241.14494.229"
"/home/coder/.cache/JetBrains/RemoteDev/dist/GO-233.14808.20"
"/home/coder/.cache/JetBrains/RemoteDev/dist/IU-233.15026.9"
"/home/coder/.cache/JetBrains/RemoteDev/dist/IU-241.15989.69"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: docs
Projects
None yet
Development

No branches or pull requests

4 participants