Proton Email vs Self-Hosted Email

For nearly a decade I self-hosted my own mail server on an Ubuntu AWS Instance, but a few years back, it all got to be too problematic - for the same sorts of reason Jerry Bell, Admin of my Mastodon server, talks about here, and Carlos Fenollosa talks about here, so I migrated over to Proton Mail.

But I ran across not one, but Two bits of news that week that suggested even Proton Mail are starting to enshittify. So, I’ve been thinking about email a lot this week.

Checking my invoices, I actually renewed Proton mail for TWO years back in March, and they won’t refund if you cancel, so that’s out, but, what in the world would I move to anyway? I won’t touch the big email providers any more. Google is evil. As a techie of a certain age, I despise Microsoft. And even enshittified, Proton mail is still quite privacy respecting and has great security. It’s a conundrum and I just don’t know what to to do. But at least I have almost two years to figure it out.

A Shopping Trip To Swindon

The missus seems to be enjoying going away to different towns for shopping on Saturdays. Yesterday we found ourselves in Swindon of all places. It’s not the most beautiful of towns, but I took along my Canon R5 to see what I could spot.

First I found this lush plant. Seems to be some sort of fir tree, but they wrapped the roots tightly in moss, then in brown thread to hold it all together. You just soak the root ball every 2 or 3 days.

A lovely Plant with a wrapped root ball

Then we found ourselves at the Swindon Designer Outlet, a shopping complex built within the disused Swindon railway engine works. Incidentally, it’s also where the headquarters of The National Trust is.

A beautiful and colourful flower bed outside The National Trust. Trees, people, and a Wagamama are in the background A golden plaque on the wall reads, You are now standing in the former boiler shop of the Great Western Railworks built in 1873 Old cranes in the ceiling More old cranes

A Tricky CI/CD vs RDS vs Terraform vs GitHub Actions Issue

Content Warning: deep tech

In my current contract, my client uses GitHub Actions as their CI/CD software pipeline. A current issue, is that, to save money on AWS, we’re shutting down the RDS databases when not being used, but then that causes problems in the Actions when it wants to run Terraform on a shut-down RDS instance. To get around this we want the pipeline, after Terraform has run a plan, to detect whether any changes are needed, and if they’re in RDS, to somehow extract the RDS instance name, and then start it up if required.

I was a bit bored on Friday, so I tried to work out exactly how we’d extract the instance name under those circumstances. What I came up with is something like this:

  • We run a large mono-repo, so we’re transversing multiple directories where we’ve run a plan from. Looking for the plan output, “output.tfplan”.
  • If the plan is in a directory with “/rds” we then:
    • We use terraform show and some json magic to extract the instance name and
    • We build up a list of instance names that we can then first off to a python script or lambda function to check and start the RDS instance if necessary.

I haven’t tested the GitHub Action yet, but it might look something like this:

      - name: Build List of RDS Instances To Ensure Running
        if: ${{ github.event_name == 'pull_request' }}
        working-directory: ${{ env.TERRAGRUNT_ROOT }}
        run: |
          . /home/linuxbrew/.linuxbrew/opt/asdf/libexec/asdf.sh
          RDS_INSTANCES=""
          for x in `find . -type f -name "output.tfplan"`
          do
             if [ $(echo $x | grep -c "/rds/output.tfplan") -eq 1 ]
             then
                 cd $(dirname $x)
                 RDS_INSTANCES="$RDS_INSTANCES $(terraform show -json output.tfplan | jq ' .resource_changes[] | select(any(.change.actions[]; .=="create" or .=="update")) | .change.before.identifier' | grep -v null)"
             fi
          done
          echo "We need to ensure these instances are running: $RDS_INSTANCES"          

Other stuff

I’ll be adding these sites to my blogroll today: