- Notifications
You must be signed in to change notification settings - Fork925
docs: add steps to pre-install JetBrains IDE backend#15962
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
25 commits Select commitHold shift + click to select a range
754e44b
copy and md
EdwardAngert10472c8
Merge remote-tracking branch 'origin/main' into 13207-preinstall-jetb…
EdwardAngert75875f3
jetbrains initial copy and md edit
EdwardAngert047ca3b
Merge remote-tracking branch 'origin/main' into 13207-preinstall-jetb…
EdwardAngert74a5624
make fmt
EdwardAngertb5e8007
move JetBrains offline steps to separate doc; update links
EdwardAngert8cdbecf
Merge remote-tracking branch 'origin/main' into 13207-preinstall-jetb…
EdwardAngert5724624
fix relative links
EdwardAngerte9b1e18
s/offline/airgapped
EdwardAngert9ead169
copy edit
EdwardAngertd9062a0
Merge remote-tracking branch 'origin/main' into 13207-preinstall-jetb…
EdwardAngert302406a
copy edit
EdwardAngert951efd1
add jetbrains-pre-install
EdwardAngertc6ac5fa
Merge branch 'main' into 13207-preinstall-jetbrains
matifalic9c799f
Improve JetBrains Gateway installation documentation
matifali440dbc0
Update JetBrains Gateway backend setup instructions
matifali67103b4
Merge remote-tracking branch 'origin/main' into 13207-preinstall-jetb…
EdwardAngertfd81c47
align with changes from main
EdwardAngertdca1e38
Merge branch 'main' into 13207-preinstall-jetbrains
matifali99c1a59
Simplify JetBrains pre-installation guide
matifalic7e64e4
Simplify JetBrains pre-installation guide
matifali7a9e5c7
Merge branch 'main' into 13207-preinstall-jetbrains
matifalidb684a5
Merge branch 'main' into 13207-preinstall-jetbrains
EdwardAngert3e9dd48
Merge branch 'main' into 13207-preinstall-jetbrains
EdwardAngert37fdb17
move gateway and update pre-install
EdwardAngertFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
119 changes: 119 additions & 0 deletionsdocs/admin/templates/extending-templates/jetbrains-gateway.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Pre-install JetBrains Gateway in a template | ||
For a faster JetBrains Gateway experience, pre-install the IDEs backend in your template. | ||
> [!NOTE] | ||
> This guide only talks about installing the IDEs backend. For a complete guide on setting up JetBrains Gateway with client IDEs, refer to the [JetBrains Gateway air-gapped guide](../../../user-guides/workspace-access/jetbrains/jetbrains-airgapped.md). | ||
## Install the Client Downloader | ||
Install the JetBrains Client Downloader binary: | ||
```shell | ||
wget https://download.jetbrains.com/idea/code-with-me/backend/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz && \ | ||
tar -xzvf jetbrains-clients-downloader-linux-x86_64-1867.tar.gz | ||
rm jetbrains-clients-downloader-linux-x86_64-1867.tar.gz | ||
``` | ||
## Install Gateway backend | ||
```shell | ||
mkdir ~/JetBrains | ||
./jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64 --download-backends ~/JetBrains | ||
``` | ||
For example, to install the build `243.26053.27` of IntelliJ IDEA: | ||
```shell | ||
./jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader --products-filter IU --build-filter 243.26053.27 --platforms-filter linux-x64 --download-backends ~/JetBrains | ||
tar -xzvf ~/JetBrains/backends/IU/*.tar.gz -C ~/JetBrains/backends/IU | ||
rm -rf ~/JetBrains/backends/IU/*.tar.gz | ||
``` | ||
## Register the Gateway backend | ||
Add the following command to your template's `startup_script`: | ||
```shell | ||
~/JetBrains/backends/IU/ideaIU-243.26053.27/bin/remote-dev-server.sh registerBackendLocationForGateway | ||
``` | ||
## Configure JetBrains Gateway Module | ||
If you are using our [jetbrains-gateway](https://registry.coder.com/modules/jetbrains-gateway) module, you can configure it by adding the following snippet to your template: | ||
```tf | ||
module "jetbrains_gateway" { | ||
count = data.coder_workspace.me.start_count | ||
source = "registry.coder.com/modules/jetbrains-gateway/coder" | ||
version = "1.0.28" | ||
agent_id = coder_agent.main.id | ||
folder = "/home/coder/example" | ||
jetbrains_ides = ["IU"] | ||
default = "IU" | ||
latest = false | ||
jetbrains_ide_versions = { | ||
"IU" = { | ||
build_number = "243.26053.27" | ||
version = "2024.3" | ||
} | ||
} | ||
} | ||
resource "coder_agent" "main" { | ||
... | ||
startup_script = <<-EOF | ||
~/JetBrains/backends/IU/ideaIU-243.26053.27/bin/remote-dev-server.sh registerBackendLocationForGateway | ||
EOF | ||
} | ||
``` | ||
## Dockerfile example | ||
If you are using Docker based workspaces, you can add the command to your Dockerfile: | ||
```dockerfile | ||
FROM ubuntu | ||
# Combine all apt operations in a single RUN command | ||
# Install only necessary packages | ||
# Clean up apt cache in the same layer | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
git \ | ||
golang \ | ||
sudo \ | ||
vim \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# Create user in a single layer | ||
ARG USER=coder | ||
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \ | ||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \ | ||
&& chmod 0440 /etc/sudoers.d/${USER} | ||
USER ${USER} | ||
WORKDIR /home/${USER} | ||
# Install JetBrains Gateway in a single RUN command to reduce layers | ||
# Download, extract, use, and clean up in the same layer | ||
RUN mkdir -p ~/JetBrains \ | ||
&& wget -q https://download.jetbrains.com/idea/code-with-me/backend/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz -P /tmp \ | ||
&& tar -xzf /tmp/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz -C /tmp \ | ||
&& /tmp/jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader \ | ||
--products-filter IU \ | ||
--build-filter 243.26053.27 \ | ||
--platforms-filter linux-x64 \ | ||
--download-backends ~/JetBrains \ | ||
&& tar -xzf ~/JetBrains/backends/IU/*.tar.gz -C ~/JetBrains/backends/IU \ | ||
&& rm -f ~/JetBrains/backends/IU/*.tar.gz \ | ||
&& rm -rf /tmp/jetbrains-clients-downloader-linux-x86_64-1867* \ | ||
&& rm -rf /tmp/*.tar.gz | ||
``` | ||
## Next steps | ||
- [Pre-install the Client IDEs](../../../user-guides/workspace-access/jetbrains/jetbrains-airgapped.md#1-deploy-the-server-and-install-the-client-downloader) |
2 changes: 1 addition & 1 deletiondocs/changelogs/v2.1.5.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletiondocs/install/offline.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletiondocs/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletionsdocs/user-guides/workspace-access/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.