imjasonh / ideas

A place for me to file issues against myself for things I want to build when I'm bored
5 stars 0 forks source link

Temporary ephemeral interactive shell on Cloud Run #78

Closed imjasonh closed 3 years ago

imjasonh commented 4 years ago

https://twitter.com/alexellisuk/status/1210942968066166784

Give people a temporary browser-based shell environment by opening a websocket to a single-use Cloud Run instance. Shell commands from the browser are invoked on the environment, output is streamed back. When the session is over everything disappears.

Freemium users could pay for some persistent storage backed by, uhh, Cloud Storage? Unclear. Probably not worth it.

Cloud Run requests have a 15-minute timeout (limits). A full 15-minute session would cost $.02, after the 50-hours-per-day free tier (pricing).

imjasonh commented 4 years ago

Cloud Run ("fully managed") doesn't support websockets or HTTP/2, or streaming gRPC. I'd need Cloud Run on Anthos/GKE to use those, and in that case the attack surface exposed to users is a whole k8s cluster, instead of a Google-provided hosted container sandbox.

Closing for now. If Cloud-Run-not-on-GKE supports some streaming protocol I might resurrect this.

imjasonh commented 3 years ago

Cloud Run now supports websockets, and requests time out after 60 minutes.

imjasonh commented 3 years ago

https://github.com/RangerMauve/websocket-shell-service

http://xtermjs.org/

imjasonh commented 3 years ago

https://github.com/imjasonh/shell