When I started this blog 8 years ago, I had the sincere intention of posting on a regular basis. As evidenced by the 6 year hiatus, this has obviously not been the case. Combined with the fact that I no longer use French on a regular basis and regularly bore people with my vivid dreams, this relevant XKCD™ is very relevant (you be the judge on panel four).
The nifty XKCD ice breaker aside, I have also been putting off doing something about the fact that the hosting for this blog was almost as neglected as the blog itself, which gave me a perfect excuse to finally make a new post.
Ojdip.net was initially hosted at Hetzner on a small VPS running LAMP stack. In 2015 I moved from Slovenia to Czech Republic for a job at Microsoft and I made a big mistake of cancelling my phone number plan before I made sure all the services connected to it were updated. My hosting plan was one of these. I also lost the root password, which made it impossible for me to keep the server up-to-date. As I no longer had the phone number for SMS-based 2FA, I was not able to convince Hetzner to reset my root password (to their credit, I am glad that they were unwilling to do so - they did offer to send a verification letter to my registered address, but I obviously no longer lived there).
Luckily the years of neglect came to my advantage. At that point the kernel was so old that I was easily able to find an exploit and get root access using just a non-privileged user via SSH. At which point I built a new server at DigitalOcean, migrated the blog there, switched the DNS records, shut down the old server and just let it expire along with the credit card that paid for it.
That was 4 years ago. I have since moved countries again - I now live in Ireland and work for Reddit. I tried to keep the server and the WordPress installation reasonably up-to-date, but I grew increasingly frustrated with WordPress. The admin panel was a mess, with every single extension I was using injecting ads for their premium offerings, the whole thing was slow and bloated and generally not very nice.
In 2019 I unsuccessfully tried to lift-and-shift it to Kubernetes, to at least have all my personal projects deployed using a common approach. It was unbearingly slow with a
ReadWrite PersistentVolumeClaim due to thousands of small files, which do not seem to play well with a networked file system, so I quickly gave up instead of trying to make it work.
Over the last weekend I finally ditched WordPress along with
ocean01.ojdip.net which was my last server in a traditional sense. I am now fully cloud native!
The basic template I used for this blog is gatsby-starter-blog. I did a few tweaks, like adding the about me page, changing the styling a bit and added for rendering math equations. Otherwise, this is pretty much the vanilla Gatsby Starter Blog.
Finally I imported my old posts from WordPress using this tool. I had to manually re-format the code blocks and equations, but otherwise it was a very seamless process.
The last part was deploying the blog somewhere. Not being a huge fan of using yet another hosting service to the mix, I initially tried to Dockerize it and deploy it to my Kubernetes cluster. It did work, but there was a slight problem: I did not want to compromise and have my blog be accessible via IPv4 only.
This probably deserves another blog post, but IPv6 support in Kubernetes is still very poor, at least when it comes to managed offerings from cloud providers. For some other projects, my standard trick was to put Cloudflare in front of it, but that would require me to transfer DNS hosting for
ojdip.net to them. I was reluctant to do this because of the MX records. My primary email address is under the same domain and if I lost access to it, I would be in deep trouble.
So I decided to go with the more traditional deployment strategy using S3 and Cloudfront. This blog is entirely static, so it can be served by pretty much anything, but I already use AWS for a bunch of other stuff, so it made sense.
Exit Wordpress, enter Gatsby, now I have a shiny static blog with no infrastructure to maintain. There was some collateral damage, some small PHP apps I wrote a decade ago that were also hosted on the same server. I was able to move some elsewhere, others, like a French verb conjugator that was apparantly still getting traffic, I deemed an acceptable loss.
I am now absolutely definitely pinky promise incentivized to write more often! If I do not, I accept pull requests for guest posts 😉