37 ms·
Free Linux cloud shell for Gmail users
- sneak 9y agoLast I looked, Cloud Shell was still pretty tiny instances, with no paid option for more (wth isn’t there a super boost mode that I pay for, at least?!), and the integrated editor was meh. I suppose I could use it with the gcloud CLI and docker-machine as a sort of orchestration console to bring up more boxes, but then I have to remember to kill them or I get a huge bill. (This has happened to me on DO before.) AWS Cloud9 lets me pay for a single big honkin ec2 that backs the IDE, has a better editor, browser ssh support—and has a built in option to suspend the “expensive” instance after 30 mins of inactivity. I loved Cloud Shell but the inability to let me pay for a bigger backing instance or more storage is a real limitation. (One of my commonly worked on projects takes 25 mins to compile on a boost mode Cloud Shell instance, and operates on ~80GiB of data.) Cloud9 is at a real advantage here. Whoever first integrates Atom, though (all of these seem to use Ace), I think will be the real winner.
- wyclif 9y agothe integrated editor was meh Cloud Shell has Vim 8 installed, which you can use instead.
- sneak 9y agoI meant the local one. Remote editing over ssh is a nonstarter.
- dragonwriter 9y ago> I loved Cloud Shell but the inability to let me pay for a bigger backing instance or more storage is a real limitation. Except Cloud Shell has Boost Mode: https://cloud.google.com/shell/docs/features#boost_mode https://cloud.google.com/shell/docs/features#boost_mode > Whoever first integrates Atom, though (all of these seem to use Ace), I think will be the real winner. Google's is based on Orion, not Ace.
- sneak 9y agoBoost mode is still not a powerful instance.
- seoguru 9y agoThis is nice. If we could ssh into it, it would be great! Is that feature coming soon?
- thesandlord 9y agoI don't think that feature is planned. However, you can get a f1-micro VM for free: https://news.ycombinator.com/reply?id=16248668&goto=item%3Fid%3D16247577%2316248668 https://news.ycombinator.com/reply?id=16248668&goto=item%3Fi...
- emmelaich 9y agoYou're allowed out to port 22 so maybe you could some tunneling. Haven't tried it and it may be against the conditions.
- supervillain 9y agoNo Ruby Pre-installed.
- emmelaich 9y agoWorks for me. $ ruby --version ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
- supervillain 9y agoInteresting, upon 'ps aux', There's a 'sleep infinity' process running.
- dvlsg 9y agoDocker maybe? I know that's one way to keep a docker container open.
- mschuster91 9y agoHow does this work? Given that its PID1 is not a "real" init process but a bash running the script `/google/scripts/onrun.sh` and its / being type `aufs`, I guess this is a Debian Docker instance?
- emmelaich 9y agoYep, /etc/debian_version is 9.3. It has a docker0 network interface (among others)
- mschuster91 9y ago> It has a docker0 network interface (among others) That's for the dockerd which is running inside the ... VM? The interesting thing is that the uptime and dmesg show that this system is not shared on the kernel level - if I were to guess, I'd say that Google allocates a real virtual machine with a tiny OS running Docker, starts the docker container inside this VM and then grants you webshell/ssh access to this Docker container. But why the Docker setup when the machine is yours anyway?
- emmelaich 9y agoYou're right... and docker works: $ docker pull hello-world $ docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. .... Not surprising since two of the outgoing ports allowed are 2375 and 2376 -- the docker non-ssl and ssl ports.
- Shoothe 9y agoA minor note: docker run will download the image if it's not already present. No need to pull manually (unless you want to go offline or something like that).
- emmelaich 9y agoRegarding whether it is a container or VM I'd guess the former. But not Docker. More likely Google's own container tech which I'm pretty sure way predated Docker.
- alexdong 9y agoPython 2.7 by default?
- toyg 9y agoPython 3.5 is also preinstalled.
- emmelaich 9y agoWow, even has dotnet. Including C#, F# and Visual Basic. $ find /opt/dotnet/ -name \*.sh /opt/dotnet/sdk/2.0.0/Roslyn/RunCsc.sh /opt/dotnet/sdk/2.0.0/Roslyn/RunVbc.sh /opt/dotnet/sdk/2.0.0/FSharp/RunFsc.sh ....
- daurnimator 9y agoNo Lua preinstalled
- ShabbosGoy 9y agoI setup an IPSec tunnel on it a while ago just to test , pretty neat IMO
- h43z 9y agoInteresting how they make use of tmux sessions for the cloud shell session feature.
- _wmd 9y agoIf they just took the staff time poured into this toy and devoted it to fixing up the morass that is the GCloud web UI's Javascript, something actually useful might have come out of those salaries. Meanwhile, we have a bloaty CPU hog of a web UI and some wannabe terminal emulator hack. Tacking an emulator for a 1950s teletype on the side of a web app is not innovation, so sad!
- inlined 9y agoThis is actually a great teaching tool. Firebase (my team) uses them for in person code labs. It's a huge time saver to know that everyone already has access to a Linux machine with the developer tools and helps the class jump right into meaty bits. Also, fetching dependencies to a machine in a data center avoids bringing down the wifi in a class.
- sfev 9y agoActually if you’re frustrated with the web ui then just drop into a cloud shell instance and do everything from there “in the command line” And even though the UI can be a bit sluggish at times i can’t say AWS was any better last time I used it
- decentrality 9y agoWith my Google Chrome 64.0.3282.119 instance, there is no user selector it seems, which is causing authentication to fail, which then causes an infinitely repeating loop of reconnection attempts all leading to a 404 or 401 response in JSON.
- thesandlord 9y ago(I work for Google Cloud) If you want to learn more about Cloud Shell, the marketing page is here: https://cloud.google.com/shell/ https://cloud.google.com/shell/ Cloud Shell is one of my favorite things about GCP. A lot of dev tools (Docker, Python/Go/Node/Ruby/Java/.Net, etc) are pre-installed, you can test "localhost" servers with the preview feature, there is a built in file editor (based on the open source Orion project), etc. And it's all free! This link will directly open the shell in a full page, and I'm not sure it will work unless you have set up your GCP account before. It's really not designed to be opened this way, I recommend opening it from the GCP console and then making it full screen if your want. Also note: Cloud Shell gives you a persistent 5GB /home Directory, but every other folder is reset after a while. If you want to add your own binaries, I'd recommend adding home to your path and installing them there.
- jnbiche 9y agoThanks for the summary of Cloud Shell, I was not previously aware of it. Any idea why Apache and Gradle are installed in the root directory? Normally, these would be in `opt` or some such.
- jarvelov 9y agoMost likely because of this [0] > any modifications that you made to it outside your $HOME are lost. [0] https://cloud.google.com/shell/docs/limitations#custom_installed_software_packages_and_persistence https://cloud.google.com/shell/docs/limitations#custom_insta...
- jnbiche 9y agoWell, that applies to the user, not to whoever spun the distro to begin with. Google could have put them wherever they wanted. Anyway, not a huge deal, just a bit odd. And evoking my OCD: ...must...keep...clean...root.
- toyg 9y agoCan I give you a tidbit of feedback? If the instance is ephemeral, I need to manage everything in HOME and that's fine. For Python, that basically means using Virtualenv. That works fine at the moment for python 2.7, but 3.x on Debian requires the package python3-venv, which is not installed by default - and sure enough, it's missing in Cloud Shell. It's a bit annoying having to apt-get install python3-venv every time. Any chance it could be preinstalled? It's such an essential tool for modern python development...
- jwilk 9y agoIt's available for to anyone that has a Google account. You don't have to be a "Gmail user".
- alberts00 9y agoYou do need to register as a business if you are located in EMEA. There is no private/personal option. This is a huge showstopper for me and, in my opinion, anyone who wants to use it for educational purposes.
- toyg 9y ago> You do need to register as a business if you are located in EMEA. Is that a T&C rule or a technical block? Because I'm in EMEA, not registered as a business, and it opened for me just fine.
- alberts00 9y agoIt's inquired when you first register for GCP. If beforehand you've selected EMEA country there will be no option to choose between personal/business. GCP support did respond to my inquiry and they specified that it's the case in whole EMEA. P.S I just tried and it appears they've added option to switch to "Individual". Great!
- jwilk 9y agoYou don't have to register for GCP to use the cloud shell.
- insomniacity 9y agoI recall there was a specific reason for this - does anyone else know why? Is Google working on the legal/tax implications of fixing it?
- JorgeGT 9y agoI believe it's individual VAT handling. They've solved it for EU citizens but for instance, about Russia, it still says [1]: "In Russia, Google Cloud Platform services can be used only for business purposes. Warning: If the sole purpose for which you want to use Google Cloud Platform services has no potential economic benefit you should discontinue your use of the service" It used to say the same thing about EU citizens for a while. The line about "no potential economic benefit" is pretty bizarre as far as far as I've seen... --- [1] https://cloud.google.com/billing/docs/resources/vat-overview?visit_id=1-636526910870897262-2921753515&hl=en&rd=1 https://cloud.google.com/billing/docs/resources/vat-overview...
- jwilk 9y agoBefore you get excited, read about limitations: https://cloud.google.com/shell/docs/limitations https://cloud.google.com/shell/docs/limitations
- wklm 9y agocan I ssh into it? does it have a public ip?
- thesandlord 9y agoIf you want a free Linux box with a Public IP and SSH, I'd recommend spinning up an f1-micro VM. It's part of the permanent free tier: https://cloud.google.com/free/ https://cloud.google.com/free/ Cloud Shell is a "temporary" instance, really meant for interactive Dev/Admin work. (I work for GCP)
- e12e 9y agoThanks for taking the time to comment. I wasn't aware there was a free tier. I really appreciate that it's an actual free tier: "Thanks for signing up for the 12-month free trial. We've given you $300 in free trial credit to spend. If you run out of credit, don't worry, you won't be billed until you give your permission." [ed: and as mentioned above there are instances that don't consume any of those 300 credits]
- thesandlord 9y agoSo there is the free trial and the free tier. The free trial is $300 for 12 months that you can spend on pretty much anything (I think there are some limits on GPUs due to abuse). The free tier is free forever, no dollar limits or time limits. This includes the 24/7 f1-micro, 28 App Engine hours per day, Cloud Datastore, Firebase stuff, some Cloud Functions, etc.
- devereaux 9y agoIn the free tier, is it "fair game" to run 10 instances of the f1-micro? I would like to test the throughput, measure uptime over a few months, and check how well it handles DDOS. I would configure 10x static IPv4 and IPv6 to make sure it does not impact anyone else. I plan to setup a nginx serving a few static pages with a Round Robin DNS on a subdomain.
- tritium 9y agoDoes this have something specific to do with Gmail? Or is it just that it’s another thing (a separate, independent feature of your Google account) that you get for free, as part of being a Gmail user?
- thesandlord 9y agoThis has nothing to do with Gmail. It is part of Google Cloud. Both Gmail and GCP use your Google Account. The title is misleading. (I work for Google Cloud)
- ryancnelson 9y agois this down at the moment? (Sat Jan 27 23:18:48 UTC 2018) the ux seems to be hanging, trying to contact https://ssh.cloud.google.com https://ssh.cloud.google.com ... "slashdotted?", or whatever the hackernews term for that is?
- ryancnelson 9y ago... of course, moments after i posted this comment, it started responding again. Growing pains, I suppose, or temporary burp.
- lallysingh 9y agoDelay for spinning up new instances?
- derefr 9y agoAnd if you'd rather use something on a higher level of abstraction, there's also Google Apps Script (https://www.google.com/script/start/ https://www.google.com/script/start/) From one way of thinking, Apps Script is a lot like AWS Lambda; but from another way of thinking, Apps Script is more like OS automation workflows that happen to run in your cloud account rather than on your computer.
- ameliaquining 9y agoPersonally, I think of Apps Script as being more like the cloud-based equivalent of VBA.
- inlined 9y agoI always thought the better parallel for lamda was cloud functions, but I might be biased.
- asadlionpk 9y agoThis looks cool. I wonder how does the sandboxing work since it looks like docker but some things are different. I am curious because we made a somewhat similar tool for conducting interviews[1] but ours has collaboration too. [1] https://codepad.remoteinterview.io/ https://codepad.remoteinterview.io/
- massimosgrelli 9y agoI run sudo npm install -g n and then sudo n8.9.4 but I got an error "sudo: n: command not found". How can I use n?
- gimmeayrwlt 9y agoDoes this tool recovery all deleted accounts also ? Google disables accounts when you dont follow google's agenda or you have been flaggwd as russian troll.
- diameter 9y agoWhy comments are hidden in hacker news? Are you guys censoring comments ??
- netrc 9y agoWould be great for your shell to automount your Google drive. (I know Google Drive isn't a real distributed file system, but the point stands... and if GDrive doesn't work, how about Google making an actual distributed/network file system that I can own for this purpose, like AWS EFS?)
- jacksmith21006 9y agoThis is pretty cool. Thanks for sharing.
- Cyberis 9y agoWow, I find GCP to be much less straightforward to use than AWS.
- mikeymop 9y agoWow, Debian 3.9 kernel. Has ssh, vim, tmux, and docker installed. I'm guessing this is either a container itself or a Debian vm. I'm still finding new things that are installed and useful. I would find myself using it to QA docker compositions I write. The question is can I host from this instance?
- audscias 9y agoIt's a container. And what do you mean by host? You can definitely run containers in it, and an ephemeral external IP. There is a button at the top right that shows what you are running on port 8000 from the outside, handy to test whatever you are running.