Skip to main content

rfranzen

Deploying a serverless website

I have been using the following techniques to deploy my (this) website automatically from GitHub to Cloudflare Pages for a few years now. The best part is that you can have all this for free; of course, you still need to pay for a domain, nothing is 100% free in life, right?

Before we start, I’d like to clarify that this will not be a step-by-step guide on creating a pipeline to deploy your website. Instead, I will list the tools I use and explain how they work together to host and deliver the website with impressive speeds in a serverless manner.

Ansible APT module randomly fails

While using Ansible to automate the system updates on my personal servers, I ran into an issue where the apt module randomly failed with the error:

FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Failed to lock apt for exclusive operation: Failed to lock directory /var/lib/apt/lists/: E:Could not get lock /var/lib/apt/lists/lock."}

Apparently it has something to do with the Unattended Upgrades service. Since this is something I want to keep enabled, the workaround is to set some retries on the task that uses the apt module. Here is an example:

Bootstrap / install script for dotfiles

I don’t think everyone, but at least a lot of people have a set of dotfiles that they use to configure their environment on a personal or work machine. Many people have those dotfiles in a git repository to keep them versioned and synced between machines.

But not many people make use of a bootstrap script to install those dotfiles on a new machine. I recently rewrote my Bootstrap script in Python. It is very simple, just creating symlinks from the dotfiles repo to the home directory.

How to configure Mikrotik to connect to iVPN

iVPN is a VPN service that I’ve been using to protect my privacy online. I have it configured on my laptop and phone and it’s pretty handy, especially when I’m on public wifi.

But if I want to protect my entire home network? Is it possible to configure a Mikrotik router to use iVPN? Yes, it is!

I will quickly go over the steps you need to take to configure your Mikrotik to use iVPN Wireguard servers.

How to install Winbox on Mac M1

  • “I upgraded to a new Mac M1 chip and now I can’t run Winbox anymore”;
  • “I switched from Windows or Linux to the new Macs and I cannot access my Mikrotik router using Winbox anymore”;
  • “I’m trying to run the Winbox using wine on my Mac M1 without success”;

If you find yourself in one of these situations, this simple and basic step-by-step may can help you. Since I switched to the not so new M1 chip, I couldn’t run the Winbox using Wine. Everytime getting many different errors.