Todd's Place
I don't do these:
  • Last Seen
  • Blog
  • Contact
  • Air Quality

Hacker Pro Tip

1/18/2017

0 Comments

 
We leverage Amazon AWS a lot, especially EC2. For instance, we are developing a build script which takes 1-2 hours, on a quad CPU, 8GB RAM VM! We think we might be able to get this down to 15 minutes someday. Not everyone has the luxury of a new iMac Retina 5k with VMware Fusion, but all software developers should have access to such tools. This combination easily pays for itself in productivity.

However, you can replicate this for a fraction of the cost, with judicious use of EC2. For example, an on-demand t2.xlarge, c4.xlarge, or m4.xlarge costs roughly 20 cents per hour. You could have a script start the instance, kickoff a nightly build, transfer the results to an S3 web directory, and shut itself down when done. This would cost less than 50 cents per day.

If you have developers around the world, as we do, then sharing access to one of these instances works great. You want to use EBS-backed instances, so that you can snapshot the instance regularly. That way, if the stack gets horribly borked, you can revert to a known last config. You can also clone a VM for someone else very quickly. You only need a powerful, quad CPU instance for big compile jobs. You can take the same EC2 instance, stop it, and increase or decrease its computing power, then start it again. This way, your costs can range from $5/mo to $150/mo, for full time access. Be sure to enable "termination protection"! For sharing VM's with other contractors, consider ylastic.com, a fantastic service which allows point-and-click starting and stopping of instances.

OK, so everything is awesome. What's the catch? Well, there is the usual foolishness where, if you are working remotely, or over VPN, or over WiFi, or your laptop needs to sleep, etc... , then your SSH connection can get terminated. This will terminate all the processes related to that connection. If you kicked off a build and go get a coffee, your build can die.

​The cure for this is an amazing free mobile ssh shell called mosh. Below you can see a demo where I have multiple mosh sessions open to multiple EC2 instances, one of which is building a long compile. I sever the network connection, and reconnect. The compile, and everything else, continue as if nothing happened. I close my laptop and reopen it anytime I like. Work continues uninterrupted. Enjoy!

0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    I'm an applied-math-research Ph.D. and serial startup founder. I am a recognized computer security expert, fortunate to join the ranks of many, great CTO's. I've founded and seed-funded multiple, successful, VC-backed companies. I'm still at it!

    My wonderful wife and I moved from New England to near the Portland Oregon area. We LOVE the Pacific Northwest, and we've been here a few years now. We have an adorable baby girl, Vivi.

    People here are nice and smile a lot. Vegetables are insanely delicious. Driving is not like Mad Max.

    This blog is very Vivi-centric. Our family just can't resist. :) Also, there are some stupid hacking and geek tricks.


    Archives

    December 2020
    November 2018
    October 2018
    September 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    June 2014
    April 2014
    March 2014
    January 2014
    October 2013
    April 2013
    March 2013
    February 2013
    January 2013

    Categories

    All

    RSS Feed

Copyright 2012-2021  Todd Brennan