Skip to content

virtualization

Vagrant notes

I'm a massive fan of Vagrant's command line virtualisation goodness. This post is me trying to find a public place for my vagrant notes to rest (I couldn't find a cardboard box).

vagrant-hostmaster

This vagrant rubygem plugin automatically updates /etc/hosts on your guests and host box each time you run vagrant [up|provision]

vagrant-vbguest

vagrant-vbguest is a Vagrant plugin which automatically installs the host's VirtualBox Guest Additions on the guest system.

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...

Slicehost RIP

2013-12-19 Linode offers a great service with 1GB RAM VPS for $20/month

slicehost - Built for Developers slicehost - Built for Developers

When Rackspace bought Slicehost in 2008 I suspected it would only be a matter of time before they ruined it. In May 2011 Rackspace announced that they will be shutting down Slicehost. It's sad news for a lot of people who have been a part of the "slicehost community" for this was a company that customers felt a part of. Co-founder Matt Tanase says in this video interview the news "tears him up inside".

When I first signed up for a slicehost VPS in 2006 I was dubious about how $20/month could buy me a server with 256MB memory and 100GB of traffic throughput. There was no signup fee, no minimum contract period and the management software was so simple and clear. My concerns that it would be oversubscribed and poorly supported were proved wrong. I was soon won over!

The guys who ran the company, Matt and Jason, also ran the servers. They chatted with customers on IRC and answered emails. Somehow they even found time to produce a podcast where they spoke candidly about their experiences and plans. Through the podcast the guys really made us feel like we were there with them.

One of the hot topics in the early days was the waitlist. Slicehost was an overnight success and the guys had to deal with its popularity. The waiting list for new VPS's was stretching out to weeks when they came up with a novel solution. If you were willing to prepay for future months service you could move further up the queue. I can recall when paying for 6 months in advance would give you a server same day. It solved their cash flow problem and allowed them to buy more hardware.

The following year they explained the downside to this approach. The tax office saw all the prepayments as income and wanted them to pay tax on them but saw their expenditure on servers as capital expenses which could only be depreciated over several years. They were faced with a big tax bill.

I'm sad to see slicehost being dismantled. This comes on the tail of Cisco announcing their plans to kill the Flip. What is it with companies buying great products and killing them?

I'll leave you with episode 4 of the slicehost podcast. I don't think you're ever going to get something this raw from Rackspace.

3 Way Handshake - Episode 4

Cisco bought Flip camcorder for $580 million and is closing it down Cisco bought Flip camcorder for $580 million and is closing it down

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.

How To Loose Your Customer Base

Yes, the misspelling in the title is deliberate. See image below.

If you're building expensive tools for managing server infrastructure, please don't assume your users are idiots. Warning me about the possible consequences of my action is fine. Preventing me from doing what I want to do won't endear me to your product and poor spelling won't increase my confidence. I'm LOOSING confidence in you VMware.

You can't go there. Sorry, it's the rules. You can't go there. Sorry, it's the rules.

Rob Postill had a little rant about VMware last night.