Skip to main content

Pros and Cons of Cloud IDE: We gave it a try. Here’s how it went.

Picture of Marcin Aman, Team Leader

Marcin Aman

Team Leader
Picture of Michał Wiącek, Software Developer

Michał Wiącek

Software Developer
Aug 29, 2022|14 min read
Pros_and_Cons_of_Cloud_IDE__We_gave_it_a_try._Here’s_how_it_went_image-min.jpg
blog_infographic_virtus-IDE

1FROM gitpod/workspace-java-11:latest
2
3USER root
4RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list \
5 curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add \
6 curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - \
7 curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list \
8 curl -s --compressed "https://virtuslab.github.io/scala-cli-packages/KEY.gpg" | sudo apt-key add - \
9 sudo curl -s --compressed -o /etc/apt/sources.list.d/scala_cli_packages.list "https://virtuslab.github.io/scala-cli-packages/debian/scala_cli_packages.list" \
10 apt-get update \
11 DEBIAN_FRONTEND=noninteractive apt-get install -y tailscale sbt \
12 libxtst6 libx11-6 libxrender1 xvfb openssh-server python3 \
13 python3-pip libssl-dev pkg-config x11-apps imagemagick xorg scala-cli \
14 echo "nohup /usr/bin/Xvfb :0.0 -screen 0 1024x768x24 &" > /etc/init.d/xvfb \
15 echo "nohup /usr/sbin/tailscaled &" > /etc/init.d/tailscaled \
16 sudo update-rc.d xvfb defaults \
17 sudo update-rc.d tailscaled defaults-disabled
1image:
2 file: .gitpod.Dockerfile
3
4jetbrains:
5 intellij:
6 plugins:
7 - org.intellij.scala
8
9tasks:
10 - name: base init
11 init: |
12 set -e
13 gp env IDEPROBE_DISPLAY=xvfb
14 sbt "Test / compile"
15 /ide-desktop/backend/bin/remote-dev-server.sh warm-up /workspace/ide-probe
16 set +e
17 - name: tailscaled
18 command: |
19 if [ -n "${TAILSCALE_STATE_MYPROJECT}" ]; then
20 # restore the tailscale state from gitpod user's env vars
21 sudo mkdir -p /var/lib/tailscale
22 echo "${TAILSCALE_STATE_MYPROJECT}" | sudo tee /var/lib/tailscale/tailscaled.state > /dev/null
23 fi
24 service tailscaled start
25 service tailscaled status
26 - name: tailscale
27 command: |
28 if [ -n "${TAILSCALE_STATE_MYPROJECT}" ]; then
29 sudo -E tailscale up
30 else
31 sudo -E tailscale up --hostname "gitpod-${GITPOD_GIT_USER_NAME// /-}-$(echo ${GITPOD_WORKSPACE_CONTEXT} | jq -r .repository.name)"
32 # store the tailscale state into gitpod user
33 gp env TAILSCALE_STATE_MYPROJECT="$(sudo cat /var/lib/tailscale/tailscaled.state)"
34 fi

Curated by Sebastian Synowiec

Subscribe to our newsletter and never miss an article