Rebuilding This Site, Slowly

As the langour of Summer takes hold, I’m slowly piecing together my next hosting solution, and it’s far enough advanced that I can write about it at some length.

First off, there’s the CMS itself. Sushy is far enough advanced that it’s been self-hosting for a couple of months, and can cope with most of what I can throw at it – except, for legacy formatting it needs to support so I can actually use it to host this site.

Nothing major, really, just a lot of boring little details that need to be done, and that I’ve turned into a game of sorts by coding it in Hy instead of plain Python.

Right now all I’m really missing (besides some fun surprises I want to toss in) are stuff like automatically generated tables, galleries, and other things that basic markup rendering simply couldn’t handle when I first implemented Yaki, and that still aren’t available on Markdown or Textile today.

I suspect I will eventually re-write Sushy in pure Python for the sake of maintainability when I decide to move to Python 3 in earnest, but the amount of sheer fun involved (and the simple, straighforward way the code is turning out) are keeping it fun, and that’s what counts.

Reading First, not just Mobile First

I’ve also started to code a new design. I decided to start anew with something even plainer than this one, and eschewing – at least for the moment – stuff like web fonts and overwrought layouts. This is what it looks like right now:

Yes, it reads like a book, and yes, I’m sticking to serifs. This because there are too many gimmicks in web design these days, and given the amount of traffic I’m getting from retina-grade devices, I think it’s worth focusing on typography and readability a bit more – as well as rebuilding navigation from scratch, which is probably the biggest hurdle to overcome in the next few weeks (right after doing some long overdue content conversions).

Containers, of course, but with a twist

I’m also going to scale down my infrastructure a bit – advertising has never been enough to pay for hosting costs, and leveraging CloudFlare and DigitalOcean I’m positive I can cut on expenses and have a faster site.

As to the nuts and bolts of the thing, after pondering whether to stick with my current LXC setup and doing a progressive migration or doing a complete reboot and using Docker, I decided to make things a lot easier for me and run the whole thing using Dokku – which is the simplest possible way to do Docker deployments (even without using Docker directly) and also enough to tweak if I need something extra.

But the real reason is that I’ve always loved the Heroku way of doing deployments (git push and you’re done).

Plus, given the amount of time I’ve been spending thinking about immutable infrastructure and reproducible deployments I decided I’d better put my own money where my mouth is (so to speak), so I picked up an Ansible playbook and tweaked it to deploy mainline dokku on a fresh VM in roughly five minutes.

It then takes me about twice that time to get my content synced to it and a site running. I love Ansible and heartily recommend it if you have a frequent need to bootstrap new environments or run herd on multiple machines, and it plays very nicely with Dokku too.

Dokku, in turn, isn’t perfect (I still cringe a little when I think about all the stuff that buildstep bakes into the containers it generates), but it works pretty well for me, and the overall solution seems solid in the sense that whatever happens, I can rebuild a new machine from scratch in minutes – that is the thing you want to go for in any kind of modern solution…

It’s not as trouble-free as, say, a Jekyll site, but it doesn’t force me to run (and leave) a bunch of litter around my machines, either.

And I like to have a simple, straightforward way to run multiple apps/services on a host – this site is actually composed of two or three different services working in concert, and being able to rebuild/redeploy/extend them with minimal hassle will go a long way towards making sure I spend my time pursuing more… rewarding endeavors.

Like grabbing some ice cream and reading a book in peace and quiet, which pose enough of a challenge when combined on their own, but become nearly insurmountable trials in a household infested by that common but delightful plague known as… children.

See Also: