Headless Linux with Google Compute Engine DesktopGCP
UPDATE: I now use terraform to reduce the cost of SSD with a snapshot and automatic deployment. mode details here
This is my first try to setup a
headless remote desktop on google cloud compute engine.
Why ? #
I can access to my computer anywhere, even on lunch break.
I could get a small chromebook and still access to a powerful computer.
I'm not a gamer, I do just code and devops related stuff.
Network ! I dont have that fast network at home. Now I download new software in seconds.
I also made a Windows computer on Azure, Azure for the Windows 10 licence cheaper than Windows Datacenter that GCP dont have. It' a computer for Photoshop, because my PC crash PS anytime because of the GPU.
What it's look like #
This is what we talking about, xfce in google cloud compute engine desktop.
Here's my choices #
- Preemptible, it really drop costs. (Check google compute enginge preemptible). Preemptible doesn't meen
you'll lost your data if you are preemptible. It just meen your server will be stopped. You have to turn it
on again if you want to. I am not been preempte to often, it would be too frustrating.
- Something between n-standard-4, n-standard-8 or n-highcpu-8 to get comfortable with.
- SSD, but maybe not that useful, I could change my mind and setup quickly another server with the script.
I'm still in free period test so i'll check this out if I run out of free credits.
- Google Remote Desktop, very easy to setup.
I tried vnc, tightvnc. One thing is GRD doens't need static IP as I turn off the computer and don't reserve an IP.
- xfce because of bandwidth concern, and it's nice, light.
- Some kind of init script with all commands ready to setup a desktop. This help for tests, (SSD vs HHD), clean install, ubuntu releases...
It's been a week with, seems fine.
Google App or website ? #
What about the client, There is a difference between the app and the remote desktop website, the website take much more bandwidth.
Note a weird behavior whit alt-gr key, need to press a longer time that usual, useful for
| @ ... in french keyboard.
Also need to be activated in keyboard setup as seen on several stack overflow posts.
- Website at home, because the app does not catch windows key, so I have both remote and host menu that popup when windows
or ctrl-alt based hotkey pressed
- App at work, because of the bandwidth, you know... The connection seems a little less stable than the website.
Not sure it's related to the work connection.
About the bandwidth, the website act like he need to send a lot every time, the app send just what it's needed.
I'm not playing games, I almost just write. Write code, command line instructions in terminal,
blog post in sublime text that's mean 99.9% of the screen doesn't change 99% of the time, even if I was the fastest coder in the world.
What's the cost of it ? #
- 50Go of SSD would be 8$ per months, (2 for HHD)
- n1-standard-4, let's take an average of 3 hours per day, 30 days per month, that's 3.6$
- no upfront costs.
That's around of 5$/mo for HHD, 11$/mo for SSD.
I'll come back here once I'll get more insight about cost.
Now, I'm using a SSD, but paying only when the computer is on with Terraform: mode details here
HHD is a bit slow when coding with PhpStorm, but 50Go of SSD is costy. I'm trying a 20Go SSD and changed xfce for cinammon. Cinammon take more CPU resources than xfce, so I'm trying the n1-standard-8 instead, still in preemptible mode for cost reasons.
The cost would be 11.50$ with the same 3 hours per day average basis.
- Cinammon seems to be a good choice, i'll stick with it.
Here's a link for the remote setup from the google's doc himself.
- I'm trying a custom setup for custom engine with 10 CPUs and 14Go of RAM.
- Stick with 20 Go of SSD.
- The overall price (with preemptible) seems to be very affordable even with 10 CPUs.
I just bought myself a chromebook, an acer R13, this was the original
idea, a powerful headless with a light frontend terminal. It works fine
but I haven't done some serious coding sessions yet.
Is still a very good solution for afordable computer. For game purpose, it can work, you can setup a GPU even preemptible. One thing to considere is the bandwith that can
become the first expense. Games has pixels that refresh fast, meaning important egress costs to considere. For occasionnaly users, it still can be a good deal,
I don't mind spending few bucks to have a game desktop accessible from everywhere. It depends as usual.
Example price: for 2 hours, 1€, 3/4 of the price was for bandwith.