8 ms·
How To Use Amazon EC2 as Your Desktop
- piers 16y agoSorry but that seems a lot of effort to go through. Why would you bother?
- hsmyers 16y agoI don't mind the effort, but I'm too cheap for the kind of fees he is talking about. Given the price of a white box of almost any capability, better can be had at your corner computer shop...
- adrianbye 16y agogive it a few years and that will change dramatically
- mleonhard 16y agoLearning to use EC2 for development is a great way to learn to use it for production.
- gnufied 16y agoI disagree. Running EC2 isn't rocket science. With web console, they have made it more simple. What is little hard is, auto load balancing, shutting down instances based on req/minute, monitoring and stuff. But you don't play with that, if you are using remote EC2 machine as desktop.
- benmccann 16y agoDevelopment and production can run on the same network then, which depending upon what you're doing can make development way faster.
- listic 16y agoYou might want that if you want to have your setup with you no matter where on Earth you happen to be. I was thinking of using a dedicated server for this for a while, with visualization maybe: a VM for server, a VM for my desktop... Using EC2 for this instead gives you an option to relatively easily choose from several locations in different parts of the world. Also it forces you to learn using EC2.
- othello 16y agoI have been doing this for a year with a Linode small instance and it works like a charm - although I only use it through a Putty terminal. I had initially set it up to code small ruby scripts remotely that help me with my day job (mostly to scrape websites with the excellent Scrapi gem). Since IT would not let anyone install anything on their computers, but still left port 443 wide open, I gave it a try. The added benefit is that working on a linux box through Putty forces you to learn a real terminal text editor - in my case Emacs. I guess I can thank IT now ;)
- mleonhard 16y agoI've had a Linode for 3 years and love it, too. I spend about $240/year for a node with 512 MB of memory. But EC2 is more economical, providing 3x the memory for nearly the same price, plus much more CPU power and great disk IO performance.
- jasondavies 16y agoI'm not sure EC2 is more economical in terms of CPU power, as I think Linode gives you access to up to 4 Xeon cores depending on load (which is generally quite low) so you probably get more raw performance from a Linode instance despite having less memory.
- bluegene 16y agoIMO, Linode is the best for this use. I pay around $22/month for 512MB/16GB/32-bit Linux instance and the instance is always on.
- dustingetz 16y agohow is that any different from a micro-tier EC2 instance? seems to be roughly $12/month for about the same specs.
- nivertech 16y ago4 Xeon cores on Linode vs. some leftover burst cycles on EC2 micro.
- yuvadam 16y agoWhy would I need a desktop in the cloud? Everything can be done much faster via an ssh command line. I don't get it. Very nice tutorial though, good intro to EC2 for newbies.
- oniTony 16y agoPersistent desktop accessible from anywhere via VPN.
- AdamTReineke 16y agoWith no risk of hardware failure.
- jonknee 16y agoWell, minimal. http://www.google.com/search?q=amazon+ec2+down http://www.google.com/search?q=amazon+ec2+down
- retroafroman 16y agoHe said he shuts the machine down on nights and weekends. I am not familiar with EC2, but doesn't that mean that the desktop isn't persistent from day to day? Yes, he can connect and disconnect at will throughout the day while it stays the same, but shutting down the machine at night shuts down all the apps he had open I assume. Am I wrong?
- dedward 16y agoNo differently than if you shut your computer down and boot it up again, if he's configured it accordingly with an elastic block store for the filesystem, etc.
- JulianMorrison 16y agoNot if you shut down with "hibernate".
- drivebyacct2 16y ago
- mfontani 16y agoHmm, private key posted fully in the image...
- w1ntermute 16y agoProbably not the one he actually uses.
- mleonhard 16y agoYou can type it in and try it out... :P
- dustingetz 16y agoon a similar note, I've been doing web development on my CR-48 with an ec2-hosted development environment. I documented my setup here: http://www.dustingetz.com/dev-etc/app-engine-web-development-on-your-cr-48 http://www.dustingetz.com/dev-etc/app-engine-web-development...
- mmastrac 16y agoRe: your post. No need to kill ssh when it hangs. Type <ENTER> <~> <.> to kill the session. There's other commands available - type "~?" to see them.
- jonprins 16y agoThanks for this - I've been running into similar problems. I'll try it out when I get back to my cr48.. didn't bring it into the office today.
- drdaeman 16y agoWhat's the point of the cloud? Sure, EC2 scales well, but does desktop needs scaling? (Unless you want to buzzword that your desktop is web scale, haha)
- edu 16y agoit's accessible from anywhere at anytime (if you don't shut it down) from any device capable of executing a ssh client (iPhone, iPad, for example) also you can have a development environment exactly equal to your production environment and you are safe from hardware failures.
- drdaeman 16y agoSo is usual non-cloud hosting. Well, not turning off my home desktop PC is certainly not "cloud", but, given I have fast and stable network connection and power supply, it works equally (?) well. That's why my question emphasized the "cloud" word.
- bane 16y agoIt'd be neat to start dynamically adding more cores or RAM or storage as you start to hit capacity on an instance.
- somabc 16y agoThis does have the obvious problem that you need a PC / Tablet / Laptop to connect to Amazon EC2 in the first place so why not just use that.
- jarek 16y agoIn this specific example it's a problem because a fair bit of local software is required. If you set it up so that all you have to do is VNC or RDP, possibly over ssh, all you need is a USB key and access to a computer to get access to your computer.
- bjonathan 16y ago2noobs questions: - Do you think that it's possible to use AWS Free Usage Tier with micro instance do to that ? - Is it possible to have a graphic interface?
- mleonhard 16y ago- A micro instance should work, although you'll only have 600 MB of memory. Also, I hear that micro instances have poor cpu scheduling, which would make your apps to feel jerky and sometimes freeze for 1-2 seconds. If you try it please let me know how it works. - FreeNX provides a graphical interface. It makes your Linux program windows appear on your Windows machine.
- tdfx 16y agoI don't know about the FreeNX server, but if you use a lightweight window manager like fluxbox 600MB of memory will be more than you need for most things.
- dustingetz 16y agooh, i assumed the jerking was lag! that explains a lot!
- edu 16y agoYes, the Linux Micro instance should be enough to run a development environment. And yes, you can have a graphic interface, but I'm not sure it's your best option (both for bw. And memory usage if you're in the micro instance might be a little bit to high.
- ylem 16y agoOne reason that someone might want to do this (besides learning about ec2) is if they are itinerant. For example, suppose you work for a company where you travel a lot and there are restrictions on vpn usage--you could start an instance of this (assuming that you can still comply with the IP/PII policies of your workplace) and access it from anywhere. Another thought--if you are playing with web services such as twilio for example, you need an IP address for the response to your REST requests--this could be a problem for people doing development at home without a static ip (sure, you could use localtunnel, but this does have some appeal). This way, you can test this on your development machine without going live... Anywho, just a few thoughts.
- dholowiski 16y agoThis is exactly why I set up my first (and now my second0 EC2 instance for development. I've been playing with services that need an external static IP address. My ISP is pretty hostile towards that kind of thing, and it's a PITA if you're travelling and need to do some work.
- adelevie 16y agoI just learned how to do this! If anyone's interested I could write out the steps for doing this on Ubuntu. I've been toying with the idea of offering managed dev environment using this. Some pain points it would solve: -no new installation/configuration when you buy a new laptop -let an outsourced sysadmin take care of annoying things like installing java, adding environment variables, installing mobile app sdk's etc. -environment is accessible anywhere you have Internet access The ultimate benefit is: spend less time installing things and more time developing. I probably don't know enough about UNIX to do this myself, but I think it's a worthy idea.
- russell_h 16y agoIMO the problem you will run into with that is that most developers seem to heavily customize their dev environments. I'd love to be wrong about that though, because there are times when I'm setting up a new one when I'd love to be able to pay someone to do it for me.
- trotsky 16y agoIt'd be difficult to trust the admin in that case. Same reason you see instructions for how to shrink the official ubuntu ami down to something smaller for a micro instance instead of a blog that say "here, mount this one I already shrunk"
- balaa 16y agoI've been doing this for years. Surprised that its number 1 on hacker news, weak.
- va1en0k 16y agoI did something like this with Dropbox: http://valyagolev.net/article/develop_windows_linux/ http://valyagolev.net/article/develop_windows_linux/ bash on windows without Cygwin's lameness. problem solved (I moved to ubuntu & emacs eventually, although their usability is crazy)
- quanticle 16y agoI read your article, and I'm still wondering why you didn't install a virtual machine. Is there any particular reason?
- va1en0k 16y agoyes. i tried them but they weren't nearly as fast as I wanted. they were like cygwin in terms of perfomance and slowed down the whole old laptop of mine
- adrianbye 16y agothis is pretty fascinating. we're already seeing people switch over to the new mac air which runs IOS. once it becomes more cost efficient to run your desktop in the cloud its clear this is a major trend which is about to start and permanently change computing. far for the better IMHO, i'm sick of handling upgrades myself.
- oldpatricka 16y agoWhat are you talking about. What Macbook Air runs iOS?
- torpor 16y agoiPad ..
- quanticle 16y agoThis works out to about $315 per year for a development machine. Am I the only one who thinks that's ridiculous? I mean, after two years, you'll already be at the cost of a decent laptop. Three years will get you the cost of a MacBook. Unless you're upgrading your laptop every year, there is no way that this is cheaper than developing on localhost.
- dustingetz 16y agoits not like its massively more expensive or massively cheapter, so they aren't competing on price.
- mitko 16y agoEC micro instances are 56$/year (reserved) and in a combination with version control tool like SVN I don't see why one would pay > $300/year
- tedunangst 16y agoIt's accessible from more places than your laptop is, unless you take your laptop with you everywhere. You could demo something to a friend for instance.
- sorbus 16y agoIt's accessible from wherever you have a computer with the necessary software and a fast enough connection. Sure, if you don't have your laptop then this could be useful, but that's like saying that a land-line based system for managing your address book is good because it's accessible from more places than your phone is, unless you take your phone with you everywhere.
- tedunangst 16y agoUm, exactly? Memorizing important numbers is a good idea precisely because then you can use a friend's phone in case yours isn't available.
- Periodic 16y agoA few years ago I stopped thinking in terms of desktops. This was around the time that I settled into system administration and web development for multiple groups at a time. I set up my Linux desktop and began to really develop good command-line skills. I also made the effort to learn Vim. A few years on and I really don't think about my computer, but rather a network of computers. It is not uncommon for me to be logged into four different systems at a time, running different things on each. If I need more processing power, I log into one of the beefier systems and start a job. If I'm just editing email it's local, but if I'm editing web files, it's probably on a server hosting my dev instance so my changes are live. I just do each task wherever it is most appropriate. The real change is that you stop having one entry point to your "computer". I can access the same resources from almost any laptop or desktop. I keep desktops with large dual monitors at work and at home and rarely worry about synchronizing them because the work is actually being done in the same place. It really is liberating to build your own set of cloud resources and realize that your desktop is just another resource at your disposal in your network.
- borism 16y agoit's great to see people finally starting to get it 20 years after initial Plan 9 development :)
- alsocasey 16y agoThis is the setup I aspire to one day have. I've spent the better part of the past 6 months getting very comfortable with the command line and editing within the shell via emacs - now if only I could convince work to make the server I run all my analysis on be accessible from my home...
- cookiecaper 16y agoI do the majority of development locally and I find it works out just fine. I have ssh open to my machine and have a bunch of git repos offloaded to a server somewhere so I can work from practically anywhere, too. You don't have to have a network of four-five computers to work this way. :)
- dedward 16y agoTried following the instructions - ended up with some "command not found" stuff when trying to connect with the NX BEta client for OSX (the older client requires rosetta, which most modern OSX machines don't have) The instructions could use an update to the latest version of ubuntu too.... but this will make for a fun weekend project - excellent find (more for the EBS shortcuts and bootstrapping method + NX tips than the concept itself)
- dedward 16y agoToo late to edit - works fine with the previous rosetta client -just not with the beta. Cheers.
- andrewf 16y agoOS X will prompt you to download and install Rosetta from Apple, hassle-free, if you attempt to launch a PPC application and you don't have it installed already. It only works if you're launching an app bundle, though, not if you're trying to run a bare binary from the command line. I just downloaded some old PPC-only shareware app and launched it. Apparantly there's a .pkg file somewhere on the OS install DVD too, but I couldn't find it on my MacBook's restore USB stick.
- ajmurmann 16y agoI did this a few weeks ago and tried to use it form a fairly old MacBook. I intended to use RubyMine which had a few minor issues while scrolling. What kille dit for me however was that all short keys would go to my local machine. Since using RubyMine lives from extensive short key usage this setup wasn't an option for me. The nice thing however is that you can also stop your instance and only pay as you go.
- code_duck 16y agoI'd actually tried to do this on a Linode machine before, but could never get NX to connect. VNC worked but is a bit slow, of course. Actually, I've never seen NX actually work. I'll have to try the directions here and see how it goes.
- marcamillion 16y agoI am trying to figure out exactly what restbackup.com does. Does it backup customer info from a desktop app or the web app? Anyone know?
- mleonhard 16y agoRestBackup is a web service. You can HTTP PUT files to https://us.restbackup.com/ https://us.restbackup.com/ and then HTTP GET them later. The uploaded files are deleted automatically after a specified period of time. The RestBackup Management API lets you create separate backup accounts for your users. Your app/script/cronjob can back up each user's data from their machine/device to a separate and private account. Using RestBackup, you can have automatic backups without adding any new servers or equipment. It works for mobile apps, desktop apps, and hosted applications. It also works well for normal file backups. At the moment, the only way to use RestBackup is with curl or your own program. More client software will be available soon.
- marcamillion 16y agoAhh...I see. Well, if you don't mind, can I give you some feedback (assuming that you are the founder). On the landing page, talk about benefits - not technology. No matter how much I read and searched the site, I couldn't figure out what it does and who it does it for. It's not because I am stupid either, well...could be but I doubt it. I would choose one niche, and communicate that in the copy on the main page. Also, pricing is an important value communicator. Honestly, I think your pricing is too cheap. Perhaps you should figure out another way to charge more. $9.99 is WAYY too cheap, and it worries me that you might not be around - especially for my backup purposes. I don't want to be worried that you are going to disappear. Hope that helps!
- limmeau 16y agoOne advantage of this setup not mentioned in the article: you needn't be afraid of ${airport_security} searching your laptop at the border.
- kayoone 16y agoSince you will still have your local computer running to actually use it, you have to add its electricity costs to the dev machine cloud hosting aswell. You actually also need to buy the local machine to do work anyway, so it doesnt save any money, but adds 300 USD to your current dev enviroment. That said, i can get a plain old Vserver similar to an EC2 mini instance (i think its even more powerful) for 80 bucks a year and that would be running 24/7. If you dont need the benefits of EC2 which are scaling and such, there are much cheaper solutions.