I considered going with Raspberry Pi Zero’s for $5.00 a pop. The limit on purchasing seems to be one per order. What about Raspberry Pi 2’s? Well they’re not readily available and where they are they’re not discounted. So the only game in town if you’re playing Raspberry Pi is the model 3. They run about $35.00 which is not exactly cheap except in the amazing historical sense that it’s a quad-core computer at 64-bits with graphics and wifi for less than the cost of a decent mouse.
However, that computer doesn’t come with a power supply. The Raspberry Pi 3 is rated at 2.5A @ 5 volts max. Though it’s worth keeping in mind that the 12.5 watt rating is conservative and allows for significant additional hardware running on the GPIO bus. Since multiple Raspberry Pi’s were in the plan (it’s a cluster after all), the idea is to use a USB phone recharing station for power rather than purchasing multiple independent supplies.
One of the ideas I’ve been considering is hardware as a useful abstraction, and part of what intrigues me about building a local personal cluster [LPC, anyone? yes I just made that up] is in terms of hardware abstractions — beginning with, what does ‘software as a service’ really mean.
Deeper down I suppose one starting point is the psychology of cattle versus pets. I don’t name plastic forks or each gallon of gasoline and I want to get away from the idea of ‘running it on my laptop.’ Part of the reason is that my laptop gets more state each time I run into a problem or read about an improvement that
apt install addresses. Along with all the utility comes a lot of cruft or at least complexity to the point where I’ve gone to install something and already had it. I’ve only been running this SSD for about six months but but the thought of backing up, wiping and restoring to some base state looks painful and short lived.
One of the ideas I played with over the past few months was implementing a bit of the old floppy drive paradigm in thumb drives. Basically, keeping a task/project context on removable media with the goal of organizing high levels of the file tree in hardware. It didn’t really work so well except at the level of operating systems where I swap SSD’s to go back and forth between Windows 10 and Ubuntu. That’s a level of granularity that seems to work for me: generally, I don’t need access to my Windows 10 state from Linux or vice versa.
Though I’m going with Docker Swarm, my LPC plan is to allow switching to a Kubernetes installation to be as simple as swapping floppies (or in this case SD cards) and so the first hardware decision was to bulk purchase more than two micro-SD’s per Raspberry Pi. As a practical matter, the choice of Raspbian/Ubuntu is far more likely to be an early card swap scenario than Swarm/Kubernetes (or Rancher/OS after listening to that SE-Daily episode last weekend).
Something I realized about SD Cards is that the primary use cases are in photography and video and hence the rating classes are based on write performance. Two SD cards rated Class 10 can have substantially different read performance. For the workloads I’m imagining (and I realize I’m imagining) read performance is a more probable bottle neck than write performance.
It’s also worth keeping in mind the available network bandwidth of a Raspberry Pi. The ethernet is 10/100Mb and 100Mb is 12.5 megaBytes per second. That’s not much more than the minimum possible write speed of a Class 10 SD card (class 10 is 10MB per second) and my gut says that out in the real world, it’s unlikely that the Raspberry Pi’s built in Wifi would ever reach the 80Mb (that’s 10MB) per second necessary to write level saturate a class 10 SD card.
I really wanted an excuse to buy a gigabit ethernet switch. I mean, I really really wanted one. But it didn’t make sense and at 8 ports and for $7.99 a 10/100 switch did. I’ll get gigabit when I need it.
The stackable ‘lego’ cases looked kind of cool. I read something that implied there are some struggles with wiring when their stacked. A typical case adds about 20% to the cost of a unit. I’m going to skip cases until I know what I want.
I’m going to splurge on some new 1.5′ ethernet cables and some 3′ USB Type A to micro A cables.
Looks like the total cost of putting a Rasberry Pi 3 online with power supply, case, etc is about $50. Aggregating the power supply, adding a switch, skipping the case, and ‘over provisioning’ sdcards moves it up to about $55.
Bill of Materials
(4) Raspberry Pi 3 Amazon
(10) Class 10 16GB Micro SD cards Amazon
(1) 8 port 10/100 ethernet switch Amazon
(1) 60w USB Charging Station Amazon
(1) 5 pack of 1.5 ethernet cables Amazon
(5) 3′ USB A to Micro A cables MonoPrice
Since I currently have Prime I tried to order everything off of Amazon to saving on shipping. The Dark Patterns of Amazon’s search eventually pissed me off to the point that I ordered the USB cables from MonoPrice. They were fullfilled by Amazon.
Update and Opinion
Doing a little more research on Rasberry Pi Clusters suggested that Real Time clocks make sense. I ordered some from China off Ebay. They fit on the GPIO bus rather than the expansion bus. I tried ordering them from Amazon. Searching for a reasonable price was a pain in the ass and the shipping window for a similar product was six to ten weeks out. Easy to find at a good price on Ebay, much shorter lead time, much lower shipping cost.
That’s been the trend: Amazon gets worse, Ebay gets better. I think that’s because Amazon is a merchant and Ebay is a market maker. The incentives are different to the point Amazon will A/B test implementation of dark patterns, Ebay is unlikely to do anything that reduces the likelihood of a [legitimate] transaction.