Sandwich stop in Balmaha.

Which is a fantastic word to shout in a bad Scottish accent.

Loch Lomond from Conic Hill.

Half way through today’s route.

These Aloe Vera ear plugs blocked out most of the snoring and noisy sleeping pads at the camp site last night.

Nothing could stop the 4:30 alarm from the birds though.

ear plugs

Well this is a first.

Night 1 of the West Highland Way for me is a stay at Drymen Camping, eating pizza in my tent.

🍕⛺️

Eating pizza inside my tent.

Off to a very damp start.

3rd time doing the rain jacket on and then off again dance.

92 miles to go.

A sign saying Fort William (the end of the route) is 92 miles away.

I’m walking The West Highland Way.

Almost 100 miles, should take about a week, so this is now a hiking and camping micro blog.

The starting point of The West Highland Way in Milngavie, Scotland.

The 2 late week notes are delayed yet again. I’d hoped to write them on the train but the views heading to Scotland were too good to ignore.

At least I can see the way down.

⛰️ Moel Siabod

Hiking path down a hill, clouds cover the top third of the image and the valleys below and some other hills can be seen in the distance

I climbed 872 metres for these views.

⛰️Moel Siabod

Visibility of only a few metres because I’m in a cloud Moel Siabod trig point

Coffee and my first ever I-cycled-50-miles-in-a-week-biscuit.

Day 5/5 complete.

a black Americano coffee and a biscuit, along with a bike helmet, on a wooden bench at the Cafe at the top of the hill

Found a secret beach.

It’s on Komoot and is pretty well sign-posted from the path, but it’s a secret.

Day 4/5 complete.

a tunnel that leads to a small secluded beach

I climbed a 10% hill.

I then had to bask in the glory of my accomplishment for a minute.

Day 3/5 complete.

a gravel bike leaning against a barrier beside the sea

Coach asked if a photo every day was necessary?

I’m undecided.

Day 2/5 complete.

a gravel bike standing near a stone beach, looking out to the sea on a sunny day

Bank holiday by the sea.

a small boat near the shore where tourists are sitting on sand

Coach says if I want to cycle 50 miles in a day I must first cycle 50 miles.

So I’ve split it over 5 days.

Day 1/5 complete.

🚲

gravel bike on a stone beach

Got any tips for getting started with RSS readers?

I’ve installed NetNewsWire on my phone and laptop and they sync from FreshRSS which is running in my homelab.

Which feeds do you recommend?

Weeknotes 002

Another missed opportunity to photograph my food. Another weeknotes.

Read More →

Setting up my Micro.blog sub-domain using IaC, Terraform and Cloudflare

The last step to setting up my new Micro.blog was to use it from my own domain.

I debated using it exclusively at paultibbetts.uk but I want to work on my own blog for that address.

So I’m going to use Micro.blog as… my microblog… at micro.paultibbetts.uk.

Instead of doing it by hand on Cloudflare’s website I wrote it down as code.

Infrastructure as Code

Writing down your infrastructure as code has a lot of benefits:

  • it’s in one central place instead of spread out in different UIs on different sites
  • it can be version controlled
  • it can be readable by robots as well as other humans

You can use tools like Terraform, OpenTofu or Pulumi to do this.

Terraform

I’m using Terraform at the moment. I might look into Pulumi in the future.

Terraform uses HCL for its configuration.

main.tf

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 4.0"
    }
  }
}

My domain is managed by Cloudflare so at the start of my code I tell Terraform to use the cloudflare/cloudflare provider. This means I can manage different things in Cloudflare using a few settings.

provider "cloudflare" {
  api_token = var.cloudflare_api_token
}

Next I tell the Cloudflare provider to use a variable for my API token.

data "cloudflare_zone" "paultibbetts_dot_uk" {
  name = "paultibbetts.uk"
}

Originally I asked ChatGPT how to do this, and it was technically correct, but it wanted me to go on the Cloudflare site, go to my domain, and copy the zone_id to pass in as a variable. Which is missing the point of doing this with code.

Instead, using data means this block is a data source, called paultibbetts_dot_uk, which uses Cloudflare’s cloudflare_zone module to get a zone (domain) with a name of paultibbetts.uk.

I don’t know or care what the ID is and I can automate the process of finding it out.

resource "cloudflare_record" "microblog" {
  zone_id = data.cloudflare_zone.paultibbetts_dot_uk.id
  name    = "micro"
  type    = "CNAME"
  value   = "paultibbetts.micro.blog"
  ttl     = 300
}

When I create a cloudflare_record resource, called microblog, I can use the data source to get the ID of the zone for which domain the CNAME record should be added to.

vars.tf

variable "cloudflare_api_token" {
  type        = string
  description = "api token"
}

Because I don’t want to write down my API token in my code I set it up as a variable.

I can now pass in the token when I run Terraform:

terraform apply \ 
-var cloudflare_api_token="********" \ 

but I prefer loading it in as an environment variable.

You can do this by prefixing the variable with TF_VAR:

# secrets.sh
export TF_VAR_cloudflare_api_token=********

and remembering to source this file before you run Terraform commands

source secrets.sh
terraform apply

apply

Now I can run terraform apply, confirm the proposed changes, and Terraform will use the Cloudlfare API to add the CNAME to my domain for me.

After making a quick change in Micro.blog I’m live at my own domain 🥳

Weeknotes 001

Weeknotes are for when you’re eating sushi and forget to take a photo and then later you decide you should tell people about it because it was excellent.

Loved the food at Sushi Marvel in Manchester. I was too busy eating to take many photos but I paused before tackling the chicken karaage rice bowl so there’s at least one of that. I’ve recently started a regular pilgrimage to Manchester’s food scene and so far Sushi Marvel’s been my favourite for food.

Lots of walking this week. Inspired by Paul Messner’s recent trip to Scotland I’m now thinking of walking The West Highland Way.

Made a proper start on the app I’m working on with my friends. I need to learn what’s new in React to work on the frontend.

Decided to redo my Neovim config and make it work the way I want it to. This deserves its own post next week.

Subscribed to Micro.blog 🥳 I’ve decided to use micro.paultibbetts.uk for the domain and I wrote that DNS setting down as Terraform code instead of doing it by hand. Don’t ask how much longer that took me.

chicken karaage rice bowl

What I'm doing right now

Sabbatical

I’m currently on a three month sabbatical from work.

I’ve been there for over five years and wanted a little break to work on my own things.

Personal

Touch typing - I’m learning to touch type. You’ll see me post about typing and keyboards more than I normally would.

Setting up my Mac - I’ve just bought an M3 Macbook Pro and I’m reviewing the apps I use.

Blogging - regularly. I’m viewing this as a project because it’s new to me, but I’d like it to become a normal everyday thing.

Getting back into fitness - running and cycling

Hobbies

Bikepacking - I bought a gravel bike to go bikepacking last year and I still haven’t been! I need to fix that.

Hiking - I’m always thinking about the next destination

Gaming

Helldivers 2 - for co-op

The Finals - for competitive PVP

Dave the Diver - for relaxing

Projects

Dev

Recommend.li - over seven years ago my colleagues and I wanted an app to send recommendations to each other, and we still haven’t found the right one, so now we’re making it ourselves.

Learning Go - because it looks better suited for the DevOps work I do nowadays.

Ops

Homelab - now I’ve got dedicated time to work on it I’m making more progress on my homelab than I have since I started it.

Reading

Non-fiction

Deep Work - I read this years ago and taking some time off to get some work done seemed like a perfect time to reread it.

DevOps Handbook - I really like this. I got to the part about “starting a DevOps movement in your company” and then started my sabbatical, so for now I’m reading the other books. I’ll finish it before I go back to work.

The Art of Monitoring - is helping to unravel the mysteries of monitoring web applications.

Fiction

Arisen Raiders: The Last Raid 🧟 - I don’t like the look of that title!

Blog

I’ve recently signed up to Micro.blog and it has a lot more features than my previous blog, so for now it’s my home on the internet.

I’m planning on using it for general updates and photos of bread of course, like any good blog, but also for recording design decisions in my development work, updates to my homelab and other nerdy things.

I’d like to make some progress on my own blogging system, and then these things can go there instead, but I don’t have that yet, so I’ll use Micro.blog to track my progress working towards that.