Skip to content

Instantly share code, notes, and snippets.

@mark2aws
Forked from alexellis/GUIDE.md
Created June 10, 2022 16:30
Show Gist options
  • Save mark2aws/0a97a3077b172317e96863201f40a34d to your computer and use it in GitHub Desktop.
Save mark2aws/0a97a3077b172317e96863201f40a34d to your computer and use it in GitHub Desktop.
Equinix Metal is my computer

Equinix Metal is my computer

Run hosted VSCode on Equinix Metal's huge: AMD Epyc instances with 64GB RAM and 24 Cores, coupled with a bonded 2 x 10 Gbps uplink to the Internet.

Hosted VSCode

  • Provision your Ubuntu 20.04 LTS server using the dashboard and add your SSH key
  • Once you have the public IP, log in over SSH

You'll need to install any runtime environments you want to use through the built-in terminal, such as:

  • Go - download directly for the latest version
  • Node.js
  • Docker - curl -sLS https://get.docker.com | sudo sh

Many CLIs are available through the arkade get command, you can get arkade here

Option 1 - hosted IDE

  • Install tmux on the server: sudo apt update && sudo apt install tmux -qy
  • Run tmmux - for instructions on this tool see: You need to know tmux
  • Run the installation script: curl -fsSL https://code-server.dev/install.sh | sh
  • Run code-server --link

Now you can access your browser through a tunnel via https://example.cdr.co, changing example for the URL printed out to you.

Open the integrated VScode Terminal and check out your specs:

# nproc
48

# free -h
              total        used        free      shared  buff/cache   available
Mem:           62Gi       1.7Gi        60Gi       9.0Mi       851Mi        60Gi
Swap:         1.9Gi          0B       1.9Gi

Test the Internet uplink speed:

# curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
# sudo apt-get install -qy speedtest

# speedtest

   Speedtest by Ookla

     Server: Claranet Benelux B.V. - Amsterdam (id = 30847)
        ISP: Packet Host
    Latency:     0.60 ms   (0.01 ms jitter)
   Download:  8247.24 Mbps (data used: 3.9 GB)                               
     Upload:  8899.98 Mbps (data used: 9.2 GB)                               
Packet Loss:     0.0%
 Result URL: https://www.speedtest.net/result/c/1cf0b9f5-f345-494b-877e-00953cebcde2

You can make the code-server permanent by running: sudo systemctl enable --now code-server@$USER

code-server can also be run as a Docker container, but requires more work to configure TLS and authentication, see also: openfaas-incubator/workshop-vscode

Option 2 - remote workstation over SSH

You can also run VSCode locally as a native app on your computer, then bridge to it over SSH.

Your code will be checked out on the remote server and so you should remember to commit the code, or copy it to another computer before deleting your Equinix Metal host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment