It’s been a while (Staind ;-)) since I’ve written a post on my personal blog. I’ve been up to a lot of things, mostly concerning work and upkeeping my house, but for the past weeks the amount of free time for “my stuff” increased, so here I am with some new projects. So I’ll let you take part in my previous journeys with new or not-so-new technologies and projects :-)
Rethinking my infrastructure
The intention for looking into Raspberry Pies comes from me now having a fresh look at how I use my infrastructure at home. A lot of notebooks, a desktop PC for gaming and a media center (Asus O!Play HD2) in use. First of all: I’m mostly in retro-gaming. Old DOS games, older PC games and no consoles. But what do I really use stuff for? Watching movies or TV shows as files from a USB stick on my media center. Using the Desktop to download and one of the older laptops with a capable GFX card to play sometimes, less and less over the past years. So it’s at least two devices due for scrapping, it seems.
What do I really need?
Considering the above thoughts, I concluded: No more desktop PC, No more media center. So, how to compensate that?
- Every current Smart TV, Smartphone (with e.g. VLC), supports UPnP and/or DLNA
- Services like usenet, sonarr and so on use web interfaces, so no GUI/window manager needed
- Storage via NAS or external HDDs
- Sometimes a working environment with a keyboard and two displays
Conclusion: A single Raspberry Pi 3 B with an external 2 TB WD Passport should be able to handle usenet, backups and serve all downloads/files to the local network via DLNA. Plugged in one of the router’s LAN RJ45 ports, the network speed should also be sufficient for streaming.
I bought the Pi 3 B desktop kit with case, AC adapter and a micro SD from element 14 with a pre-installed raspbian (ok, also some coolers ;-)). Since I’ll only need console access, I first enabled boot into CLI and - as all systems accessible via SSH should - disabled root login via SSH and copied my pubkeys to pi. That’s the baseline.
For further provisioning we’ll use ansible to have the whole thing indempotent and especially reproducable. Four roles to do the job:
| |- provision
| |- common
| |- dlna
| |- nzbdrone
| |- sabnzbd
| |- settings.yml
| |- settings.yml.dist
That’s the base directory layout for most of my ansible projects. Non-standard dirs are
user-settings for user-defined variable settings, not injected by commandline parameters to override defaults and
bin, which holds a wrapper for the provision call that disables e.g. “cowsay”.
I won’t paste all the config/code I use in particular, that’s up to you, but I’ll share some (hopefully) useful snippets and information.
How to add custom-settings for ansible provisioning:
Some base packages you might need:
Some optimizations for minidlna to keep the wear on your SD card low:
A hint on how to install sonarr:
SabNZBD is kinda similar to install. Good luck with your first Raspberry Pi project ;-)
More to come
Next posts will be about how to add dyndns to your box with the help of domainfactory (my DNS provider) and some custom tooling with powerDNS.