@@ -188,3 +188,151 @@ In networks that restrict access to the internet, you will need to leverage the
188
188
JetBrains Client Installer to download and save the IDE clients locally. Please
189
189
see the
190
190
[ JetBrains documentation for more information] ( https://www.jetbrains.com/help/idea/fully-offline-mode.html ) .
191
+
192
+ ### Configuration Steps
193
+
194
+ The Coder team built a POC of the JetBrains Gateway Offline Mode solution. Here
195
+ are the steps we took (and "gotchas"):
196
+
197
+ ### 1. Deploy the server and install the Client Downloader
198
+
199
+ We deployed a simple Ubuntu VM and installed the JetBrains Client Downloader
200
+ binary. Note that the server must be a Linux-based distribution.
201
+
202
+ ``` shell
203
+ wget https://download.jetbrains.com/idea/code-with-me/backend/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz && \
204
+ tar -xzvf jetbrains-clients-downloader-linux-x86_64-1867.tar.gz
205
+ ```
206
+
207
+ ### 2. Install backends and clients
208
+
209
+ JetBrains Gateway requires both a backend to be installed on the remote host
210
+ (your Coder workspace) and a client to be installed on your local machine. You
211
+ can host both on the server in this example.
212
+
213
+ See here for the full
214
+ [ JetBrains product list and builds] ( https://data.services.jetbrains.com/products ) .
215
+ Below is the full list of supported ` --platforms-filter ` values:
216
+
217
+ ``` console
218
+ windows-x64, windows-aarch64, linux-x64, linux-aarch64, osx-x64, osx-aarch64
219
+ ```
220
+
221
+ To install both backends and clients, you will need to run two commands.
222
+
223
+ ** Backends**
224
+
225
+ ``` shell
226
+ ./jetbrains-clients-downloader-linux-x86_64-1867/bin4/jetbrains-clients-downloader --products-filter < product-code> --build-filter < build-number> --platforms-filter linux-x64,windows-x64,osx-x64 --download-backends ~ /backends
227
+ ```
228
+
229
+ ** Clients**
230
+
231
+ This is the same command as above, with the ` --download-backends ` flag removed.
232
+
233
+ ``` shell
234
+ ./jetbrains-clients-downloader-linux-x86_64-1867/bin4/jetbrains-clients-downloader --products-filter < product-code> --build-filter < build-number> --platforms-filter linux-x64,windows-x64,osx-x64 ~ /clients
235
+ ```
236
+
237
+ We now have both clients and backends installed.
238
+
239
+ ### 3. Install a web server
240
+
241
+ You will need to run a web server in order to serve requests to the backend and
242
+ client files. We installed ` nginx ` and setup an FQDN and routed all requests to
243
+ ` / ` . See below:
244
+
245
+ ``` console
246
+ server {
247
+ listen 80 default_server;
248
+ listen [::]:80 default_server;
249
+
250
+ root /var/www/html;
251
+
252
+ index index.html index.htm index.nginx-debian.html;
253
+
254
+ server_name _;
255
+
256
+ location / {
257
+ root /home/ubuntu;
258
+ }
259
+ }
260
+ ```
261
+
262
+ Then, configure your DNS entry to point to the IP address of the server. For the
263
+ purposes of the POC, we did not configure TLS, although that is a supported
264
+ option.
265
+
266
+ ### 4. Add Client Files
267
+
268
+ You will need to add the following files on your local machine in order for
269
+ Gateway to pull the backend and client from the server.
270
+
271
+ ``` shell
272
+ $ cat productsInfoUrl # a path to products.json that was generated by the backend's downloader (it could be http://, https://, or file://)
273
+
274
+ https://internal.site/backends/< PRODUCT_CODE> /products.json
275
+
276
+ $ cat clientDownloadUrl # a path for clients that you got from the clients' downloader (it could be http://, https://, or file://)
277
+
278
+ https://internal.site/clients/
279
+
280
+ $ cat jreDownloadUrl # a path for JBR that you got from the clients' downloader (it could be http://, https://, or file://)
281
+
282
+ https://internal.site/jre/
283
+
284
+ $ cat pgpPublicKeyUrl # a URL to the KEYS file that was downloaded with the clients builds.
285
+
286
+ https://internal.site/KEYS
287
+ ```
288
+
289
+ The location of these files will depend upon your local operating system:
290
+
291
+ ** macOS**
292
+
293
+ ``` console
294
+ # User-specific settings
295
+ /Users/UserName/Library/Application Support/JetBrains/RemoteDev
296
+ # System-wide settings
297
+ /Library/Application Support/JetBrains/RemoteDev/
298
+ ```
299
+
300
+ ** Linux**
301
+
302
+ ``` console
303
+ # User-specific settings
304
+ $HOME/.config/JetBrains/RemoteDev
305
+ # System-wide settings
306
+ /etc/xdg/JetBrains/RemoteDev/
307
+ ```
308
+
309
+ ** Windows**
310
+
311
+ ``` console
312
+ # User-specific settings
313
+ HKEY_CURRENT_USER registry
314
+ # System-wide settings
315
+ HKEY_LOCAL_MACHINE registry
316
+ ```
317
+
318
+ Additionally, create a string for each setting with its appropriate value in
319
+ ` SOFTWARE\JetBrains\RemoteDev ` :
320
+
321
+ ![ Alt text] ( ../images/gateway/jetbrains-offline-windows.png )
322
+
323
+ ### 5. Setup SSH connection with JetBrains Gateway
324
+
325
+ With the server now configured, you can now configure your local machine to use
326
+ Gateway. Here is the documentation to
327
+ [ setup SSH config via the Coder CLI] ( ../ides.md#ssh-configuration ) . On the
328
+ Gateway side, follow our guide here until step 16.
329
+
330
+ Instead of downloading from jetbrains.com, we will point Gateway to our server
331
+ endpoint. Select ` Installation options... ` and select ` Use download link ` . Note
332
+ that the URL must explicitly reference the archive file:
333
+
334
+ ![ Offline Gateway] ( ../images/gateway/offline-gateway.png )
335
+
336
+ Click ` Download IDE and Connect ` . Gateway should now download the backend and
337
+ clients from the server into your remote workspace and local machine,
338
+ respectively.
0 commit comments