Monday, August 17, 2015

Rebuilding Dependencies Frequently

Reddit asked:
how often do you rebuild your OS level dependencies?

In practice, around twice a month, due to accumulation of security updates. Sometimes bit-rot plays a role as well, but mostly, it’s the endless stream of updates. We want images to quickly launch into a secure state.

Waiting until the instance comes up to apply updates has two drawbacks: one, each new instance duplicates the work. Two, if there’s an update that requires a reboot, we’ve found through repeated, painful experience that there’s no way to reliably reboot our instances programatically.

IIRC though, that question was in the context of Docker containers, while our process is to precompile our app and its dependencies into a monolithic AMI that we deploy to instances in AWS. I like to think it’s basically the same, but I haven’t really used Docker much.

Server Cleanup

Some stuff on sapphirepaw.org has been 404’d into the dustbin of history. Pretty much everything from before 2010 is gone now, much of it ‘unlisted.’ Stuff like bug reports on pre-Blink Opera and PHP 5.2, pictures from events I attended and talks I gave, and my wallpaper section. The latter was built as a demo/learning PHP app, and it turned out to be really timely in 2005. It was something I could point at and say, “I built that in PHP/MySQL,” right when I was looking for my first tech job. But it’s not something I’ve been at all interested in updating since—either code or data—so I removed it.

Along with those changes, the remaining pages are static now. I used to have a tiny little framework that wrapped page content with header, navigation, and footer, configured by a little PHP block in the source, then served the page. But there’s no real need to render that on every request, so I turned the framework into a static site generator. All the links get rewritten, too. The PHP URLs still work, but the server simply issues redirections to the static pages.

There was one hitch to the main process: libxml2 (PHP's DOMDocument->loadHTML()) doesn't recognize HTML5, only HTML 4.0. I had to figure out how to use the Masterminds HTML5 parser instead.

There was one page I wanted to keep (for now) that was dealing with more dynamic content, and that was termitheme’s themes.php page. That had to be converted to SQLite for the site builder to use local data instead of a MySQL connection.

I finally deleted all the old themes and graphics from /css, too, because my sense of design has matured along with the capabilities of CSS over the years. Would I ever resurrect the deep blue theme of years past? It would look dated. I'd have to design a new, modern theme (merely inspired by the old one) anyway.

Friday, August 7, 2015

Linode KVM: not recommended

Looks like KVM has been a de facto downgrade. I never had constant small dropouts on Xen, and I had certainly never had my server go silent for hours. (Linode 2048, btw. It started as a 512.)


It might be time to go looking for a new VPS provider...?