Skip to content

host@home

Personal Cloudification

The Urge to Own...

Expensive Paperweights Expensive Paperweights

Something about my personality has seen me always running my own servers. In the late 90s I setup a Pentium 100 with a permanent 28.8 kbps modem connection to the Internet in a wardrobe at my parents house. It hosted my mail and web services for a few years (including 18 months spent living in the U.K.). Something about knowing the system down to the metal, and beyond that even, to the environment has always been important to me. I think amongst systems people I'm not alone.

... versus the Allure of The Cloud

Various factors have led me to abandon (at least for now) my desire to host@home:

  • power consumption (waste & cost) & heat output
  • single points of failure (power, ADSL, theft)
  • desire to eat my own dogfood

A few years back I found other services to be cheaper than Amazon's AWS offerings. I'm currently exploring what has changed since then and how individuals can use Amazon AWS to provide performant, highly available Internet services at low cost.

Mobile is Changing Everything

There are some great tools out there for controlling your Amazon services from mobile devices. Cloud Services Manager is a great app for iOS that enables control of AWS services on the go. My SSH client of choice for connecting from iOS is Prompt by Panic, Inc. These two alone let give you a lot of control from your iPhone (or iPad).

Cloud Services Manager for iPhone Cloud Services Manager for iPhone

Create, start, stop EC2 instances Create, start, stop EC2 instances

Cloudwatch Stats Cloudwatch Stats

Prompt SSH client for iOS Prompt SSH client for iOS

Prompt is remarkably usable Prompt is remarkably usable

ASCII steam locomotive (sl) ASCII steam locomotive (sl)


Cost Savings in Dev Land

When EC2 was first launched you lost everything if you shut an instance down. These days Elastic Block Store (EBS) volumes are the default which means you can stop and restart instances as you need them, paying only for the hours they're running. This can make it more comfortable to tinker knowing you're only paying while you're using it. Running 10 x m1.small instances will cost $0.80 an hour which is quite affordable.

Note that you're charged by the month for the EBS volume the instance uses. The charge includes a charge of approx. $0.10 per GB-month of provisioned storage and $0.10 per 1 million I/O requests. I believe that creating a 10 GB EBS volume and destroying it an hour later would be counted as 10 GB-months but I want to confirm (or refute) this.

To Be Continued...

host@home: Choose A Virtualization Platform

Use Virtualization

If I could offer you only one tip for the future, virtualization would be it. The long-term benefits of virtualization have been proved by scientists, whereas the rest of my advice has no basis more reliable than my own meandering experience.

OK, so which server OS virtualization platform are we going to use in our home data center? We've got a few choices:

VMware vSphere Hypervisor

VMware shows little regard for non Windows folk, requiring us to run the vSphere Client under a virtual machine. running windows. VMware can fuck right off.

Xen

I love Xen and am pleased to see debian is again supporting it. Amazon use Xen for their EC2 service and the last time I looked the majority of big virtual hosting providers were using it. A couple of years back I wrote a web interface for Xen called Xenium.

After all that gushing you're probably going to think I'm recommending you use Xen right? Nope!

Oracle VirtualBox

I think my love for Xen caused me to ignore this option until recently.

VirtualBox is cross platform open source (GPL2) virtualization software for Linux, OSX, Windows and Solaris. It's easy to install and  someone has created a web frontend (phpvirtualbox) for it that looks just like the native GUI.

I've only just started exploring VirtualBox but for ease of installation, freedom and functionality it looks like a winner for hosting @ home.

Things I like about VirtualBox

  • sound from Windows guest is playing on my Linux host
  • mouse moves smoothly with no need to use keys to release
  • easy to share a directory from host to guest (well...windows needed reboot)
  • VRDP gives you RDP even when your OS doesn't

host@home: Setting Up Your Network

[2013-12-19 I'm not currently hosting @ home but Snowden leaks have made me rethink]

My Billion 7300 modem/router does a simple task well My Billion 7300 modem/router does a simple task well

My first step on the path to hosting @ home was to get a good Net connection. I selected a Naked ADSL plan from Australian provider Internode. Australians pay crazy high prices for Internet but $60 a month for 150GB (combined download/upload) doesn't seem too steep. In order to host @ home I needed to disable the Internode network firewall to enable incoming traffic.

Internode gives me a dynamic IP (which I actually prefer). Most DSL routers come with support for dynamic DNS built in and mine does a great job of updating my DNS entry within seconds of my IP changing. All other domains hosted here will have CNAMEs pointing this host only a single hostname needs to be updated when my IP changes.

When my modem light glowed steady on Friday I knew I could get started configuring the router. I'm fond of Billion modem/routers which sell for around $60.

Configuring the router

ADSL Routers tend to be pretty easy to configure via their web interface providing you remember the admin password or have something to poke in the hole to reset it to factory defaults. The other thing you have to work out is the IP address the modem is  running on. For some reason 192.168.0.1 is not the universal standard - my modem was on 192.168.1.254.  Go figure. Here's what I do when setting up a new host@home network.

  • Change root password from the factory default
  • Configure DHCP to handout my ISP's nameservers and my own domain
  • Configure DHCP to IPs from 100 - 200 (I reserve others for manual addressing)
  • Forward incoming connections to a gateway IP (which forwards traffic using HAProxy)
  • Configure dynamic dns

ADSL router updates dynamic dns entry when IP changes ADSL router updates dynamic dns entry when IP changes

I installed apache2 on my gateway host to test external access. You should be able to access it here: home.failmode.com

In the next installment...

The next post will cover setting up HAProxy on the gateway host to so that incoming requests can be routed to the correct internal servers.