Dear Henry…

For someone who’s worked in the tech industry since 1998 I’m constantly astounded at how frigging difficult I find it to do things.

In this case, I’d been doing some work for someone on a WordPress site about 5 years ago, and they came to me the other week asking if we could make some changes to it.  I logged in and discovered that it hadn’t had a core upgrade in a while, and then after digging about I remembered that this site was bilingual (Eng/French) and we’d used a particular plugin to handle the bilingualness which had a few quirks where it came to core upgrades.

I figured that the best thing to do would be to set up a copy of the site on my Linux machine in the office, so I could experiment with migration without affecting the real website.  I used to do this sort of stuff on my laptop using MAMP – but the MacBook Air I’ve since moved to is a little more restricted on resources (and currently creaking a bit), so putting it on the barely-used Linux box seemed a no brainer.

Except, it appears to be the only Linux server in the known universe which doesn’t have a webserver or database installed.  I guess at the time I set it up I figured I didn’t need one.  Hey ho.  This seemed like the perfect opportunity to learn about a “new” way of doing these things – Docker.  I’d only be needing this site a short while, so why not spin it up in a container rather than having an Apache install lying around that I don’t need?

So I SSH in to my server and run the command to install Docker.  The error message, along with some googling, informs me that it won’t install – and the problem is that the version of Ubuntu Linux I have on my server is 32-bit, not 64-bit.  This comes as something of a revelation to me.  Windows has had 64 bit versions out since about 2001.  After some intense headscratching and thinking hard it comes to me that the main reason I set this server up in the first place was as a Plex box for streaming video to the telly (to replace the old Serviio box I had to set up to connect to Liz’s old extremely picky Sony TV), and Plex only had a 32-bit incarnation back then.  But there was now a 64 bit one, so we’re all grand and cooking with gas.

Now, how to install a new OS…?  The Linux box also performs a few other key tasks (media server, backed-up file storage), so I figured the best approach would be to plonk a new hard drive in and install the OS on that.  Tappity-tappity-tap, wait 3 days, and the new drive has arrived.

Next, get a USB stick and set it up as a bootable Ubuntu install image.  Easy, right?  Well, it would be if I could find my little bag of USB sticks I keep for just this purpose.  But having moved to a new home in June and not put absolutely everything away in a meticulously logical place it seemed that 2 hours of turning shit upside down didn’t yield any dividends – so off to PC World to find an affordable USB stick (at this point I’ve already waited 3 days for a new hard drive, and I really want to get on with this job!).  Image created & tested, and we’re now all good to set up this Linux box!

Normally the Linux server sits there running “headless” – that is, it’s just a computer plugged into a power socket and network cable: all interacting with it is done remotely…  but that doesn’t work when you’re installing a new OS!  Easy; I’ll just plug in my spare keyboard and hook it up to my external monitor.

Oh crap.  Last time I did this was with my OLD LCD monitor, which had a VGA port.  And do you think my shiny new monitor had any sort of port that was common with the video card on this server?  ~sigh~  And now we’re waiting another 2 days for the adapter cable to turn up from Amazon.

So, a scant 5 days after resolving to embark on this plan I’ve now got a shiny new Ubuntu 64 bit installation up and running, with Plex reinstalled and running.  I had some fun sharing my mp3 library with our Sonos – in the old setup I’d done it using a Samba share and connected the Sonos app directly to it to index, but that didn’t work particularly well and which I’d put down to network connectivity.  And now seemed like the perfect time to remedy it.  And it turned out that the problem was actually that the Sonos library index has a hard limit of around 65000 songs – whereas my mp3 collection is larger than that!  So indexing the songs using Plex and connecting the Sonos to that instead has killed 2 birds with one stone there.

Now!  How the feck does Docker work?  There’s a couple of days watching videos and tooling around on the command line with that…

Finally I’m in a position to do something.  I log into the live version of the website I’m looking at and see that it’s on WordPress 3.8.3.

Balls.  Docker doesn’t have a container image for a decrepit old version of WordPress!  Oh well, surely I must be able to pull down containers for Apache and MySQL, and install WordPress 3.8.3 on there, right?  Oooh, but hooking up containers to each other starts to mean some pretty kinky commandline wrangling – surely I can do this with a config file instead?  Oh look: docker-compose!  Great, now how does THAT work?

[3 days later]

Hmm, OK so something happened in there which means that the older version of WordPress needs a different mysqli extension, and it seems that no amount of ferkling around and googling is going to give me the answer I need to figure out how to rig these damn things up.  I mean, I feel I’ve learned a lot about Docker in the meantime… but I’m still no closer to getting anything done.  I *really* don’t want to have to set up Apache & MySQL the “old way”.

Then a brainwave strikes – I still have my old laptop…  I keep it around because it’s got my install of Adobe Premiere Pro on it, which I occasionally use for video editing.  I wonder if it’s still got MAMP on it?  [tappity-tappity-tap]  Well, the database is still there, and it looks like I’ve still got the WordPress files in the cloud, so 20ish mins and I’ve got myself a copy of this site!

At the time I was explaining this all to Liz, and had the revelation that what I was effectively doing was giving her a tech-centric monologue version of “There’s a Hole in my Bucket“.

Helpfully, the denouement of the piece was that the translation plugin had been discontinued and was not compatible with the current version of WordPress.  A migration existed for a new plugin, but that plugin wasn’t marked as 100% compatible with WooCommerce, and one of the changes to the site was going to be to include a shopfront.  But, as so much time had passed between them asking for the changes to be made and now without an answer, they decided to get someone else to take on the task.

Well, at least now I’ve learned a bit about Docker, have a working mp3 library via Sonos, have a cable to hook my Linux box up to my monitor if need be, and have an up-to-date installation of Ubuntu again.  Swings & roundabouts, eh?

Dear Henry…
🌳 Buy me a Tree