Python, No usable temporary directory found

I had to Google this today and was kind of surprised by how many odd workarounds are used for this one, and most of them seem wrong. What is it? The error will create a traceback and it will look similar to this: Fontconfig error: No writable cache directories time=2024-08-05T17:57:28.924000 level=ERROR location=__init__.py:75:handle_exception msg="Error" request_id="" exception="Traceback (most recent call last): File \"/var/www/.cache/pypoetry/virtualenvs/pdf-maker-xS3fZVNL-py3.12/lib/python3.12/site-packages/flask/app.py\", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File \"/var/www/....

August 5, 2024 · 4 min

Rotating Github (Action) secrets

So, here’s a fun problem I ran into at work: We use Github Actions to deploy all our services to Kubernetes. And in order to do a deployment, we have kube configs (as secrets) setup to connect to a Kubernetes cluster when a workflow runs. The Kubernetes config has an expiration date and will become invalid when the Kubernetes certificates are rotated (k0s takes great care of that). When they expire, the deploys fail until we update the secret on Github Actions....

February 11, 2024 · 5 min

Terraform and OpenStack: Boot an instance from CD-ROM

In the spirit of “this took me way too long”, here’s how to boot an instance with a CD-ROM on OpenStack, using Terraform. Why would I need this? In a perfect world, I have templates to bootstrap instances. Means, the instances are ready to go when booted. I customise them with cloud-init and let them do all kinds of cool (or necessary) stuff like configuring the network, setting hostnames, adding user accounts and then maybe joining them to a cluster....

May 13, 2021 · 3 min

Terraform: Resource not found

Here’s a few things I learned and did when I encountered the very verbose “Resource not found” error from Terraform. Debug your Infrastructure as Code More logs? This is my obvious choice or go-to. Terraform comes with different log levels though it will say itself that every level but TRACE is not to be trusted? 2021/03/02 09:21:33 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility....

March 2, 2021 · 3 min

Ansible Galaxy: Install private roles from private GitHub repositories

When I googled how to install private roles using ansible-galaxy, I found suggestions such as, “use git+https://github.com/…” or even better, “I am not sure what you’re doing, but it works for me (since Ansible 2.2)”. So, since neither of these suggestions helped me and because I am unable to find documentation with obvious examples, here is how you achieve this. Assuming you have your ssh key and configuration figured out, put this into requirements....

June 30, 2020 · 1 min