Browser server on Google Cloud
A Compute Engine VM behind an SSH tunnel — with the nicest tunnel
story of the platforms here, since gcloud compute ssh manages keys itself.
Prereqs (human)
Section titled “Prereqs (human)”- GCP project with billing enabled
gcloud init(the CLI drives everything, including the tunnel)
Create
Section titled “Create”gcloud compute instances create vibium-browser \ --machine-type=e2-medium --zone=us-central1-a \ --image-family=ubuntu-2404-lts-amd64 --image-project=ubuntu-os-cloud \ --metadata-from-file user-data=deploy/cloud-computers/cloud-init.ymlFirst boot takes ~3–5 min while cloud-init installs Chrome. Bake an
image afterward for ~1 min starts. Spot VMs (--provisioning-model=SPOT)
are fine for disposable boxes.
Connect
Section titled “Connect”gcloud compute ssh vibium-browser --zone=us-central1-a -- -N -L 9515:127.0.0.1:9515 &vibium start http://127.0.0.1:9515vibium go https://example.comvibium stopgcloud compute ssh manages keys for you; chromedriver stays on
loopback and the tunnel is the only way in.
Teardown
Section titled “Teardown”gcloud compute instances delete vibium-browser --zone=us-central1-aPer-second billing.