Tags
Hardware
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
17 Oct 2023 Resetting firmware passwords on HP EliteDesk 800 G4
According to HP it is not possible to reset an unknown firmware password and “a system board replacement is required, and additional customer costs apply”. However, according to a YouTube video there is process that works and having tested it I can confirm it does.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
28 Mar 2023 Add missing mode to xrandr
I tried to resize my display and discovered the mode I wanted was not available. Interestingly, the current mode was also not listed but that is a separate issue. Adding a new mode is not as straight-forward as I had hoped, so it is worth making a note (this post) of how to do it.
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
01 Jan 2023 Mounting exfat for access as current user
Quick post noting the bash command to mount a FAT formatted USB (or any other) drive, with the mount owned by the current user,
lsblk
is your friend for finding the device for the drive. -
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
05 Dec 2021 One For All Universal Remote with Virgin Media TV360
On Thursday we received our new Virgin Media equipment, including a TV360 box. Despite being physically the same box as their old V6 version (existing customers are getting TV360 pushed out as a software update) the TV360 software no longer works with existing Virgin TV remotes.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
08 Apr 2021 Finding SCSI generic device names
Linux has a number of SCSI drivers, many devices are managed by their own driver as well as the
sg
generic driver. Some tools need access to both devices provided by the specific driver (e.g.sr
for CD/DVD drives) and the generic one - requiring knowledge of which device files correspond to the same physical device to pass through to, e.g., Docker containers. -
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
-
09 May 2020 Upgrading PS3 hard disk
As I mentioned yesterday, I was planning to replacing the hard disk drive in my PS3™ with a larger SSD I had laying around my desk.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
-
20 Apr 2020 Rawlplug UNO sizes technical data
Rawlplug’s UNO range are currently my favourite wall plug, reliable and I’m yet to have any problems with the installation of one. I struggle to find this information, particularly supported screw sizes, when I want to refer to it to here it is:
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
26 Dec 2019 Dell XPS 13 SSD upgrade
In July I replaced my Lenovo ThinkPad x240 with a Dell XPS 13 9370 I impulse bought from the reduced section of John Lewis. Last week I finally got around to installing the new SSD I bought in a Black Friday deal on-line.
-
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
-
16 Jun 2019 Graphical Glitches on Lenovo ThinkPad X240 on resume
For a while (
possiblyprobably since I installed it) I've had weird graphical glitches on resuming my laptop from deep sleep. Until now I'd settled for rebooting it to fix it but I went on the hunt for a better solution. -
21 Jun 2018 The iPod is dead
After just under 10 years flawless service my 160GB iPod Classic has died, and I’m surprised it’s the spinning rust that went (click-click-click of death) before the in-unit battery stopped getting me through multiple days continual use, at work, between charges. :(
-
26 Aug 2015 TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
Network
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
04 Jan 2022 Reconfiguring network for satellite switch
Due to port exhaustion I am moving my “desktop” (quoted as it includes some laptops) systems to a secondary switch. This post describes the switch and new VLAN arrangement for these systems.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
11 Jul 2021 Finding number of tracked connections by host
We had a problem with our network a few months ago, in which the router seemed to be running out of capacity to track connections. In order to try and identify the cause, I came up with this snippet that will display the number of currently tracked connections per-host on the Linux router. The first grep limits it to hosts that start ‘192.168.’, which is specific to the part of my network I was interested in:
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
21 Nov 2019 Time Machine backup to network share
I had been using my own external hard disk for backing up my work computer, however (despite being 256GB) Time Machine kept complaining it didn't have enough space. Fortunately I also have access to a 3TB network share at work, so here's how I changed my Mac to backup to there instead.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
-
26 Aug 2015 TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
Technology
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
05 Jul 2022 Bad habits
When I was taught typing at school, we were made to type sentences with two spaces after the full-stop. Opinion has historically been split on this practice but most sources these days are clear that one space is now the only correct option (see 1st source below for a study that asserts 2 spaces promotes faster reading). Recently I have annoyed people at work reviewing my documents, as they have to replace my habitual two spaces with one. The problem from my end is that for nearly 30 years, most of which I have been touch-typing, I have consistently used two spaces. That’s a lot of muscle-memory to overcome!
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
30 Jun 2022 Decode QR barcode
When confronted with a QR code and no idea what it contains (or to verify it contains what is claimed), one might want to decode it. This can be accomplished easily using ZBar bar code reader.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
11 Jul 2021 Finding number of tracked connections by host
We had a problem with our network a few months ago, in which the router seemed to be running out of capacity to track connections. In order to try and identify the cause, I came up with this snippet that will display the number of currently tracked connections per-host on the Linux router. The first grep limits it to hosts that start ‘192.168.’, which is specific to the part of my network I was interested in:
-
11 Jul 2021 Getting an interactive job with Slurm
I keep getting this wrong (forgetting the
--pty
option), so all (Slurm users) recite together now: -
06 Jul 2021 Troubleshooting full filesystems where df and du disagree
We have a recurring problem with disk space being exhausted on the root filesystem of a system, the root cause of which is gnome-terminal holding open file-handles to very large deleted temporary files in /tmp. I suspect there is a bug in gnome-terminal not closing the handles to its scrollback buffer (possibly only when set to unlimited scrollback, as some users have).
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
09 May 2020 Upgrading PS3 hard disk
As I mentioned yesterday, I was planning to replacing the hard disk drive in my PS3™ with a larger SSD I had laying around my desk.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
-
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
14 Apr 2020 More forced subtitles in DVDs and BluRays
Following my last post I’ve been going through my DVD collection and fixing the forced subtitles for the films that have them.
-
07 Apr 2020 (sort-of-but-not-really-)forced subtitles in DVDs and BluRays
As part of an on-going project to convert my DVD and BluRay collection to a hard-disk based media collection (mainly to save shelf-space and having to keep swapping disks) I’ve encountered a disk that has so-called “forced subtitles” to subtitle some foreign language speech into the viewers native language.
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
-
08 Aug 2019 HTML linter
Trying to debug a missing close paragraph tag somewhere in a 300 line web page, I came across Tidy which helped with it's
-e
flag to report errors and warnings. -
04 Jul 2019 Docker images and introspecting them
I've been playing around with different ways to get graphical applications working in Docker and in the process creates some large images.
-
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
-
14 Jun 2019 Making video indexes with FFmpeg
I'm working on digitising some of my DVD collection at the moment, which means creating some pretty large files. Trying to view these over the network to discover what they are is pretty tedious (lots of buffering!), so I've been working on dumping an "index" image file that will helpfully give me enough information to determine what it is without actually loading/playing the file.
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
-
12 Jun 2019 More blog automation - introducing Jekyll environments
Further to my earlier post on automating deployment of my blog I found a small flaw with my method and have decided to fix it.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
03 Jun 2019 New Blog (...new me?)
So, I've started a new blog. It think this is my 3rd or 4th Blog, although it's the first new one in over 13 years, since I switched to Wordpress in April 2006.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
-
26 Aug 2015 TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
Tplink
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
04 Jan 2022 Reconfiguring network for satellite switch
Due to port exhaustion I am moving my “desktop” (quoted as it includes some laptops) systems to a secondary switch. This post describes the switch and new VLAN arrangement for these systems.
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
26 Aug 2015 TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
Vlan
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
04 Jan 2022 Reconfiguring network for satellite switch
Due to port exhaustion I am moving my “desktop” (quoted as it includes some laptops) systems to a secondary switch. This post describes the switch and new VLAN arrangement for these systems.
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
26 Aug 2015 TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
Linux
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
22 May 2023 Quick-and-dirty Linux password generation
A quick and dirty way to generate a password on a Linux box:
tr -dc '[:print:]' < /dev/urandom | head -c32
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
16 Apr 2023 Linux healthcheck script
On my systems at home I use Icinga2 to monitor health, adding new checks as and when I identify something I think needs checking or if a failure occurs that was not detected. Sometimes it is necessary to do some checks via other means, such as SLURM’s healthcheck program so it can be useful to have checks in script form. On previous systems, we have used the Nagios plugins that Icinga uses to minimise the maintenance overhead of have duplicated tests. The script will be written in bash and minimise dependencies on non-Coreutils files to try and keep it portable to different distributions.
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Easy virtual machine detection in Linux (e.g. kickstart)
This was something I needed in th
%pre
of my kickstart, but its likely to be generally handy so noting the recipe for future reference. -
07 Apr 2023 Hyper-V and Linux (secure boot fail)
I discovered, when I attempted to create my first Linux VM, Hyper-V not only has secure boot enabled (which is a good thing), it is set to only allow Microsoft Windows to boot (which is nasty). To restore standard secure boot behaviour, which permits any binary signed by the Microsoft UEFI CA to boot, the “Template” must be changed to
Microsoft UEFI Certificate Authority
(from the defaultMicrosoft Windows
). Once this is done, suitably signed (by Microsoft’s chain of trust) bootloaders will start. -
28 Mar 2023 Add missing mode to xrandr
I tried to resize my display and discovered the mode I wanted was not available. Interestingly, the current mode was also not listed but that is a separate issue. Adding a new mode is not as straight-forward as I had hoped, so it is worth making a note (this post) of how to do it.
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Mounting exfat for access as current user
Quick post noting the bash command to mount a FAT formatted USB (or any other) drive, with the mount owned by the current user,
lsblk
is your friend for finding the device for the drive. -
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
14 Nov 2022 Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is
namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain. -
13 Nov 2022 See all available timezones with datetimectl
I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
12 Oct 2022 Find all files modified since a specific time
Quick post, using
find
to list all files modified since a particular timestamp (e.g. since the last backup) in a folder: -
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
02 Jul 2022 Tidying APT repository management in SaltStack
Up until now I have been managing APT repositories individually as individual states in SaltStack (there is an example in one of my previous posts). As the number of 3rd party repositories and combinations of components (
main
,contrib
andnon-free
in the Debian default repositories) has grown this has become a little unwieldy and pushes some specific configuration into the state that could be moved to pillar. -
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
11 Feb 2022 VIM abbreviations
One of the features of Sublime Text I used a lot was the snippets, where I could save a portion of text that would be substituted when I typed its trigger (in my case, I used a word followed by tab). The venerable VIM has a number of plugins that support snippets however it’s inbuilt abbreviation support can provide what I need without external dependencies.
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
21 Jul 2021 Docker on CentOS 7
-
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
11 Jul 2021 Finding number of tracked connections by host
We had a problem with our network a few months ago, in which the router seemed to be running out of capacity to track connections. In order to try and identify the cause, I came up with this snippet that will display the number of currently tracked connections per-host on the Linux router. The first grep limits it to hosts that start ‘192.168.’, which is specific to the part of my network I was interested in:
-
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
06 Jul 2021 Troubleshooting full filesystems where df and du disagree
We have a recurring problem with disk space being exhausted on the root filesystem of a system, the root cause of which is gnome-terminal holding open file-handles to very large deleted temporary files in /tmp. I suspect there is a bug in gnome-terminal not closing the handles to its scrollback buffer (possibly only when set to unlimited scrollback, as some users have).
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
-
12 Apr 2021 Quick and dirty password generator
Quick and dirty password generator
-
08 Apr 2021 Finding SCSI generic device names
Linux has a number of SCSI drivers, many devices are managed by their own driver as well as the
sg
generic driver. Some tools need access to both devices provided by the specific driver (e.g.sr
for CD/DVD drives) and the generic one - requiring knowledge of which device files correspond to the same physical device to pass through to, e.g., Docker containers. -
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
09 Jan 2021 Moving to dict-based roles
I have been using a role-base approach to managing my SaltStack states, using lists of roles in the pillar to apply those roles to systems. This has started to breakdown when I want to dynamically add roles rather than have a set list per-host (e.g. to add an operating system role to all hosts without listing them on each) due to how SaltStack merges pillar data.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
19 Jun 2020 First Python pull request
Yesterday I opened my first issue against Python, and enhancement for mailbox, an old part of the standard library, to support Path-like objects, a very new part of the standard library.
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
28 May 2020 Debian system updates
I have automated monitoring (via Icinga2) of the update status of my various servers, all of which currently run Debian. To date I’ve been using cron to run a daily
apt-get update
, to my mind the obvious solution to “I need it to update daily”, which updates the local package cache and then the monitoring picks up whether there’s anything to update. While investigating a problem with another cron-job yesterday, I noticed messages from apt-daily and apt-daily-upgrade services and a quick Google revealed that there is a Debian way to do this. -
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
21 May 2020 Dockerised salt-ssh
For some systems that I have user accounts on but do not administer, I use Salt SSH (agent-less salt minion) to manage the common user-local files that are managed on the systems I do administer on these systems. I have previously made notes about it.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
13 Sep 2019 Upgrading Debian systems
Based on notes from my old wiki, refreshed as I remotely upgraded our home router from Debian 9 (stretch) to Debian 10 (buster). -
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
-
08 Jul 2019 Secure sudo with Google Authenticator
A little while ago, I "secured" root access on my GNU/Linux1 systems by stopping using the root password and migrating to sudo. I also setup Google Authenticator for it.
-
04 Jul 2019 Docker images and introspecting them
I've been playing around with different ways to get graphical applications working in Docker and in the process creates some large images.
-
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
-
14 Jun 2019 Making video indexes with FFmpeg
I'm working on digitising some of my DVD collection at the moment, which means creating some pretty large files. Trying to view these over the network to discover what they are is pretty tedious (lots of buffering!), so I've been working on dumping an "index" image file that will helpfully give me enough information to determine what it is without actually loading/playing the file.
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
-
12 Jun 2019 More blog automation - introducing Jekyll environments
Further to my earlier post on automating deployment of my blog I found a small flaw with my method and have decided to fix it.
-
12 Jun 2019 Unmarking Debian packages as manually installed
I sometimes manually install a Debian package, whilst trying to figure out dependencies for something else, and then discover I should have installed a different "parent" package that will pull it in.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
-
27 Jul 2018 Salt SSH
salt-ssh provides a way to run salt remotely without it being installed on the destination system. This means, for example, that I can use it to manage my user’s dotfiles on the BlueBEAR HPC cluster.
-
25 Jun 2018 Masterless Salt Minion
A master-less Salt minion can be used to manage a standalone machine (e.g. my work Linux desktop) or bootstrap any master-controlled minion (or even the master itself) as the salt states will take over management of the minion’s configuration and reconfigure it appropriately on first run.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
-
27 Aug 2015 Salt
Salt is a remote execution and configuration management tool that I have been using to manage the many Linux servers and desktops I have. Its state system also replaces some of my notes as a self-documenting machine-readable description of how each item is configured.
Saltstack
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
02 Jul 2022 Tidying APT repository management in SaltStack
Up until now I have been managing APT repositories individually as individual states in SaltStack (there is an example in one of my previous posts). As the number of 3rd party repositories and combinations of components (
main
,contrib
andnon-free
in the Debian default repositories) has grown this has become a little unwieldy and pushes some specific configuration into the state that could be moved to pillar. -
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
09 Jan 2021 Moving to dict-based roles
I have been using a role-base approach to managing my SaltStack states, using lists of roles in the pillar to apply those roles to systems. This has started to breakdown when I want to dynamically add roles rather than have a set list per-host (e.g. to add an operating system role to all hosts without listing them on each) due to how SaltStack merges pillar data.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
21 May 2020 Dockerised salt-ssh
For some systems that I have user accounts on but do not administer, I use Salt SSH (agent-less salt minion) to manage the common user-local files that are managed on the systems I do administer on these systems. I have previously made notes about it.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
27 Jul 2018 Salt SSH
salt-ssh provides a way to run salt remotely without it being installed on the destination system. This means, for example, that I can use it to manage my user’s dotfiles on the BlueBEAR HPC cluster.
-
25 Jun 2018 Masterless Salt Minion
A master-less Salt minion can be used to manage a standalone machine (e.g. my work Linux desktop) or bootstrap any master-controlled minion (or even the master itself) as the salt states will take over management of the minion’s configuration and reconfigure it appropriately on first run.
-
27 Aug 2015 Salt
Salt is a remote execution and configuration management tool that I have been using to manage the many Linux servers and desktops I have. Its state system also replaces some of my notes as a self-documenting machine-readable description of how each item is configured.
Server
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
11 Jul 2021 Finding number of tracked connections by host
We had a problem with our network a few months ago, in which the router seemed to be running out of capacity to track connections. In order to try and identify the cause, I came up with this snippet that will display the number of currently tracked connections per-host on the Linux router. The first grep limits it to hosts that start ‘192.168.’, which is specific to the part of my network I was interested in:
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
06 Jul 2021 Troubleshooting full filesystems where df and du disagree
We have a recurring problem with disk space being exhausted on the root filesystem of a system, the root cause of which is gnome-terminal holding open file-handles to very large deleted temporary files in /tmp. I suspect there is a bug in gnome-terminal not closing the handles to its scrollback buffer (possibly only when set to unlimited scrollback, as some users have).
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
-
27 Aug 2015 Salt
Salt is a remote execution and configuration management tool that I have been using to manage the many Linux servers and desktops I have. Its state system also replaces some of my notes as a self-documenting machine-readable description of how each item is configured.
Windows
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
18 Jun 2024 Calculating size of folders with PowerShell
Today I was notified that my home drive was using more than 5GB of data and must be reduced below 5GB immediately. Ignoring the wisdom of having employees delete the product of their labour in an era of cheap storage, no method of finding out what was using the space within my drive was suggested or seemingly available on my work laptop, so I wrote a short PowerShell script to work it out:
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
07 Apr 2023 Hyper-V and Linux (secure boot fail)
I discovered, when I attempted to create my first Linux VM, Hyper-V not only has secure boot enabled (which is a good thing), it is set to only allow Microsoft Windows to boot (which is nasty). To restore standard secure boot behaviour, which permits any binary signed by the Microsoft UEFI CA to boot, the “Template” must be changed to
Microsoft UEFI Certificate Authority
(from the defaultMicrosoft Windows
). Once this is done, suitably signed (by Microsoft’s chain of trust) bootloaders will start. -
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
-
06 Apr 2023 Hiding the Chat icon, search box and disabling Teams auto-start on Windows 11
Out of the box, Windows 11 shows a Chat icon in the taskbar for Microsoft Teams, a search box (duplicating the search function in the start menu) and launches the “home” version of Teams on startup. I do not use the home version of Teams, want to hide it and save teh taskbar space taken up by the search box.
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
20 Jul 2021 Updating text file on Azure Windows VM from local text file with PowerShell
In order for NFS identity mapping to work accross both platforms (Linux and Windows), pending either AD integration or fixing Windows NFS client integration with OpenLDAP server (neither of which is currently in place), we are currently maintaining a passwd file for Windows that maps the Windows identity to the corresponding UID/GID.
-
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
-
12 Apr 2021 Change Windows user password from the command line
Quick and dirty, how to change the windows password from the command line in an insecure fashion (exposes password on the command-line).
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
25 Jun 2020 Finding files with PowerShell
From my May post, in which I started using PowerShell, I have been using it to do a search I would previously have used a Linux environment to use
find
for. -
28 May 2020 Teams backgrounds
To use your own custom backgrounds, drop the background file(s) in
$Env:APPDATA\Microsoft\Teams\Backgrounds\Uploads
(PowerShell,%APPDATA%\Microsoft\Teams\Backgrounds\Uploads
in cmd). They must be PNG files and will just show up in the list of backgrounds to choose from in the user interface. -
26 May 2020 PowerShell startup script
Yesterday I wrote about getting started with PowerShell but in order to make certain things persist, such as aliases, they need to be created each time the shell starts in the “profile” start-up script.
-
25 May 2020 Getting to grips with PowerShell
Over the past 6-12 months I have started using a more Microsoft-y environment on Windows, both on my own laptop and work’s. It started with using the bundled Windows OpenSSH client, removing the need for me to launch a Windows Subsystem for Linux (WSL) environment just to ssh to another system. I also been trying out Microsoft Terminal(yes, it is open source), which was released on Tuesday, and it is a really slick tool - a vast improvement on the old command-line windows and/or PuTTY. Yesterday I switched my default session from (WSL) Debian to PowerShell and have started using it as my main shell environment on Windows.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
-
26 Dec 2019 Dell XPS 13 SSD upgrade
In July I replaced my Lenovo ThinkPad x240 with a Dell XPS 13 9370 I impulse bought from the reduced section of John Lewis. Last week I finally got around to installing the new SSD I bought in a Black Friday deal on-line.
-
27 Aug 2015 Salt
Salt is a remote execution and configuration management tool that I have been using to manage the many Linux servers and desktops I have. Its state system also replaces some of my notes as a self-documenting machine-readable description of how each item is configured.
Bash
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
22 May 2023 Quick-and-dirty Linux password generation
A quick and dirty way to generate a password on a Linux box:
tr -dc '[:print:]' < /dev/urandom | head -c32
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Easy virtual machine detection in Linux (e.g. kickstart)
This was something I needed in th
%pre
of my kickstart, but its likely to be generally handy so noting the recipe for future reference. -
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Mounting exfat for access as current user
Quick post noting the bash command to mount a FAT formatted USB (or any other) drive, with the mount owned by the current user,
lsblk
is your friend for finding the device for the drive. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
12 Oct 2022 Find all files modified since a specific time
Quick post, using
find
to list all files modified since a particular timestamp (e.g. since the last backup) in a folder: -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
11 Jul 2021 Finding number of tracked connections by host
We had a problem with our network a few months ago, in which the router seemed to be running out of capacity to track connections. In order to try and identify the cause, I came up with this snippet that will display the number of currently tracked connections per-host on the Linux router. The first grep limits it to hosts that start ‘192.168.’, which is specific to the part of my network I was interested in:
-
11 Jul 2021 Getting an interactive job with Slurm
I keep getting this wrong (forgetting the
--pty
option), so all (Slurm users) recite together now: -
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
-
12 Apr 2021 Quick and dirty password generator
Quick and dirty password generator
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Certificate
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Debian
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
14 Nov 2022 Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is
namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain. -
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
02 Jul 2022 Tidying APT repository management in SaltStack
Up until now I have been managing APT repositories individually as individual states in SaltStack (there is an example in one of my previous posts). As the number of 3rd party repositories and combinations of components (
main
,contrib
andnon-free
in the Debian default repositories) has grown this has become a little unwieldy and pushes some specific configuration into the state that could be moved to pillar. -
30 Jun 2022 Decode QR barcode
When confronted with a QR code and no idea what it contains (or to verify it contains what is claimed), one might want to decode it. This can be accomplished easily using ZBar bar code reader.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
09 Jan 2021 Moving to dict-based roles
I have been using a role-base approach to managing my SaltStack states, using lists of roles in the pillar to apply those roles to systems. This has started to breakdown when I want to dynamically add roles rather than have a set list per-host (e.g. to add an operating system role to all hosts without listing them on each) due to how SaltStack merges pillar data.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
28 May 2020 Debian system updates
I have automated monitoring (via Icinga2) of the update status of my various servers, all of which currently run Debian. To date I’ve been using cron to run a daily
apt-get update
, to my mind the obvious solution to “I need it to update daily”, which updates the local package cache and then the monitoring picks up whether there’s anything to update. While investigating a problem with another cron-job yesterday, I noticed messages from apt-daily and apt-daily-upgrade services and a quick Google revealed that there is a Debian way to do this. -
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
13 Sep 2019 Upgrading Debian systems
Based on notes from my old wiki, refreshed as I remotely upgraded our home router from Debian 9 (stretch) to Debian 10 (buster). -
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
-
04 Jul 2019 Docker images and introspecting them
I've been playing around with different ways to get graphical applications working in Docker and in the process creates some large images.
-
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
-
12 Jun 2019 More blog automation - introducing Jekyll environments
Further to my earlier post on automating deployment of my blog I found a small flaw with my method and have decided to fix it.
-
12 Jun 2019 Unmarking Debian packages as manually installed
I sometimes manually install a Debian package, whilst trying to figure out dependencies for something else, and then discover I should have installed a different "parent" package that will pull it in.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Openssl
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Openvpn
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Security
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
27 Jun 2024 Accessing GitHub through a proxy
When I clustered my HashiCorp Vault, I found that the cron-wrapper scrip that I have on GitHub would not download despite me adding it as a proxied URL to my proxy. This seemed to be due to the response exceeding the proxy buffer size.
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
12 Mar 2024 Update to per-host passwords with Ansible
I recently discovered that my previous configuration for per-host sudo passwords, where I set
ansible_become_pass
to a lookup based oninventory_hostname
, fails for delegated tasks. This is becauseinventory_hostname
remains set to the original host, not the delegated host where the command is run, so the wrong password is used. -
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
24 Oct 2023 Running CIS Benchmark Assessor on servers with Ansible
I have recently been using the CIS Benchmark Assessor tool to validate the compliance of systems with the CIS Benchmarks. What I am looking at is ensuring compliance doesn’t get worse - 100% compliance would render the systems unusable so a balance is required. As a first step to automating compliance monitoring, I have automated the running of the tool and gathering reports using Ansible.
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
04 Jan 2022 Reconfiguring network for satellite switch
Due to port exhaustion I am moving my “desktop” (quoted as it includes some laptops) systems to a secondary switch. This post describes the switch and new VLAN arrangement for these systems.
-
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
-
12 Apr 2021 Quick and dirty password generator
Quick and dirty password generator
-
12 Apr 2021 Change Windows user password from the command line
Quick and dirty, how to change the windows password from the command line in an insecure fashion (exposes password on the command-line).
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
18 Apr 2020 The VLANs Strike Back
Continuing from yesterday’s work on my new network kit, today I’m starting with configuring the new switch.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
-
08 Jul 2019 Secure sudo with Google Authenticator
A little while ago, I "secured" root access on my GNU/Linux1 systems by stopping using the root password and migrating to sudo. I also setup Google Authenticator for it.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Ssl
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Vpn
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
-
13 Nov 2015 OpenSSL certificate authority
Using OpenSSL as a Certificate Authority - ported from my old wiki. See also my OpenSSL certficiates in a nutshell post for client-level certficiate handling.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
-
28 Aug 2015 OpenVPN
OpenVPN setup notes - ported from old wiki (unedited).
Web
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
08 Aug 2019 HTML linter
Trying to debug a missing close paragraph tag somewhere in a 300 line web page, I came across Tidy which helped with it's
-e
flag to report errors and warnings. -
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
-
13 Nov 2015 OpenSSL certificates in a nutshell
These notes are a little rough-and-ready, copied more or less directly from my old wiki which was only intended for my consumption.
Rfc
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
Rfc3850
-
16 Nov 2015 OpenSSL CA setup
This content is dumped, almost directly, from my old wiki and includes notes about 3 different iterations of orchestrating my own CA. From newest to oldest. It is a sister page to my notes on using an OpenSSL Certificate Authority.
Apple
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
-
08 Jul 2019 Changing Active Directory password on non-bound Mac
To change an Microsoft Active Directory password on your (non-bound) Mac:
-
21 Jun 2018 The iPod is dead
After just under 10 years flawless service my 160GB iPod Classic has died, and I’m surprised it’s the spinning rust that went (click-click-click of death) before the in-unit battery stopped getting me through multiple days continual use, at work, between charges. :(
Ipod
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
-
21 Jun 2018 The iPod is dead
After just under 10 years flawless service my 160GB iPod Classic has died, and I’m surprised it’s the spinning rust that went (click-click-click of death) before the in-unit battery stopped getting me through multiple days continual use, at work, between charges. :(
Work
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
24 Oct 2023 Running CIS Benchmark Assessor on servers with Ansible
I have recently been using the CIS Benchmark Assessor tool to validate the compliance of systems with the CIS Benchmarks. What I am looking at is ensuring compliance doesn’t get worse - 100% compliance would render the systems unusable so a balance is required. As a first step to automating compliance monitoring, I have automated the running of the tool and gathering reports using Ansible.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
21 Jul 2021 Docker on CentOS 7
-
20 Jul 2021 Updating text file on Azure Windows VM from local text file with PowerShell
In order for NFS identity mapping to work accross both platforms (Linux and Windows), pending either AD integration or fixing Windows NFS client integration with OpenLDAP server (neither of which is currently in place), we are currently maintaining a passwd file for Windows that maps the Windows identity to the corresponding UID/GID.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
11 Jul 2021 Getting an interactive job with Slurm
I keep getting this wrong (forgetting the
--pty
option), so all (Slurm users) recite together now: -
06 Jul 2021 Troubleshooting full filesystems where df and du disagree
We have a recurring problem with disk space being exhausted on the root filesystem of a system, the root cause of which is gnome-terminal holding open file-handles to very large deleted temporary files in /tmp. I suspect there is a bug in gnome-terminal not closing the handles to its scrollback buffer (possibly only when set to unlimited scrollback, as some users have).
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
28 May 2020 Teams backgrounds
To use your own custom backgrounds, drop the background file(s) in
$Env:APPDATA\Microsoft\Teams\Backgrounds\Uploads
(PowerShell,%APPDATA%\Microsoft\Teams\Backgrounds\Uploads
in cmd). They must be PNG files and will just show up in the list of backgrounds to choose from in the user interface. -
21 May 2020 Dockerised salt-ssh
For some systems that I have user accounts on but do not administer, I use Salt SSH (agent-less salt minion) to manage the common user-local files that are managed on the systems I do administer on these systems. I have previously made notes about it.
-
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
-
21 Nov 2019 Time Machine backup to network share
I had been using my own external hard disk for backing up my work computer, however (despite being 256GB) Time Machine kept complaining it didn't have enough space. Fortunately I also have access to a 3TB network share at work, so here's how I changed my Mac to backup to there instead.
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
-
08 Aug 2019 HTML linter
Trying to debug a missing close paragraph tag somewhere in a 300 line web page, I came across Tidy which helped with it's
-e
flag to report errors and warnings. -
08 Jul 2019 Changing Active Directory password on non-bound Mac
To change an Microsoft Active Directory password on your (non-bound) Mac:
-
27 Jul 2018 Salt SSH
salt-ssh provides a way to run salt remotely without it being installed on the destination system. This means, for example, that I can use it to manage my user’s dotfiles on the BlueBEAR HPC cluster.
-
25 Jun 2018 Masterless Salt Minion
A master-less Salt minion can be used to manage a standalone machine (e.g. my work Linux desktop) or bootstrap any master-controlled minion (or even the master itself) as the salt states will take over management of the minion’s configuration and reconfigure it appropriately on first run.
Backup
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
29 Feb 2024 HashiCorp Vault regenerating backup token
When I setup HashiCorp Vault, I setup backups for it. These use a token that, by default, expires after 32 days. A new one, therefore, needs to be generated periodically. I decided to write a playbook to automate this with Ansible.
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
12 Oct 2022 Find all files modified since a specific time
Quick post, using
find
to list all files modified since a particular timestamp (e.g. since the last backup) in a folder: -
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
-
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
21 Nov 2019 Time Machine backup to network share
I had been using my own external hard disk for backing up my work computer, however (despite being 256GB) Time Machine kept complaining it didn't have enough space. Fortunately I also have access to a 3TB network share at work, so here's how I changed my Mac to backup to there instead.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Iscsi
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Backuppc
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Automation
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
18 Jun 2024 Calculating size of folders with PowerShell
Today I was notified that my home drive was using more than 5GB of data and must be reduced below 5GB immediately. Ignoring the wisdom of having employees delete the product of their labour in an era of cheap storage, no method of finding out what was using the space within my drive was suggested or seemingly available on my work laptop, so I wrote a short PowerShell script to work it out:
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
12 Mar 2024 Update to per-host passwords with Ansible
I recently discovered that my previous configuration for per-host sudo passwords, where I set
ansible_become_pass
to a lookup based oninventory_hostname
, fails for delegated tasks. This is becauseinventory_hostname
remains set to the original host, not the delegated host where the command is run, so the wrong password is used. -
29 Feb 2024 HashiCorp Vault regenerating backup token
When I setup HashiCorp Vault, I setup backups for it. These use a token that, by default, expires after 32 days. A new one, therefore, needs to be generated periodically. I decided to write a playbook to automate this with Ansible.
-
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
24 Oct 2023 Running CIS Benchmark Assessor on servers with Ansible
I have recently been using the CIS Benchmark Assessor tool to validate the compliance of systems with the CIS Benchmarks. What I am looking at is ensuring compliance doesn’t get worse - 100% compliance would render the systems unusable so a balance is required. As a first step to automating compliance monitoring, I have automated the running of the tool and gathering reports using Ansible.
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
16 Apr 2023 Linux healthcheck script
On my systems at home I use Icinga2 to monitor health, adding new checks as and when I identify something I think needs checking or if a failure occurs that was not detected. Sometimes it is necessary to do some checks via other means, such as SLURM’s healthcheck program so it can be useful to have checks in script form. On previous systems, we have used the Nagios plugins that Icinga uses to minimise the maintenance overhead of have duplicated tests. The script will be written in bash and minimise dependencies on non-Coreutils files to try and keep it portable to different distributions.
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
-
06 Apr 2023 Hiding the Chat icon, search box and disabling Teams auto-start on Windows 11
Out of the box, Windows 11 shows a Chat icon in the taskbar for Microsoft Teams, a search box (duplicating the search function in the start menu) and launches the “home” version of Teams on startup. I do not use the home version of Teams, want to hide it and save teh taskbar space taken up by the search box.
-
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
14 Nov 2022 AwesomeWM XDG Autostart
Out of the box AwesomeWM does not provide a mechanism for automatically starting applications when it starts. I have a small piece of code in my configuration file to do this however it is sub-optimal, not least because (despite using
awful.spawn.once
it relaunches all of the applications on restart. Instead I applied a snippet from Arch Linux’s Wiki’s page on AwesomeWM that autostarts applications using the XDG Autostart Specification. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
02 Jul 2022 Tidying APT repository management in SaltStack
Up until now I have been managing APT repositories individually as individual states in SaltStack (there is an example in one of my previous posts). As the number of 3rd party repositories and combinations of components (
main
,contrib
andnon-free
in the Debian default repositories) has grown this has become a little unwieldy and pushes some specific configuration into the state that could be moved to pillar. -
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
09 Jan 2021 Moving to dict-based roles
I have been using a role-base approach to managing my SaltStack states, using lists of roles in the pillar to apply those roles to systems. This has started to breakdown when I want to dynamically add roles rather than have a set list per-host (e.g. to add an operating system role to all hosts without listing them on each) due to how SaltStack merges pillar data.
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
28 May 2020 Debian system updates
I have automated monitoring (via Icinga2) of the update status of my various servers, all of which currently run Debian. To date I’ve been using cron to run a daily
apt-get update
, to my mind the obvious solution to “I need it to update daily”, which updates the local package cache and then the monitoring picks up whether there’s anything to update. While investigating a problem with another cron-job yesterday, I noticed messages from apt-daily and apt-daily-upgrade services and a quick Google revealed that there is a Debian way to do this. -
24 Dec 2019 Backups with BackupPC and offsite DR backup - automation
Shortly before this time last year I revolutionised my backup infrastructure. This year I finally got around to scripting updating the off-site version.
-
12 Jun 2019 More blog automation - introducing Jekyll environments
Further to my earlier post on automating deployment of my blog I found a small flaw with my method and have decided to fix it.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Luks
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Cryptsetup
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
29 Jun 2022 Adding off-site backup disk to rotation
In my original post on setting up my off-site backup, my notes on setting up the off-site disks are a bit sparse. With my home-lab now in the mix, I have decided to add another removable disk to the backup rotation so one can be attached to the lab in order to do restores from the live environment’s backups to refresh the lab’s state from live and test bare-metal disaster recovery in the lab. I originally had 2 disks, so one was always “off-site” even during updates to the other - now I will have at least 1 (usually 2) “off-site”, 1 in the lab and up-to 1 (usually 0) being updated. I will keep the newest and oldest off-site and the one in between will be in the lab, rotating them after each time the oldest is refreshed to become the new newest copy.
-
16 Dec 2018 Backups with at-rest encryption, BackupPC, iSCSI and offsite DR backup
For many, many years (at least since 2008) I’ve been using BackupPC to provide backups of my machines, at home and in the cloud. I recently replaces my NAS with one that has a larger capacity (as part of a project to turn my DVD collection into something more convenient to browse and watch) and that NAS has iSCSI support so I moved my backup solution from a USB attached disk to an iSCSI target and introduced off-site replication of the backup pool for DR purposes.
Git
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
19 Jun 2020 First Python pull request
Yesterday I opened my first issue against Python, and enhancement for mailbox, an old part of the standard library, to support Path-like objects, a very new part of the standard library.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
Icinga
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
16 Apr 2023 Linux healthcheck script
On my systems at home I use Icinga2 to monitor health, adding new checks as and when I identify something I think needs checking or if a failure occurs that was not detected. Sometimes it is necessary to do some checks via other means, such as SLURM’s healthcheck program so it can be useful to have checks in script form. On previous systems, we have used the Nagios plugins that Icinga uses to minimise the maintenance overhead of have duplicated tests. The script will be written in bash and minimise dependencies on non-Coreutils files to try and keep it portable to different distributions.
-
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
Monitoring
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
Nginx
-
27 Jun 2024 Accessing GitHub through a proxy
When I clustered my HashiCorp Vault, I found that the cron-wrapper scrip that I have on GitHub would not download despite me adding it as a proxied URL to my proxy. This seemed to be due to the response exceeding the proxy buffer size.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
03 Jan 2019 Icinga2
These notes are a bit rough because they have been copied more-or-less directly from my old wiki that was just for my own consumption. They are from when I finally set-up icinga at home. Note that the configuration has moved on substantially since these notes were written, however as it is in a git repository I have not made any more notes or blog posts about it, to date.
Jekyll
-
12 Jun 2019 More blog automation - introducing Jekyll environments
Further to my earlier post on automating deployment of my blog I found a small flaw with my method and have decided to fix it.
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
-
03 Jun 2019 New Blog (...new me?)
So, I've started a new blog. It think this is my 3rd or 4th Blog, although it's the first new one in over 13 years, since I switched to Wordpress in April 2006.
Wordpress
-
03 Jun 2019 New Blog (...new me?)
So, I've started a new blog. It think this is my 3rd or 4th Blog, although it's the first new one in over 13 years, since I switched to Wordpress in April 2006.
Gitea
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
Webhook
-
04 Jun 2019 Automating deployment of Blog with Gitea and Webhook
Using webhook to automate deployment of this Blog via Gitea on push.
Apt
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
28 May 2020 Debian system updates
I have automated monitoring (via Icinga2) of the update status of my various servers, all of which currently run Debian. To date I’ve been using cron to run a daily
apt-get update
, to my mind the obvious solution to “I need it to update daily”, which updates the local package cache and then the monitoring picks up whether there’s anything to update. While investigating a problem with another cron-job yesterday, I noticed messages from apt-daily and apt-daily-upgrade services and a quick Google revealed that there is a Debian way to do this. -
13 Sep 2019 Upgrading Debian systems
Based on notes from my old wiki, refreshed as I remotely upgraded our home router from Debian 9 (stretch) to Debian 10 (buster). -
12 Jun 2019 Unmarking Debian packages as manually installed
I sometimes manually install a Debian package, whilst trying to figure out dependencies for something else, and then discover I should have installed a different "parent" package that will pull it in.
Packages
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
13 Sep 2019 Upgrading Debian systems
Based on notes from my old wiki, refreshed as I remotely upgraded our home router from Debian 9 (stretch) to Debian 10 (buster). -
12 Jun 2019 Unmarking Debian packages as manually installed
I sometimes manually install a Debian package, whilst trying to figure out dependencies for something else, and then discover I should have installed a different "parent" package that will pull it in.
Development
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
20 Oct 2022 VS Code wordcount plugin
Not so hot-on-the-heals of my 2021 post in enabling spell checking in VS Code, I was frustrated that I needed to know how many words were in a Markdown file today. Fortunately there’s a plugin for that.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
11 Apr 2022 Show only matching lines in VIM
To show quick-access window for matching lines in the current file:
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
11 Feb 2022 VIM abbreviations
One of the features of Sublime Text I used a lot was the snippets, where I could save a portion of text that would be substituted when I typed its trigger (in my case, I used a word followed by tab). The venerable VIM has a number of plugins that support snippets however it’s inbuilt abbreviation support can provide what I need without external dependencies.
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
29 Jul 2021 VS Code spell checking
I switched from Sublime Text, which I have used for many years, to Visual Studio Code (or ‘VS Code’ for short) mainly due to being unhappy with Sublime Text’s new licencing model (which has gone from licences for a particular major version to a subscription model, with a 3 year subscription period). One thing I have missed is Sublime Text’s built-in spell checker but there is a VS Code marketplace extension for that.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
19 Jun 2020 First Python pull request
Yesterday I opened my first issue against Python, and enhancement for mailbox, an old part of the standard library, to support Path-like objects, a very new part of the standard library.
-
08 Aug 2019 HTML linter
Trying to debug a missing close paragraph tag somewhere in a 300 line web page, I came across Tidy which helped with it's
-e
flag to report errors and warnings. -
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
Docker
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
21 Jul 2021 Docker on CentOS 7
-
08 Apr 2021 Finding SCSI generic device names
Linux has a number of SCSI drivers, many devices are managed by their own driver as well as the
sg
generic driver. Some tools need access to both devices provided by the specific driver (e.g.sr
for CD/DVD drives) and the generic one - requiring knowledge of which device files correspond to the same physical device to pass through to, e.g., Docker containers. -
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
21 May 2020 Dockerised salt-ssh
For some systems that I have user accounts on but do not administer, I use Salt SSH (agent-less salt minion) to manage the common user-local files that are managed on the systems I do administer on these systems. I have previously made notes about it.
-
04 Jul 2019 Docker images and introspecting them
I've been playing around with different ways to get graphical applications working in Docker and in the process creates some large images.
-
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
Singularity
-
14 Jun 2019 Installing Docker on Debian
I've been using virtual machines (via VirtualBox) for Linux-based testing and development for sometime but I've been persuaded that it's high-time I joined everyone else and started using containerisation.
Video
-
14 Jun 2019 Making video indexes with FFmpeg
I'm working on digitising some of my DVD collection at the moment, which means creating some pretty large files. Trying to view these over the network to discover what they are is pretty tedious (lots of buffering!), so I've been working on dumping an "index" image file that will helpfully give me enough information to determine what it is without actually loading/playing the file.
Laptop
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
26 Dec 2019 Dell XPS 13 SSD upgrade
In July I replaced my Lenovo ThinkPad x240 with a Dell XPS 13 9370 I impulse bought from the reduced section of John Lewis. Last week I finally got around to installing the new SSD I bought in a Black Friday deal on-line.
-
16 Jun 2019 Graphical Glitches on Lenovo ThinkPad X240 on resume
For a while (
possiblyprobably since I installed it) I've had weird graphical glitches on resuming my laptop from deep sleep. Until now I'd settled for rebooting it to fix it but I went on the hunt for a better solution.
Thinkpad
-
16 Jun 2019 Graphical Glitches on Lenovo ThinkPad X240 on resume
For a while (
possiblyprobably since I installed it) I've had weird graphical glitches on resuming my laptop from deep sleep. Until now I'd settled for rebooting it to fix it but I went on the hunt for a better solution.
Lenovo
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
16 Jun 2019 Graphical Glitches on Lenovo ThinkPad X240 on resume
For a while (
possiblyprobably since I installed it) I've had weird graphical glitches on resuming my laptop from deep sleep. Until now I'd settled for rebooting it to fix it but I went on the hunt for a better solution.
Graphics
-
30 Jun 2022 Decode QR barcode
When confronted with a QR code and no idea what it contains (or to verify it contains what is claimed), one might want to decode it. This can be accomplished easily using ZBar bar code reader.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
16 Jun 2019 Graphical Glitches on Lenovo ThinkPad X240 on resume
For a while (
possiblyprobably since I installed it) I've had weird graphical glitches on resuming my laptop from deep sleep. Until now I'd settled for rebooting it to fix it but I went on the hunt for a better solution.
Firefox
-
23 Jun 2019 Docker part 2
After my previous post, on installing Docker, I needed to setup my first container. I choose to set-up a container for Firefox, first, as that required me to get a graphical application that also needed sound working.
Containers
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
21 Jul 2021 Docker on CentOS 7
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
-
21 May 2020 Dockerised salt-ssh
For some systems that I have user accounts on but do not administer, I use Salt SSH (agent-less salt minion) to manage the common user-local files that are managed on the systems I do administer on these systems. I have previously made notes about it.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
04 Jul 2019 Docker images and introspecting them
I've been playing around with different ways to get graphical applications working in Docker and in the process creates some large images.
Active directory
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
08 Jul 2019 Changing Active Directory password on non-bound Mac
To change an Microsoft Active Directory password on your (non-bound) Mac:
Osx
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
-
30 Jun 2022 Decode QR barcode
When confronted with a QR code and no idea what it contains (or to verify it contains what is claimed), one might want to decode it. This can be accomplished easily using ZBar bar code reader.
-
21 Nov 2019 Time Machine backup to network share
I had been using my own external hard disk for backing up my work computer, however (despite being 256GB) Time Machine kept complaining it didn't have enough space. Fortunately I also have access to a 3TB network share at work, so here's how I changed my Mac to backup to there instead.
-
08 Jul 2019 Changing Active Directory password on non-bound Mac
To change an Microsoft Active Directory password on your (non-bound) Mac:
Google authenticator
-
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
08 Jul 2019 Secure sudo with Google Authenticator
A little while ago, I "secured" root access on my GNU/Linux1 systems by stopping using the root password and migrating to sudo. I also setup Google Authenticator for it.
Sudo
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
08 Jul 2019 Secure sudo with Google Authenticator
A little while ago, I "secured" root access on my GNU/Linux1 systems by stopping using the root password and migrating to sudo. I also setup Google Authenticator for it.
Internet
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
Plusnet
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
Pppoe
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
Vigor
-
18 Aug 2019 PlusNet Fibre (FTTC)
After much suffering from the incompitence of Virgin Media we have switched to PlusNet for our broadband provider. Thankfully FTTC has arrived in our neighbourhood so we can, at long last, get more than 300kbps estimated speed down the phone line (although we had to have a new phone line installed, as we did not already have one).
Javascript
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
React
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
React native
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
Testing
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
Jest
-
16 Sep 2019 Testing React Native with Jest
I've started a Mobile App at work using React Native. Obviously this needs testing. This post is about getting started on that process.
Time machine
-
21 Nov 2019 Time Machine backup to network share
I had been using my own external hard disk for backing up my work computer, however (despite being 256GB) Time Machine kept complaining it didn't have enough space. Fortunately I also have access to a 3TB network share at work, so here's how I changed my Mac to backup to there instead.
Dell
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
26 Dec 2019 Dell XPS 13 SSD upgrade
In July I replaced my Lenovo ThinkPad x240 with a Dell XPS 13 9370 I impulse bought from the reduced section of John Lewis. Last week I finally got around to installing the new SSD I bought in a Black Friday deal on-line.
Xps 13 9370
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
-
26 Dec 2019 Dell XPS 13 SSD upgrade
In July I replaced my Lenovo ThinkPad x240 with a Dell XPS 13 9370 I impulse bought from the reduced section of John Lewis. Last week I finally got around to installing the new SSD I bought in a Black Friday deal on-line.
Dvd
-
14 Apr 2020 More forced subtitles in DVDs and BluRays
Following my last post I’ve been going through my DVD collection and fixing the forced subtitles for the films that have them.
-
07 Apr 2020 (sort-of-but-not-really-)forced subtitles in DVDs and BluRays
As part of an on-going project to convert my DVD and BluRay collection to a hard-disk based media collection (mainly to save shelf-space and having to keep swapping disks) I’ve encountered a disk that has so-called “forced subtitles” to subtitle some foreign language speech into the viewers native language.
Broadband
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes. -
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
Eap225
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
Plex
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
Sky
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
17 Apr 2020 A New Switch
This post documents the re-introduction of VLANs to our home network, removed in 2018 to solve problems with 4-year old WAP and power-line adapters their replacement means we can move back to more secure and flexible networking set-up.
Tplink omada
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
19 Apr 2020 Return of the WAPs
Setting up the final piece of the new network puzzle, the wireless access points…
Rawlplugs
-
20 Apr 2020 Rawlplug UNO sizes technical data
Rawlplug’s UNO range are currently my favourite wall plug, reliable and I’m yet to have any problems with the installation of one. I struggle to find this information, particularly supported screw sizes, when I want to refer to it to here it is:
Diy
-
20 Apr 2020 Rawlplug UNO sizes technical data
Rawlplug’s UNO range are currently my favourite wall plug, reliable and I’m yet to have any problems with the installation of one. I struggle to find this information, particularly supported screw sizes, when I want to refer to it to here it is:
Gpg
-
22 Apr 2020 Keysigning party post-party signing
On 1st & 2nd February I was fortunate to attend FOSDEM 2020 in at Université Libre de Bruxelles, Brussels. While I was there I took part in the event’s keysigning party and now need to sign the keys I verified (only 8 days before the deadline of 30th April!).
Playstation
-
09 May 2020 Upgrading PS3 hard disk
As I mentioned yesterday, I was planning to replacing the hard disk drive in my PS3™ with a larger SSD I had laying around my desk.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
Ps3
-
09 May 2020 Upgrading PS3 hard disk
As I mentioned yesterday, I was planning to replacing the hard disk drive in my PS3™ with a larger SSD I had laying around my desk.
-
08 May 2020 Formatting FAT32 on Windows 10
In order to backup my PS3™, in preparation for replacing the hard disk drive with a larger SSD I have laying around my desk, I needed a FAT32 formatted USB disk. Windows 10 will only allow disks larger than 32GB to be formatted as exFAT (or NTFS), which the PS3™ does not support.
Usb
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
01 Jan 2023 Mounting exfat for access as current user
Quick post noting the bash command to mount a FAT formatted USB (or any other) drive, with the mount owned by the current user,
lsblk
is your friend for finding the device for the drive. -
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
08 May 2020 Dell XPS 13 (9370) Thunderbolt & eGPU
This post is just pulling together notes I have made whilst researching eGPUs with this laptop. I currently use a Razer Core X Chroma™ with it, which works very well except for issues with USB-disconnects but this seems to be a general problem with USB devices and Windows 7 onwards.
Ppp
-
22 May 2020 updating broadband PPPoE configuration
For a very long time I have been running my own Linux-based routers as gateways to the internet. The configuration was setup a very long time ago and it has not been revisited, other than to update logins etc., since. I discovered today that there is now a kernel-mode PPPoE module (since 2.4, from what I can gather) that I have missed the arrival of and a more performant driver for it. As I was monitoring the route due to line-speed problems, I noted that I could see the process
pppoe
appear in top hovering around the 12% CPU mark and wondered if that was expected or not. Googling this lead to these changes.
Bonding
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
Lacp
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
Nas
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
Netgear
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
04 Jan 2022 Reconfiguring network for satellite switch
Due to port exhaustion I am moving my “desktop” (quoted as it includes some laptops) systems to a secondary switch. This post describes the switch and new VLAN arrangement for these systems.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
23 May 2020 Adding bonded connection to Netgear ReadyNAS 214
My Netgear ReadyNAS 214 has two Ethernet ports. It is used as a safe place to store my data as well has hosting an iSCSI target that all my backups are done to (with regular off-site copies made to mitigate against failure or physical damage/loss of the NAS) so some extra bandwidth would not hurt and the web user-interface provides the option to bond them. Since my managed switch also supports bonding, I have decided to do this.
Powershell
-
18 Jun 2024 Calculating size of folders with PowerShell
Today I was notified that my home drive was using more than 5GB of data and must be reduced below 5GB immediately. Ignoring the wisdom of having employees delete the product of their labour in an era of cheap storage, no method of finding out what was using the space within my drive was suggested or seemingly available on my work laptop, so I wrote a short PowerShell script to work it out:
-
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
-
20 Jul 2021 Updating text file on Azure Windows VM from local text file with PowerShell
In order for NFS identity mapping to work accross both platforms (Linux and Windows), pending either AD integration or fixing Windows NFS client integration with OpenLDAP server (neither of which is currently in place), we are currently maintaining a passwd file for Windows that maps the Windows identity to the corresponding UID/GID.
-
12 Apr 2021 Change Windows user password from the command line
Quick and dirty, how to change the windows password from the command line in an insecure fashion (exposes password on the command-line).
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
25 Jun 2020 Finding files with PowerShell
From my May post, in which I started using PowerShell, I have been using it to do a search I would previously have used a Linux environment to use
find
for. -
26 May 2020 PowerShell startup script
Yesterday I wrote about getting started with PowerShell but in order to make certain things persist, such as aliases, they need to be created each time the shell starts in the “profile” start-up script.
-
25 May 2020 Getting to grips with PowerShell
Over the past 6-12 months I have started using a more Microsoft-y environment on Windows, both on my own laptop and work’s. It started with using the bundled Windows OpenSSH client, removing the need for me to launch a Windows Subsystem for Linux (WSL) environment just to ssh to another system. I also been trying out Microsoft Terminal(yes, it is open source), which was released on Tuesday, and it is a really slick tool - a vast improvement on the old command-line windows and/or PuTTY. Yesterday I switched my default session from (WSL) Debian to PowerShell and have started using it as my main shell environment on Windows.
Scripting
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
07 Apr 2023 Easy virtual machine detection in Linux (e.g. kickstart)
This was something I needed in th
%pre
of my kickstart, but its likely to be generally handy so noting the recipe for future reference. -
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password. -
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
25 Jun 2020 Finding files with PowerShell
From my May post, in which I started using PowerShell, I have been using it to do a search I would previously have used a Linux environment to use
find
for. -
19 Jun 2020 First Python pull request
Yesterday I opened my first issue against Python, and enhancement for mailbox, an old part of the standard library, to support Path-like objects, a very new part of the standard library.
-
26 May 2020 PowerShell startup script
Yesterday I wrote about getting started with PowerShell but in order to make certain things persist, such as aliases, they need to be created each time the shell starts in the “profile” start-up script.
-
25 May 2020 Getting to grips with PowerShell
Over the past 6-12 months I have started using a more Microsoft-y environment on Windows, both on my own laptop and work’s. It started with using the bundled Windows OpenSSH client, removing the need for me to launch a Windows Subsystem for Linux (WSL) environment just to ssh to another system. I also been trying out Microsoft Terminal(yes, it is open source), which was released on Tuesday, and it is a really slick tool - a vast improvement on the old command-line windows and/or PuTTY. Yesterday I switched my default session from (WSL) Debian to PowerShell and have started using it as my main shell environment on Windows.
Ssh
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
25 May 2020 Getting to grips with PowerShell
Over the past 6-12 months I have started using a more Microsoft-y environment on Windows, both on my own laptop and work’s. It started with using the bundled Windows OpenSSH client, removing the need for me to launch a Windows Subsystem for Linux (WSL) environment just to ssh to another system. I also been trying out Microsoft Terminal(yes, it is open source), which was released on Tuesday, and it is a really slick tool - a vast improvement on the old command-line windows and/or PuTTY. Yesterday I switched my default session from (WSL) Debian to PowerShell and have started using it as my main shell environment on Windows.
Microsoft
-
04 Oct 2024 Negative times in Excel
For reasons I won’t go into, I use an Excel spreadsheet to track my time at work and transcribe it once a week to our hours recording system. Recently I modified it to include how many hours I had left allocated for this week to each project I was resourced to work on. When I “spent” more hours than allocated, this turned into a series of hash (
#
) marks - fortunately there was a simple way to have it display negative times instead. -
18 Jun 2024 Calculating size of folders with PowerShell
Today I was notified that my home drive was using more than 5GB of data and must be reduced below 5GB immediately. Ignoring the wisdom of having employees delete the product of their labour in an era of cheap storage, no method of finding out what was using the space within my drive was suggested or seemingly available on my work laptop, so I wrote a short PowerShell script to work it out:
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
22 Jul 2020 Windows telnet client
Windows 10 does not come with a telnet client (one of the commands I still have to drop into a WSL session for). Today I rectified that by enabling the optional feature.
-
28 May 2020 Teams backgrounds
To use your own custom backgrounds, drop the background file(s) in
$Env:APPDATA\Microsoft\Teams\Backgrounds\Uploads
(PowerShell,%APPDATA%\Microsoft\Teams\Backgrounds\Uploads
in cmd). They must be PNG files and will just show up in the list of backgrounds to choose from in the user interface.
Teams
-
28 May 2020 Teams backgrounds
To use your own custom backgrounds, drop the background file(s) in
$Env:APPDATA\Microsoft\Teams\Backgrounds\Uploads
(PowerShell,%APPDATA%\Microsoft\Teams\Backgrounds\Uploads
in cmd). They must be PNG files and will just show up in the list of backgrounds to choose from in the user interface.
Hp
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Hpe
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Ilo
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Kvm
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Red hat
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
20 Apr 2023 Deploying custom CA certificates on Linux from Windows share
This post is about deploying custom certificate authority (CA) certificates onto Linux hosts, from an anonymous Windows share, then deploying them to be used by web-browsers (which seem to use their own CA stores these days). There are two scripts, one for each of these tasks, as installing to the system store usually requires super-user (i.e.
root
) access but installing to the browser stores is per-user (and should not be done using the super-user account). -
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Easy virtual machine detection in Linux (e.g. kickstart)
This was something I needed in th
%pre
of my kickstart, but its likely to be generally handy so noting the recipe for future reference. -
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Virtualisation
-
21 May 2024 CephFS on Proxmox Virtual Environment
One of the things I did not setup in my new ProxmoxVE cluster was CephFS. To start with, I PXE booted my VMs into an installer but I wanted to experiment with trying to get Grub to chainload another distribution’s shim to load their kernel (spoiler alert: without success). The easiest way I thought to play with this was to boot from a Fedora install CD, whose Grub has tftp and http support, and try to chainload a Debian installer. In order to quickly do this, I wanted to attach an ISO to a new VM (as Fedora isn’t available via my PXE server and I thought this would be convenient for the future) which required setting up CephFS to store the ISO.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
23 Jul 2020 Offsite DR backup with VM
Since migrating BackupPC to a VM I have not been doing off-site backups (since I have been working from home full-time). Today I had to visit the office to retrieve some essential adaptors for my work laptop, and while I was there I grabbed my off-site backups disks. Now I have done this, I need to figure out how to pass the device through to my VM in order to update the oldest backup (which has not been updated since December 2019!).
-
22 Jul 2020 Migrating Omada controller to VM
As part of my migration of core services off the router to VMs I am moving the Omada controller. I have already moved the SaltStack controller and Debian pre-seed web site, but as these were straight-forward migration of daemons and data I did not write any notes about the process.
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
-
08 Jun 2020 Migrate BackupPC to VM
Now that I have deploying VMs sorted I am migrating the first service from my router onto a new VM, my BackupPC server. This should be relatively straight forward as the server set-up is managed in SaltStack and the data resides on an iSCSI volume from my NAS, do configuration and “transfer” should be simple. Should be.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
-
04 Jun 2020 KVM setup
Following on from tuesday’s post on setting up my first microserver, I am starting to set-up KVM and automate building virtual-machines in order to start migrating services off my router.
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Vmware
-
02 Jun 2020 HP Microservers
Over the weekend I bought and collected 2 8th generation HPE Microservers. The two I have bought have been upgraded to 16GB of ECC memory and have had their stock processors replaced with E3-1240 v2 processors. They also came with 10GbE cards fitted, although currently I have no infrastructure to make use of these.
Kickstart
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Apr 2023 Easy virtual machine detection in Linux (e.g. kickstart)
This was something I needed in th
%pre
of my kickstart, but its likely to be generally handy so noting the recipe for future reference. -
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
Preseed
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
06 Jun 2020 Building Debian VMs with debootstrap
Following the awful time I had setting up a working preseed configuration for Debian installer I am exploring the alternative method of pre-building the disk image using debootstrap.
Munin
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
-
14 Jun 2020 Migrate monitoring to VM
Hot on the heals of migrating BackupPC from a bare-metal (router) system to a VM, the next set of services to migrate are my monitoring services. For this I run two seperate systems, Icinga2 and Munin. Icinga excels at monitoring and alerting to problems and faults as they happen, Munin provides resource monitoring and graphing that gives a better view of “what just happened to kill our performance?”(quoted from their website) and historic views of the same.
Python
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed: -
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
-
29 Oct 2020 Transfer output files with SCP
Related to my previous post on monitoring output, I also needed to provide a script to transfer the output files from the scripts to a remote server. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Monitoring script outputs for updates
Related to my previous post on launching 16 scripts in tmux, I also needed to provide a script to monitor the output files from some scripts and alert if they are not updated. For the same reasons, so the researcher can maintain his own scripts, this was written in Python rather than Bash.
-
29 Oct 2020 Launching scripts in tmux
I was asked to help write a script to automate launching 16 scripts in a tmux session.
-
19 Jun 2020 First Python pull request
Yesterday I opened my first issue against Python, and enhancement for mailbox, an old part of the standard library, to support Path-like objects, a very new part of the standard library.
Dns
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
Dnsmasq
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
05 Jan 2021 Split DNS with Dnsmasq
I had a need to split DNS resolution on a series of hosts between two DNS servers, one local to the environment and one for global address resolution. In the past I have always used BIND 9 for my go-to DNS server, however for this trivial forwarding tasks it seemed overkill and a good opportunity to give something lighter-weight a go. So I opted to try Dnsmasq instead.
Centos
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
28 Jul 2021 Multi-stage Python builds with Docker on CentOS
Following on from my getting started with Docker on CentOS post, I found that the version of Docker is very old (1.13) and, amongst other things, does not support multi-stage builds which will allow use to cut down our image size (useful, as the Azure registry charges for data transfer).
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
21 Jul 2021 Docker on CentOS 7
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
Kerberos
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
06 Jan 2021 Migrate Linux system to AD authentication
As a stepping stone in migration a CentOS Linux system from local user management to Active Directory(AD) integration, I setup Kerberos authentication to the AD but retaining local identity information.
Devops
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header. -
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
02 Jul 2022 Tidying APT repository management in SaltStack
Up until now I have been managing APT repositories individually as individual states in SaltStack (there is an example in one of my previous posts). As the number of 3rd party repositories and combinations of components (
main
,contrib
andnon-free
in the Debian default repositories) has grown this has become a little unwieldy and pushes some specific configuration into the state that could be moved to pillar. -
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
09 Jan 2021 Moving to dict-based roles
I have been using a role-base approach to managing my SaltStack states, using lists of roles in the pillar to apply those roles to systems. This has started to breakdown when I want to dynamically add roles rather than have a set list per-host (e.g. to add an operating system role to all hosts without listing them on each) due to how SaltStack merges pillar data.
Apc
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Bx1400ui
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Nut
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Readynas
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Rn214
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Ups
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
22 Aug 2021 Automatically shutting down server and NAS
At home we have a NAS (An APC Back-UPS BX1400UI) which protects our internet connectivity equipment, core network switch, one server and network-attached (NAS) storage device. The server runs the backup tool (BackupPC) that backs up all of my local and cloud systems, with the backups stored on an iSCSI volume on the NAS (with monthly “off-site” copies).
-
10 Jan 2021 UPS monitoring and auto shut-down with NUT
Last night we had a power-cut that lasted approximately 20 minutes, about 5 minutes into which I started my usual routine of manually shutting down systems to shed load (and hence prolong runtime for our broadband infrastructure) from my UPS. At around 15 minutes into the power-cut I started to get a bit twitchy about how much runtime was left on the UPS and finally go around to doing something about it (not the ideal conditions to be setting it up, but a good motivator).
Code rack
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
Dehydrated
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
Lets encrypt
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
05 Jul 2021 Migrate OpenVPN endpoint to cloud
For many years I have run an OpenVPN server on my home router, which provides access to my home network remotely when I am away from home and a private tunnel to my cloud server through which most monitoring and all command-and-control (via SaltStack at the time of writing) take place.
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
Mythic beasts
-
15 Jan 2021 Let's Encrypt SSL certificates at home
For nearly 2 years I have been using Let’s Encrypt (like half the tech world) for SSL certificates on my public-facing projects and services. I have decided to try an extend their use to my internal sites too, and do-away with running my own certificate authority except for a few niche cases (OpenVPN, for example).
Github
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
27 Jun 2024 Accessing GitHub through a proxy
When I clustered my HashiCorp Vault, I found that the cron-wrapper scrip that I have on GitHub would not download despite me adding it as a proxied URL to my proxy. This seemed to be due to the response exceeding the proxy buffer size.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
Github actions
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
Linting
-
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
Slurm
-
16 Apr 2023 Linux healthcheck script
On my systems at home I use Icinga2 to monitor health, adding new checks as and when I identify something I think needs checking or if a failure occurs that was not detected. Sometimes it is necessary to do some checks via other means, such as SLURM’s healthcheck program so it can be useful to have checks in script form. On previous systems, we have used the Nagios plugins that Icinga uses to minimise the maintenance overhead of have duplicated tests. The script will be written in bash and minimise dependencies on non-Coreutils files to try and keep it portable to different distributions.
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
11 Jul 2021 Getting an interactive job with Slurm
I keep getting this wrong (forgetting the
--pty
option), so all (Slurm users) recite together now: -
13 Feb 2021 Getting started with GitHub Actions
One of the things we need more of in my new day-job is automation, something we were good at in my previous role. To get started with GitHub Actions I have decided to start with linting in one of my repositories, Slurm Helpers, and this post documents the journey to getting that working.
Ansible
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
12 Mar 2024 Update to per-host passwords with Ansible
I recently discovered that my previous configuration for per-host sudo passwords, where I set
ansible_become_pass
to a lookup based oninventory_hostname
, fails for delegated tasks. This is becauseinventory_hostname
remains set to the original host, not the delegated host where the command is run, so the wrong password is used. -
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
24 Oct 2023 Running CIS Benchmark Assessor on servers with Ansible
I have recently been using the CIS Benchmark Assessor tool to validate the compliance of systems with the CIS Benchmarks. What I am looking at is ensuring compliance doesn’t get worse - 100% compliance would render the systems unusable so a balance is required. As a first step to automating compliance monitoring, I have automated the running of the tool and gathering reports using Ansible.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
-
06 Apr 2023 Hiding the Chat icon, search box and disabling Teams auto-start on Windows 11
Out of the box, Windows 11 shows a Chat icon in the taskbar for Microsoft Teams, a search box (duplicating the search function in the start menu) and launches the “home” version of Teams on startup. I do not use the home version of Teams, want to hide it and save teh taskbar space taken up by the search box.
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
Azure
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
20 Jul 2021 Updating text file on Azure Windows VM from local text file with PowerShell
In order for NFS identity mapping to work accross both platforms (Linux and Windows), pending either AD integration or fixing Windows NFS client integration with OpenLDAP server (neither of which is currently in place), we are currently maintaining a passwd file for Windows that maps the Windows identity to the corresponding UID/GID.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
-
19 Jul 2021 Working with virtual machines using the Azure command line client
Over the past 8 months I have gethered quite a few useful snippets for interacting with Azure VMs from the
az
command-line client. This is a summary of them. -
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
Azure devops
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
13 Feb 2021 Ansible with Azure DevOps
Since at least July 2013 (the initial commit in my current Salt configuration repository at home) I have been using SaltStack to orchestrate and configure my systems, including VMs, at home. In the last few years Ansible has grown in popularity and I have recently been looking closely at it due to its integration with Azure and Microsoft include Ansible in their Azure documentation and Cloud Shell Platform.
Vnc
-
28 Apr 2021 Decrypt VNC password
Decrypt a VNC password file in one-line with nothing but openssl:
Ldap
-
19 Jul 2021 Searching Windows AD by username and email with ldapsearch
Further to my post on querying AD with LDAP, to search for users by Windows username or email address one can use these commands:
-
10 May 2021 Query AD with LDAP
Because I keep ending up looking at my old scripts to refresh myself on how to do this by hand, here’s the recipe for querying AD with ldapsearch.
Life
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
05 Jul 2022 Bad habits
When I was taught typing at school, we were made to type sentences with two spaces after the full-stop. Opinion has historically been split on this practice but most sources these days are clear that one space is now the only correct option (see 1st source below for a study that asserts 2 spaces promotes faster reading). Recently I have annoyed people at work reviewing my documents, as they have to replace my habitual two spaces with one. The problem from my end is that for nearly 30 years, most of which I have been touch-typing, I have consistently used two spaces. That’s a lot of muscle-memory to overcome!
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
-
15 Jun 2021 Hay-fever
For the first time in quite a few years I have been really suffering with hay-fever. The glorious sunshine during peak grass season (which is what causes mine) season has sent grass-pollen counts through the roof. This is coupled with me walking our two dogs during peak pollen times, in the morning and evenings (when the weather is cooler for the dogs) but I have been thinking about whether other factors are at play in my unusually high level of suffering this year. These are my entirely unscientific, layman, musings.
Musing
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
15 Jun 2021 Hay-fever
For the first time in quite a few years I have been really suffering with hay-fever. The glorious sunshine during peak grass season (which is what causes mine) season has sent grass-pollen counts through the roof. This is coupled with me walking our two dogs during peak pollen times, in the morning and evenings (when the weather is cooler for the dogs) but I have been thinking about whether other factors are at play in my unusually high level of suffering this year. These are my entirely unscientific, layman, musings.
Non technical
-
15 Jun 2021 Hay-fever
For the first time in quite a few years I have been really suffering with hay-fever. The glorious sunshine during peak grass season (which is what causes mine) season has sent grass-pollen counts through the roof. This is coupled with me walking our two dogs during peak pollen times, in the morning and evenings (when the weather is cooler for the dogs) but I have been thinking about whether other factors are at play in my unusually high level of suffering this year. These are my entirely unscientific, layman, musings.
Random
-
15 Jun 2021 Hay-fever
For the first time in quite a few years I have been really suffering with hay-fever. The glorious sunshine during peak grass season (which is what causes mine) season has sent grass-pollen counts through the roof. This is coupled with me walking our two dogs during peak pollen times, in the morning and evenings (when the weather is cooler for the dogs) but I have been thinking about whether other factors are at play in my unusually high level of suffering this year. These are my entirely unscientific, layman, musings.
Raspberry pi
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
19 Sep 2021 Migrating Raspberry Pi to new SSD
Since setting up my Raspberry Pi to boot from a USB SSD, I need to repurpose the SSD I used to set this up. I bought a smaller 240GB SSD to replace it and wanted to copy the existing filesystem over to it rather than reinstall.
-
11 Jul 2021 USB booting Raspberry PI 4
This post describes the process of enabling boot-from-USB and then using a USB disk for booting my Raspberry PI 4. It was made from notes I jotted down when I did this, over a week ago, so I apologise if it seems a bit disjointed or bulleted.
-
17 Jun 2021 Installing Debian on Raspberry PI 4
I have been planning to migrate my monitoring to my Raspberry PI 4, from its current location on a VM which is fine unless there is a fault with the VM or the host but this has happened (today in fact). It monitors these hosts and it is helpful to know what is going on if there is a problem. My intention is to also shutdown the VM host in the event of a power outage (to extend UPS battery runtime) and it would be nice for monitoring to continue during the outage.
Troubleshooting
-
27 Jun 2024 Accessing GitHub through a proxy
When I clustered my HashiCorp Vault, I found that the cron-wrapper scrip that I have on GitHub would not download despite me adding it as a proxied URL to my proxy. This seemed to be due to the response exceeding the proxy buffer size.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2021 Troubleshooting full filesystems where df and du disagree
We have a recurring problem with disk space being exhausted on the root filesystem of a system, the root cause of which is gnome-terminal holding open file-handles to very large deleted temporary files in /tmp. I suspect there is a bug in gnome-terminal not closing the handles to its scrollback buffer (possibly only when set to unlimited scrollback, as some users have).
Firewall
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
Iptables
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
Virgin
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
05 Dec 2021 One For All Universal Remote with Virgin Media TV360
On Thursday we received our new Virgin Media equipment, including a TV360 box. Despite being physically the same box as their old V6 version (existing customers are getting TV360 pushed out as a software update) the TV360 software no longer works with existing Virgin TV remotes.
-
10 Jul 2021 Fixing Sky downloading on new broadband
This post documents my attempt to send traffic from specific local hosts (Sky TV boxes) via my existing VPN connection, whilst retaining direct access to my broadband connection for all other hosts as a workaround to the annoying problems Sky services have when the client is behind a carrier-level network address translation (carrier-grade NAT or CGNAT).
Hpc
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
-
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
-
11 Jul 2021 Getting an interactive job with Slurm
I keep getting this wrong (forgetting the
--pty
option), so all (Slurm users) recite together now:
Excel
-
04 Oct 2024 Negative times in Excel
For reasons I won’t go into, I use an Excel spreadsheet to track my time at work and transcribe it once a week to our hours recording system. Recently I modified it to include how many hours I had left allocated for this week to each project I was resourced to work on. When I “spent” more hours than allocated, this turned into a series of hash (
#
) marks - fortunately there was a simple way to have it display negative times instead. -
14 Jul 2021 Creating Excel spreadsheets with Python
Every month I produce usage spreadsheets for the HPC service I run. This involved much copying and pasting of data, which I already have a script to export in CSV format, into a bunch of spreadsheets for different people. In total, it takes about 7 hours (essentially a full working day of doing nothing else) to do - this post is taking some of that 7 hours to get the existing script to generate the required spreadsheets directly. This is definitely going to be a case of getting back more time than I invest.
Cloud
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
-
20 Jul 2021 Getting started with Ansible and Azure
This post stated, like most of my posts, with me making notes as I went along trying to accomplish a technical task. I quickly became a bit of a rant as I encountered numerous issues with Ansible’s Azure integration.
Docker registry
Environment modules
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
Lmod
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
Modules
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
Ubuntu
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
27 Jul 2021 Platform detection with Lmod
Managing software start getting interesting in High-Performance Computing (HPC) when clusters become heterogeneous. One way to manage this, using a common shared filesystem, is to allow the software management tool to detect the current platform and make the appropriate software available. This post shows how to do this with the Lmod tool.
Easybuild
-
27 Sep 2021 Custom EasyBlocks for easybuild
Since my post on creating separate EasyBuild development environments I have encountered a piece of software I need to develop some custom EasyBlocks for. My scripts allow this, however my magic module does not initialise the platform-specific installs using a custom EasyBlock source. In order to retain the convenience of architecture-local initialisation on each architecture I modified part of my module.
-
29 Jul 2021 Setting up EasyBuild environments
This follows on from my post on platform detection with Lmod, using that as a tool from which to create platform-specific builds of software with EasyBuild. This is a long one, as it contains the full setup for getting this running.
Vs code
-
20 Oct 2022 VS Code wordcount plugin
Not so hot-on-the-heals of my 2021 post in enabling spell checking in VS Code, I was frustrated that I needed to know how many words were in a Markdown file today. Fortunately there’s a plugin for that.
-
29 Jul 2021 VS Code spell checking
I switched from Sublime Text, which I have used for many years, to Visual Studio Code (or ‘VS Code’ for short) mainly due to being unhappy with Sublime Text’s new licencing model (which has gone from licences for a particular major version to a subscription model, with a 3 year subscription period). One thing I have missed is Sublime Text’s built-in spell checker but there is a VS Code marketplace extension for that.
Nextcloud
-
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
25 Aug 2021 Checking NextCloud version
One of my current issues is that I do not notice my NextCloud install requires updating until it is no longer supported and the clients stops working with it. I already have icinga setup as my monitoring solution, so it has been on my to-do list for a while to create a plugin to check the version of my server against the latest release.
Terraform
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
05 Dec 2021 Azure RBAC and TerraForm
My next challenge in my TerraForm journey is to assign some RBAC roles (some custom) to users on specific resources.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
-
25 Nov 2021 Splitting up TerraForm configuration with a module
Continuing from my last TerraForm post, I have split my TerraForm configuration into a number of files. I am now taking this one step further and creating a module that I can use to deploy a number of identical (or near-identical) resources following a pattern.
-
29 Sep 2021 TerraForm, cloud-init and Ansible
As I mentioned at the end of yesterday’s TerraForm post, one of the two outstanding tasks with my test setup is to kick-off an initial configuration of the VM.
-
28 Sep 2021 TerraForm VM management
Following on from my last TerraForm post, my next task is to deploy a VM with the tool. This is more complex than it sounds, as a ‘VM’ requires a number of components (network interface, disk) in addition to the VM as well as me wanting to configure it to do some initial boot-strapping on first start.
-
24 Sep 2021 TerraForm part 2
Following on from my first steps with TerraForm post, this post covers the next steps. This includes external state storage and splitting up the terraform configuration.
-
23 Sep 2021 Getting started with TerraForm
These notes document my first steps in using TerraForm to manage Azure infrastructure. This first post is how I brought some existing resources under TerraForm’s management.
Systemd
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
30 Sep 2021 docker-compose with systemd
This post is about launching a Docker Compose orchestrated collection of containers as a system service using systemd. I provisioned a VM running Docker (it’s a loooong story but short version: Azure Kubernetes and Azure container services cannot be deployed without public IP addresses, which goes against some of our secure-by-design decisions) using Terraform and Ansible to deploy and configure it. The service it is running is a web application made up of two Docker containers and I have written a Docker Compose file that builds and runs the infrastructure.
Storage
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
03 Dec 2021 TerraForm and Azure NFS-enabled Blob Storage
Continuing my journey of TerraForm with Microsoft’s Azure cloud, I needed to create some blob storage with NFS enabled (which currently has to be done at the storage account level and can only be turned on or off at account creation time).
Television
-
05 Dec 2021 One For All Universal Remote with Virgin Media TV360
On Thursday we received our new Virgin Media equipment, including a TV360 box. Despite being physically the same box as their old V6 version (existing customers are getting TV360 pushed out as a software update) the TV360 software no longer works with existing Virgin TV remotes.
-
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
Opendkim
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
Postfix
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
20 Jan 2022 Routing email based on sender address
For some external email addresses, I need my mail server to relay mail through their SMTP host in order to pass DKIM/SPF checks (otherwise my mail server is just forging the from address from the point of view of the destination system). These are the changes needed to make this work in my virtual mail setup.
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
Rfc6376
-
17 Jan 2022 Setting up DKIM and DMARC
This all started because GMail started blocking my mail server’s IP address. A close inspection of my mail logs showed no unusual activity, and certainly nothing spammy being sent from my system, but there is a strong recommendation to setup DKIM for email domains which I have not done yet (SPF has been in place for many years). This post documents setting up OpenDKIM in my existing virtual mail infrastructure.
Ntp
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
Puppet
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
11 Feb 2022 Parameterized Puppet class
Continuing my experimentation with Puppet I created my first class which takes parameters and sets those parameters using data in the master repository (for now).
-
24 Jan 2022 From Salt to Puppet
I have been using SaltStack for many years(although my current SaltStack configuration Git history goes back to 2013, so I had been using for at least a few years before the linked post). Prior to that I have had some experience using Puppet and cfengine but this was before I started using SaltStack so my Puppet knowledge is at least 10 years old.
Django
-
03 Feb 2022 Generating Django secret keys with Python 3.6
This is a quick post - starting with Python 3.6, a
secrets
module is included “for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets”. This means we can generate good values for Django’sSECRET_KEY
setting on any system with Python installed:
Vim
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
11 Apr 2022 Show only matching lines in VIM
To show quick-access window for matching lines in the current file:
-
11 Feb 2022 VIM abbreviations
One of the features of Sublime Text I used a lot was the snippets, where I could save a portion of text that would be substituted when I typed its trigger (in my case, I used a word followed by tab). The venerable VIM has a number of plugins that support snippets however it’s inbuilt abbreviation support can provide what I need without external dependencies.
Air gapped
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Catalyst
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Cisco
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Dhcp
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Home lab
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
17 Mar 2023 Setting up Icy Box IB-RD3620SU3 external (USB3/eSATA) RAID system
During the week, I have decided to replace the old HP Microservers I bought during 2020 with 5 HP EliteDesk 800 G2 minis mirroring the Lenovo M72e cluster I bought at in February of 2022 to build a home-lab, but admittedly still have not finished setting up. As the micro-server has 4 3.5” drive bays, in which my backup disks are currently housed, moving to a ultra small form factor with no drive bays presents a challenge. I found the Icy Bay IB-RD3620SU3 online which allows me to connect the drives via USB 3 or eSATA. It also does RAID internally, offloading it from the host system and reducing the amount of data that needs to be sent over the USB/eSATA connection (c.f. software-raid on the host).
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
28 Feb 2023 Ansible automatically set ansible_connection to local for the host Ansible is running on
One of the things that has been bugging me, and itch to be scratched if you will, is that I have been changing the inventory to set which host uses the
local
connection type. On my live network I have been runningansible-playbook
on my laptop and in the lab environment on a “desktop” with different hardware and hostname. The lab host, specifically, has nossh
daemon running so does not work at all if the connection type is not local. -
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
05 Jul 2022 Removing configuration with SaltStack
Until now I have been using SaltStack to apply configuration, although in some cases that means removing default settings. In my new home lab I have deployed systems by doing bare-metal restores from live-system backups. Predominantly due to hardware differences, there are some difficulties that require undoing configurations SaltStack applies to the live systems to correct. I think of this as “anti-configuration-management”.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
17 Jun 2022 Pushing Git changes from lab back upstream
In my air-gapped Lab I have been making some changes to my configuration management configuration that I now need to extract and push back upstream. Since my air-gapping is a defensive measure against accidentally interfering with my live network, rather than any concern about data security/privacy this is just a case of using a USB drive to export and then push the commits.
-
11 May 2022 Adding lab-specific configuration to SaltStack
After restoring the configuration management server I needed to start making some changes specific to the lab environment (initially the MAC addresses of the hosts for the DHCP server). I also want to give the lab a separate domain, like I did when testing Proxmox.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
-
13 Apr 2022 New core switch
In January I had a problem due to having filled my core network switch. Since then I have deployed a very old Cisco switch into my air-gapped home lab which is also less than ideal as I have very different networking hardware on my main network and the lab. To make it easier to do meaningful testing and solve the capacity problem I have bought a used TP-Link T1600G-52PS switch to replace my existing T1600G-28PS. This post is concerned with configuring the new switch to be the same as the old, then swapping it and the old one over.
-
02 Mar 2022 Moving Docker applications into air-gapped home lab
I was genuinely surprised how easy this was, provided your source and target systems are the same processor architecture.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
M72e
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Proxmox
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
21 May 2024 CephFS on Proxmox Virtual Environment
One of the things I did not setup in my new ProxmoxVE cluster was CephFS. To start with, I PXE booted my VMs into an installer but I wanted to experiment with trying to get Grub to chainload another distribution’s shim to load their kernel (spoiler alert: without success). The easiest way I thought to play with this was to boot from a Fedora install CD, whose Grub has tftp and http support, and try to chainload a Debian installer. In order to quickly do this, I wanted to attach an ISO to a new VM (as Fedora isn’t available via my PXE server and I thought this would be convenient for the future) which required setting up CephFS to store the ISO.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
-
21 Feb 2022 Creating first VM in Proxmox
This post documents my first Proxmox VE host installation, configuration and the building of a Windows Domain Controller VM within my new home lab environment.
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
-
15 Feb 2022 Setting up Cisco Catalyst Switch for home-lab
This post covers the first step in setting up my new home lab, configuring a Cisco switch for the new air-gapped environment which I will install Proxmox VE into later.
Mirrors
-
31 May 2023 Efficiently copying git changes across isolating network boundaries
In a previous post I described copy changes from my air-gapped home lab back upstream by copying the entire tar of the repository back and then pushing the changes. While this works and is fine for small repositories, it is highly inefficient for small changes to large repositories. I wrote the last post in full knowledge there would be a more efficient way, which this post documents. This is useful for other situations where there is some level of network isolation (but not necessarily a full air-gap), such as packing changes to move them via a jump host to another network, for pushing to a remote source.
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
-
16 Feb 2022 Setting up ReadyNAS Duo for home lab
I have an old ReadyNAS Duo 2120 (confusingly it says 2120v2 on the bottom, although it is RND2000v1 generation hardware) which I have turned into a webserver to provide a mirror service for my new air gapped home lab network. This is a precursor to setting up Proxmox VE, with both read-only package mirrors and ISO repository on the NAS. It is updated via a USB hard disk which I sync on my home network then physically move to the lab environment, mount read-only to update the mirrors from.
Ceph
-
21 May 2024 CephFS on Proxmox Virtual Environment
One of the things I did not setup in my new ProxmoxVE cluster was CephFS. To start with, I PXE booted my VMs into an installer but I wanted to experiment with trying to get Grub to chainload another distribution’s shim to load their kernel (spoiler alert: without success). The easiest way I thought to play with this was to boot from a Fedora install CD, whose Grub has tftp and http support, and try to chainload a Debian installer. In order to quickly do this, I wanted to attach an ISO to a new VM (as Fedora isn’t available via my PXE server and I thought this would be convenient for the future) which required setting up CephFS to store the ISO.
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
High availability
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
-
24 Feb 2022 Setting up Ceph on Proxmox
Following from setting up my first vm and turning it into a Proxmox cluster I wanted to setup Ceph as a decentralised and shared storage infrastructure which should allow more seamless migration of VMs between hosts.
-
22 Feb 2022 Turning my standalone Proxmox into a cluster
I installed 2 more Proxmox servers using the process I used to setup the first one and this post is my notes about adding them to the cluster. Note that I already created the cluster during the first node’s setup, although at the time is was a single-node “cluster”.
Chrony
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
25 Jun 2022 Time in an air-gapped lab network (and centralised time-syncing in an internet connected one)
In order to get time-syncronisation, to solve the annoyance of my TOTP based 2nd factor for sudo not working, I bought a cheap USB GPS dongle that uses the VK-172 chipset.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
Systemd timesyncd
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
23 Feb 2022 Replacing Cisco Catalyst 2970 switch with 3560
I originally deployed an old Cisco Catalyst 2970 switch in my new home lab environment however it was insufficient for my needs in a number of ways, such as no being able to act as NTP or DNS server and not supporting SSH for remote management. I also had a 3560, although the model I have has 48 ports (as opposed to the 24 on the 2970 I used) and is physically much longer (both being standard 1U 19” rack-mount height and width) which I why I initially tried the smaller, lower power, 2970.
Activation
-
01 Mar 2022 Fighting with Windows Product Activation
10 days after being installed, my “180 day evaluation” version of Windows Server 2019 has decided it is expired and will not activate. After trying unsuccessfully with both the telephone and their new web-based offline activation system (which you get the option to be text a time-limited link for through the phone system), I rang Microsoft’s support which resulted in being accused of pirating the software twice (according to them the entire “Microsoft Evaluation Center” section of Microsoft’s website does not exist) before being told that in order to use the 180 day trial I had to first buy a full licence (no, I cannot figure out how that is supposed to work either!).
Disaster recovery
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan. -
29 Jul 2022 Backing up large static files
In addition to my computer backups I have a large cache of static files on my NAS. Some of these files are very large, the files never change, are relatively rarely added to and are all retrievable from elsewhere (either by re-downloading from the internet or re-copying from a physical disk). Backing them up is more a convenience to avoid recreating the cache from scratch, rather than it being a catastrophe if they were lost, so I chose to create a single off-site copy on some external disks (3 of them, to accommodate all of the files at a sensible size/price point for the external drives) with
rsync
. This is rather than backing them up by adding more storage to the NAS to increase the size of the local backup volume to accommodate them, which would in turn necessitate buying larger off-site disks. -
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Bootstrapping a new network
As part of working on my new home lab I moved my old core switch, a TP-Link T1600G-28PS to replace the aged Cisco switches that I was using temporarily. Now I have the same make and generation of switch in the lab as my main network, I can start replicating my core network in the lab for testing and development. I am not sure I have ever bootstrapped a network (bearing in mind this lab is air-gapped) before - I have always started with some sort of router or other existing infrastructure (i.e. some form of DHCP server and DNS) I have migrated away from.
Bios
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
08 May 2022 Restoring configuration management system from DR backup
After restoring the router, the next step I needed to complete was to restore my configuration management server in order to start orchestrating the rest. On the live network this resides in a virtual machine on my HP Microserver. This means I need to restore the host and the VM to get this up and running.
-
06 May 2022 Restoring the router from DR backup
Following on from getting my DR “off-site” backup available to restore from, from scratch I restored the first machine from that backup, the router (to get DNS and DHCP up and running). After this, I can start deploying other bits.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
Power
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
Uefi
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
Updates
-
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
-
13 Jan 2023 Ansible to check update states
Post about adding tasks to Ansible to print information about the current state of updates across a (Debian) landscape. This is Debian specific as I do not have anything else in my production environment. On some level, this belongs in the monitoring tools (currently Icinga2 in my infrastructure) however when orchestrating infrastructure it can be handy to refer to from, and as a check that everything can be orchestrated by, the orchestration tool (Ansible, in this case). It was done to help work out the landscape during upgrading to Debian 11 (Bullseye)
-
19 Apr 2022 Updating Lenovo M72e Tiny PC BIOS
As I was preparing my new lab environment I found that my recently bought Lenovo M72e machines had a variety of different settings and BIOS levels, including alarm-based scheduled wake-ups so for consistency I wanted to update the BIOS on them and reset to known settings. This turned out to be very difficult, and I am far from alone in this opinion with forum quotes like “Lenovo has turned into a total mess. I miss IBM.” and “Probably my last Lenovo… never experienced such absurd bios issue with my other tiny pc, which is HP EliteDesk 800 G2 Mini”.
Ap7920
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
Console
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
Minicom
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
Pdu
-
28 Sep 2022 APC PDUs and DHCP
Just over 5 months since I bought them, and 2 months since my last blog post it appears, I have finally got around to configuring the APC AP7920 PDUs I reset in April.
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
Serial
-
25 Apr 2022 APC switched PDU console access
For my new home lab, I have bought a couple of used APC AP7920 switched PDUs. These are ideal for me as they take a 13-Amp C14 input (often known as a “kettle lead”, colloquially) and provide a maximum of 10A across 8 C13 output sockets.
Proxy
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
27 Jun 2024 Accessing GitHub through a proxy
When I clustered my HashiCorp Vault, I found that the cron-wrapper scrip that I have on GitHub would not download despite me adding it as a proxied URL to my proxy. This seemed to be due to the response exceeding the proxy buffer size.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable. -
23 May 2022 Authenticated proxy configuration with bash
Bash script which can be sourced to configure
http_proxy
,https_proxy
andno_proxy
environment variables (used by most internet-capable Linux applications) for a specific proxy. Prompts for domain (defaults to the local domain if machine is domain joined through realmd), username (defaults to local username) and password, although it then puts it into the environment variable so retrievable by anyone with access to the subsequent environment. As a superficial level of security, it exports anenv
bash function that wraps the usual command to redact the password.
Qr code
-
30 Jun 2022 Decode QR barcode
When confronted with a QR code and no idea what it contains (or to verify it contains what is claimed), one might want to decode it. This can be accomplished easily using ZBar bar code reader.
Blog
-
31 May 2023 New blog posts landing - update
I just published 33 new blog posts. Nothing more to say really, other then normal service will hopefully now resume. I have decided that I will adopt a new policy of dating posts when they are published, rather than when I start writing them…
-
07 Apr 2023 New blog posts landing
You may have noticed there appears to have been no posts since one on October 30th until one on 5th April. This is not because I have not written any, and a flurry (well, 8 including this one) of new posts have appeared in the last few days, beginning with that one on the 5th April. These are ones that I had “written” in my head but not yet committed to actual posts; the Bank Holiday in the UK, slight reprieve from day-job work in the evenings leading up to it, and my wife abandoning me to my own devices today has given me an opportunity to catch up. There also a further 28 posts in draft, which I have written over the last 6 months, that will hopefully land on the live blog soon. They have not yet been published because many of them link together, or cross-reference each other, in such a way that it will be difficult to publish individual ones until they are finished. Sorry about that.
-
21 Mar 2023 Stripping metadata from photographs for publication
In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header.
Faults
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
-
20 Jul 2022 UPS automated shutdown failure
Back in August I setup fully automated shutdown of my server and NAS on power failure and the night before last we had a 2 hour power outage during which these systems failed to shutdown until the UPS reached its critical low battery state.
-
06 Jul 2022 Fixing automated blog deployment
I noticed recently that my blog(not that you need a link, if you are reading it!) has stopped automatically updating when changes are merged into the main branch. On investigation I found that Gitea has stopped including the secret in the payload (which is very good, from a security point of view) and instead now hashes the payload along with the secret and puts that value in the
X-Gitea-Signature
header.
Debmirror
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Gentoo
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Portage
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
22 Jul 2022 Installing Gentoo on Lenovo M72e Tiny PC
It has been a very long time since I install Gentoo Linux on anything, so just noting in a blog post what I did. As always, the basic process is RTFM in the form of the Gentoo Handbook. In this post, I got as far as completing what I will call the “modern stage 1” (i.e. the process for rebuilding everything with an optimised toolchain, which used to be a “stage 1” install but became a “stage 3 with bootstrap.sh script” around 2010) but not configuring/building/installing the kernel and bootloader. Unfortunately I ran out of time to play with this and went back to Debian on the system, in order to get some other work done.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Reposync
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Rocky
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
07 Apr 2023 Fully automated reinstall of Rocky Linux with Ansible and Puppet
This post is about automating, end-to-end, reinstalling a booted Rocky Linux system. The automation is done using Ansible but Puppet is used to configure the hosts, so Ansible orchestrates Puppet too. This is closely related to my recent posts on kickstart graphical feedback (tentatively related to the Puppet piece) and generating custom install isos (for complete hands-off reinstalls). All of the systems involved are bound to a Microsoft Active Directory [AD], so common credentials can be used and the computer that is being reinstalled will need its computer object resetting to rebind automatically. The local ssh host key cache is also updated after the reinstall is finished too, do avoid “the host key has changed” warnings post re-install.
-
07 Apr 2023 Generating Rocky install media with embedded kickstarts using Ansible
This post documents an Ansible process for building custom Rocky Linux (but should work for an Red Hat Enterprise Linux compatible distribution) installation isos, set to automatically kickstart with optional embedded kickstart within the ISO image and host-specific kickstart generation.
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution. -
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Rpm
-
06 Jul 2022 Improving mirror sync
The number of things being mirrored since I initially setup my mirrors in the home-lab network has grown and the current bash script has become a bit cumbersome to maintain. This post describes the process of replacing the current script and then extending it to mirror more things, including Gentoo and Git repositories - something that took nearly 4 weeks (bearing in mind this is a hobby-project, fitting it in around work and home life). Strap in, this is going to be a long post….
Pip
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container. -
11 Jul 2022 Getting PIP working behind an SSL-breaking proxy
If you are behind a proxy that breaks SSL (basically it does a man-in-the-middle attack, hopefully with your consent, typically for deep inspection) you may need to tell
pip
to use the system certificate store (presuming that trusts the proxy’s certificate), rather than its embedded one, via thePIP_CERT
environment variable.
Freeradius
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
Radius
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
-
30 Sep 2022 New wireless setup
This post describes setting up client-specific wireless network keys (private pre-shared keys or “PPSKs”) and per-client VLAN settings on a single wireless SSID, using FreeRADIUS to provide the key and vlan information.
Ipxe
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
Isc dhcp server
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
Pxe
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
-
04 Oct 2022 Debian network install preseed
Back in 2020, I used the Debian installer’s pre-seed capability to automatically build KVM-based VMs. In my new lab network I have 10 systems that are headless, attached to managed PDUs (so can be remotely power cycled) but have no integrated console or KVM attached. Debian Installer has a network console feature, which allows remote installs over SSH. This post describes automating the setup of that so a network-booted host in the lab network will, by default, boot into the Debian Installer for the current stable distribution ready for me to remotely SSH in and complete the install.
Virtualbox
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
11 Oct 2022 Targeted PXE booting
Following on from my previous post on PXE booting Debian Installer with network-console (SSH access), I wanted to take this a stage further an fully automate deployments but in a very targeted way. My idea is that some hosts (e.g. Proxmox nodes) should reinstall and, ultimately, re-add themselves to the cluster automatically where as others should continue to just boot into the interactive Debian installer by default. Fortunately this is very easy to achieve with iPXE.
Find
-
12 Oct 2022 Find all files modified since a specific time
Quick post, using
find
to list all files modified since a particular timestamp (e.g. since the last backup) in a folder:
Fail2ban
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
19 Oct 2022 Freeing disk space
This post could be subtitled “down the rabbit hole”. I needed to reboot my router (kernel update) and, when I set about doing so, found that a backup job was still running 4 hours after it had started. Looking into why this was the case, I found the backups were taking on average 5 hours. Looking at the size of the backup it seemed a little on the large size for what the box does so I set about seeing whether this could be reduced which led to find some missing configurations…
Dban
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
-
20 Oct 2022 iPXE remote image fetching
I mentioned in my targeted PXE booting post that I might migrate from maintaining copies of the kernel and initial ramdisks on the tftp server to asking iPXE to fetch them directly. This has been brought to the fore after I updated the mirror in my home lab environment and the installer no longer starts due to not being able to load its kernel modules. When I fetched the image from the mirror and compared its checksum to the one in my configuration management system I saw it had changed.
Audio
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Cover art
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Flac
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Gimp
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Images
-
21 Mar 2023 Stripping metadata from photographs for publication
In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Imagemagick
-
21 Mar 2023 Stripping metadata from photographs for publication
In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Jpeg
-
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Nw a45
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Sony
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Tagging
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it. -
26 Oct 2022 Tagging FLAC music files
About a month ago I bought a Sony NW-A45 music player from eBay to replace my failed 160GB iPod Classic (2007) whose hard disk failed on 21 June 2018. My main reason for picking this replacement was its battery life - I struggled to find any portable music players on the market that come close to the 40hrs playtime of my iPod, despite 12 years of progress. I discovered that the reason some of my album artwork was not appearing on it was due to it not supporting progressive JPEG images so I had to re-tag the embedded cover art in a few of my FLAC files.
Macos
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container.
Pypi
-
27 Oct 2022 Mirroring pip packages
As I was trying to install a recent version of Ansible in my air-gapped home lab network I discovered that mirroring Python packages, e.g. from PyPi, is quite difficult despite pip’s download option. The
--platform
,--python-version
,--implementation
and--abi
options are supposed to allow downloading for another platform but finding the right combination of options was tricky - in particular thecryptography
package (which often causes me issues) would not download for Debian Bullseye on either Buster or macOS with any combinations I tried. In the end, I resorted to the approach I adopted for Gentoo, using a Docker container to download for the platform inside the container.
Abcde
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it.
Cd ripping
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it.
Cddb
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it.
Music
-
30 Oct 2022 CD transcoding
It has been a while since I transferred CDs to an audio player. As a result I have a number of CDs bought in the last few years that I need to copy to my recently purchased Sony NW-A45 music player. It seems that the tool I used 16 years ago, A Better CD Encoder or
abcde
, is still going strong so I stuck with it.
2fa
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
Authenticator
-
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
Bastion
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating. -
30 Oct 2022 Ansibleising iPXE configuration
This post ws going to be about migrating my iPXE configuration from being managed by SaltStack to Ansible. It was supposed to be the start of migrating all of my configuration management over to simplify bare-metal DR and managing test/development infrastructure without first deploying a master, or control, server. Starting with iPXE is motivated by needing to update the configuration following my lab experiment, moving it from duplicating the kernel and initial ramdisks on the tftp server to fetching them directly from a mirror. However, things turned out not to be so simple and I ended up restructuring the network and migrating some other configurations before getting back to iPXE.
Caring
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating.
Dia
-
01 Nov 2022 Adding a bastion host - restructuring the network
While trying to get started with Ansible I found Ansible really doesn’t like 2 factor sudo authentication. After trying, and failing, to write a new
become
plugin that merges the behaviour of thesudo
plugin (use sudo) andsu
plugin (recognise other password prompts) I decided to try a different approach. Instead, I decided to setup a bastion/jumphost that will require 2 factors to login to and then fewer (i.e. just a password, or two (different) passwords or a certificate and a password) to login and become root on my systems. The bastion can be used as an ssh proxy host and this method is documented by Ansible although, for 2 factor logins to the bastion, we will need to pre-login and configure connection multiplexing (referenced from another post on using a bastion with Ansible) to reuse the connection without re-authenticating.
Efi
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Firewalld
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
18 May 2024 Plex in a VM on ProxmoxVE
In order to create a VM with Ansible, I first need to create an API user for Ansible to be able to interact with ProxmoxVE. Once I have a VM, I will install Plex Media Server on it.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Grub
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Intel rst
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Keepass
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Logitech
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Tpm
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Windows 10
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Windows 11
-
03 Nov 2022 Upgrade TPM to 2.0 on Dell XPS 13 9370 and installing Windows 11 and Debian Linux
In order to install Windows 11, my laptop’s Trusted Platform Module firmware needs upgrading to support TPM 2.0. Dell provide a firmware update for some models, including mine. However installing it is complicated by Windows 10, which it is currently running, re-initialising the TPM on shutdown; breaking the firmware update process, which detects the TPM has data and aborts the update when it goes to apply it on next reboot.
Awesomewm
-
14 Nov 2022 AwesomeWM XDG Autostart
Out of the box AwesomeWM does not provide a mechanism for automatically starting applications when it starts. I have a small piece of code in my configuration file to do this however it is sub-optimal, not least because (despite using
awful.spawn.once
it relaunches all of the applications on restart. Instead I applied a snippet from Arch Linux’s Wiki’s page on AwesomeWM that autostarts applications using the XDG Autostart Specification. -
13 Nov 2022 See all available timezones with datetimectl
I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.
Desktop
-
13 Nov 2022 See all available timezones with datetimectl
I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.
Lua
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method. -
14 Nov 2022 AwesomeWM XDG Autostart
Out of the box AwesomeWM does not provide a mechanism for automatically starting applications when it starts. I have a small piece of code in my configuration file to do this however it is sub-optimal, not least because (despite using
awful.spawn.once
it relaunches all of the applications on restart. Instead I applied a snippet from Arch Linux’s Wiki’s page on AwesomeWM that autostarts applications using the XDG Autostart Specification. -
13 Nov 2022 See all available timezones with datetimectl
I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.
Timezone
-
13 Nov 2022 See all available timezones with datetimectl
I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.
Dictionary
-
14 Nov 2022 Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is
namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain.
Symlinks
-
14 Nov 2022 Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is
namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain.
Wordlist
-
14 Nov 2022 Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is
namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain.
Gitlab
-
16 Nov 2022 Adding mirrors to laptop (a.k.a. improving mirror sync 2.0)
As I put a new, very large, SSD in my laptop I decided it would be convenient (for playing with virtual machines etc.) to have a sub-set of my mirrors on there. This post explains how I took my latest mirroring scripts and made it flex to do this.
Arm
-
13 Dec 2022 Adding a bastion host - bootstrapping for Ansible and migrating security from SaltStack to Ansible
This post continues the chain of posts from trying to get started with Ansible for managing my own infrastructure in October and working around Ansible not playing nicely with 2 factor sudo authentication. It is one of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added around the 13th December 2022 - describing bootstrapping the monitoring server and migrating the first role from SaltStack to Ansible.
Hashicorp
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
12 Mar 2024 Update to per-host passwords with Ansible
I recently discovered that my previous configuration for per-host sudo passwords, where I set
ansible_become_pass
to a lookup based oninventory_hostname
, fails for delegated tasks. This is becauseinventory_hostname
remains set to the original host, not the delegated host where the command is run, so the wrong password is used. -
29 Feb 2024 HashiCorp Vault regenerating backup token
When I setup HashiCorp Vault, I setup backups for it. These use a token that, by default, expires after 32 days. A new one, therefore, needs to be generated periodically. I decided to write a playbook to automate this with Ansible.
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
Jinja
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
Vault
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
-
24 Jun 2024 Clustering Hashicorp Vault and SSL Ansible role improvements
Now I have the ability to unlock my Proxmox Virtual Environment (ProxmoxVE) hosts with a static LUKS unlock passphrase, I can move my existing single-node Hashicorp Vault install to be a cluster also on these hosts. This adds resilience to, what has become, a crucial piece of my infrastructure and moves it from the monitoring host in the same network segment as my desktop to the new “services” segment, improving security.
-
27 May 2024 ProvmoxVE USB passthrough and LUKS unlocking
This post started as an attempt to use a USB drive to unlock LUKS encrypted LVM containing, amongst others, the root filesystem. My idea was to be able to use a USB key to unlock the disks of my Proxmox Virtual Environment cluster, falling back to passphrase if the key was missing. This proved to be more complicated than anticipated, although solvable through the use of a custom script I worried about the fragility of this so I abandoned the idea.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
12 Mar 2024 Update to per-host passwords with Ansible
I recently discovered that my previous configuration for per-host sudo passwords, where I set
ansible_become_pass
to a lookup based oninventory_hostname
, fails for delegated tasks. This is becauseinventory_hostname
remains set to the original host, not the delegated host where the command is run, so the wrong password is used. -
29 Feb 2024 HashiCorp Vault regenerating backup token
When I setup HashiCorp Vault, I setup backups for it. These use a token that, by default, expires after 32 days. A new one, therefore, needs to be generated periodically. I decided to write a playbook to automate this with Ansible.
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
07 Dec 2023 Improving iPXE configuration
This post is about migrating my iPXE configuration from SaltStack to Ansible, combining a number of others. Most recently automated Debian install, which I had not realised touched on picking up on using Ansible to configure iPXE from 13 months ago. The configuration of iPXE using Ansible I last left off in March when I migrated my monitoring configuration to Ansible. This also relates to previous posts I made on targeted PXE booting and remote image fetching.
-
31 Aug 2023 Icinga2 check for Hashicorp Vault
When restarted, Hasicorp Vault starts “sealed” and has to be unsealed to make the contents accessible. I have, on occasion, forgotten to do this (usually after a reboot for kernel update) and so I want to add checks for this situation to my monitoring. My current monitoring solution is Icinga, so I am creating a check for this.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
-
01 Jan 2023 Adding a bastion host - migrating monitoring client roles to Ansible
This post is the fourth in the chain of posts starting with trying to get started with Ansible for managing my own infrastructure in October, heading down a rabbit-hole by trying to work around Ansible not playing nicely with 2 factor sudo authentication. It is the last in a series of three posts that I split out from the second in the series on the 2nd January 2023 and is the blog content I added yesterday explaining taking the monitoring role from SaltStack to Ansible.
Amavis
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
Databases
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
Postgresql
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
Uwsgi
-
15 Jan 2023 Problems upgrading from Debian Buster (10) to Bullseye (11)
During the last few days I have been upgrading all of my Debian systems from 10 (Buster) to 11 (Bullseye). In contrast to my many previous upgrades, this went less than smoothly (some of which was down to me rushing) and I encountered a few issues - this post serves just as a note of all of the issues and their resolution. My earlier post on checking Debian update readiness with Ansible is also related to this set of upgrades.
Apt mirror
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Cron
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Hcl
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Json
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Rfc8555
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Tcpdump
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Yaml
-
23 Jan 2023 Adding a bastion host - deploying HashiCorp Vault
Welcome to the fifth post in the rabbit-hole I disappeared down, trying to add a bastion host to my network for Ansible after trying to get started with Ansible for managing iPXE configuration in October. This post is about deploying HashiCorp Vault for secret management, beginning with the PKI certificates for Icinga monitoring.
Chocolatey
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
Intel nuc
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
Microsoft office
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
Oki mc363 dn
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
Registry
-
27 Jan 2023 Managing Windows with Ansible
I have played with using SaltStack to manage Windows but did not follow through with using it properly. I recently installed a NUC10i7FNH and decided to revisit managing Windows, this time with Ansible, rather than doing most things on Windows manually.
Btrfs
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan.
Lvm
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
-
31 Jan 2023 ReadyNas disaster recovery
Last night my ReadyNas suddenly went read-only with the ominous sounding log message
Jan 30, 2023 16:54:47 Volume: The volume data encountered an error and was made read-only. It is recommended to backup your data.
- it looks like it ran out of RAM which ultimately caused BTRFS corruption. Despite 3 hours of attempting to recover, I was unable to repair the underlying BTRFS filesystem, so decided the only option was to reset the NAS (which would recreate the filesystem) and execute the disaster recovery (DR) plan.
Raid
-
12 Feb 2023 Moving backup data off NAS
Following on from my NAS disaster recovery post, I decided to fork out for some new hard disks and move the volume I backup to from the NAS to being internal to the server doing the backups. I had been considering this for performance reasons but as the NAS is also backed up, it would have aided recovery to not have to fetch the off-site backups. The flip-side of this option is that it means if the server fails I lose access to the backups - so either way I have a single point of failure.
Apache
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
Icingaweb
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
Lighttpd
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
Php
-
05 Apr 2023 NextCloud version tracking
Back in 2021, I added a check for the latest NextCloud version to Icinga based on a forum post from 2019 that suggested scraping the version from a file their GitHub website repository. Today I was looking at something on Icinga and it occurred to me I have not installed any NextCloud updates for a while, a quick check and I determined that the latest version in that file stalled at
23.0.3
(released 21 March 2022, now unsupported and not the last of the23.x
line -23.0.12
is the last) and I am now 3 major versions behind - the current release is26.0.0
on 21 March 2023. -
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
Php fpm
-
12 Mar 2023 Adding a bastion host - finishing monitoring migration to Ansible
About a month and half after setting up a proper secrets store with HashiCorp Vault I am able to pick up, crossing off a number of roles migrated from SaltStack in the process. This is with no secrets stored in the code, unlike my Salt configuration which had secrets in the pillar data. With the infrastructure setup and linked to Ansible, I am able to continue with finishing this migration task.
Accessibility
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Dog friendly
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Dogs
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Eating out
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Food
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Pub
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Restaurant
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Review
-
18 Mar 2023 Restaurant review - The Spread, Hereford
This is a a review I left for The Spread in Hereford on Facebook. I’ve become a little nervous about the longevity of my social media posts, as I contemplate closing my Twitter account, so I decided to reproduce it here. Who knows, maybe it’s the start of me writing more reviews on my blog? I have expanded it slightly to be more of a “blog-first” critical review, than a quick “had a great time, would come back” Facebook one.
Privacy
-
21 Mar 2023 Stripping metadata from photographs for publication
In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.
Software
-
21 Mar 2023 Stripping metadata from photographs for publication
In preparation for publishing my post about setting up a USB RAID box I wanted to strip the metadata (mainly GPS location) from the photos I took while setting it up, before publishing them publicly on this blog. Fortunately ImageMagick makes this easy.
Hp elitedesk 800 g2
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
23 Mar 2023 HP EliteDesk 800 G2 EFI update
To replicate the Proxmox cluster I am (very slowly) building in my home lab, I have bought a set of 5 HP EliteDesk 800 G2 mini systems. They will be replacing my HP MicroServer and this post documents updating the UEFI firmware to version 2.60 on them.
Xrandr
-
28 Mar 2023 Add missing mode to xrandr
I tried to resize my display and discovered the mode I wanted was not available. Interestingly, the current mode was also not listed but that is a separate issue. Adding a new mode is not as straight-forward as I had hoped, so it is worth making a note (this post) of how to do it.
Social media
-
30 Mar 2023 Goodbye Twitter
Just a note to say I pushed the red button and disabled my Twitter account today. In 30 days it will be deleted forever, according to the message. The final straw turned out to be the change to only allowing paying users will be able to partake in polls and shown to non-followers in feeds.
-
30 Mar 2023 Goodbye Twitter
Just a note to say I pushed the red button and disabled my Twitter account today. In 30 days it will be deleted forever, according to the message. The final straw turned out to be the change to only allowing paying users will be able to partake in polls and shown to non-followers in feeds.
Firmware
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
17 Oct 2023 Resetting firmware passwords on HP EliteDesk 800 G4
According to HP it is not possible to reset an unknown firmware password and “a system board replacement is required, and additional customer costs apply”. However, according to a YouTube video there is process that works and having tested it I can confirm it does.
-
03 Apr 2023 Updating firmware on APC AP7920 PDUs
This post is about updating the firmware on my 3 APC AP7920 PDUs, which I bought last year in support of my home lab.
Hyper v
-
07 Apr 2023 Hyper-V and Linux (secure boot fail)
I discovered, when I attempted to create my first Linux VM, Hyper-V not only has secure boot enabled (which is a good thing), it is set to only allow Microsoft Windows to boot (which is nasty). To restore standard secure boot behaviour, which permits any binary signed by the Microsoft UEFI CA to boot, the “Template” must be changed to
Microsoft UEFI Certificate Authority
(from the defaultMicrosoft Windows
). Once this is done, suitably signed (by Microsoft’s chain of trust) bootloaders will start. -
06 Apr 2023 Adding Hyper-V to Windows 11 Pro with Ansible
VirtualBox (my preferred desktop virtualisation tool) and Hyper-V conflict, but Hyper-V is required for some software and features to work correctly on Windows 11. In particular the wonderful Windows Subsystem for Linux (WSL) version 2 (and I specifically mean “WSL2” is wonderful, the original WSL wasn’t great) uses a Hyper-V VM. Following on from my post on managing Windows with Ansible and customising the taskbar and startup programs with Ansible, I will be Ansibleising installing Hyper-V (and as such, this will be a short post - Ansible makes things like this really easy).
Zenity
-
06 Apr 2023 Graphical progress feedback for Red Hat and Rocky kickstart post-scripts
This post is about something I created and am genuine quite proud of. It creates a graphical progress bar to feedback on the progress of the
%post
section(s) in a kickstart installation script. I have used it with Red Hat and Rocky Linux distributions. It is an alternative to forcing a text install just to be able to programmaticallychvt
to the log in order to display custom script progress. It might seem simple but it took a lot of work and testing to get to a reliable solution.
Secure boot
-
07 Apr 2023 Hyper-V and Linux (secure boot fail)
I discovered, when I attempted to create my first Linux VM, Hyper-V not only has secure boot enabled (which is a good thing), it is set to only allow Microsoft Windows to boot (which is nasty). To restore standard secure boot behaviour, which permits any binary signed by the Microsoft UEFI CA to boot, the “Template” must be changed to
Microsoft UEFI Certificate Authority
(from the defaultMicrosoft Windows
). Once this is done, suitably signed (by Microsoft’s chain of trust) bootloaders will start.
Lsb
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method.
Podman
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method.
Scientific linux
-
14 Apr 2023 Distribution detection in Bash
In order to write some portable health-checking scripts, I needed to reliably detect both distribution (or at least distribution family) and version (e.g. to cope with
rpm
moving from/bin
to/usr/bin
in Red Hat 7). I based this on my previous Lua distribution detection script for Lmod. In contrast to the Lmod script, I am not interested in any CPU/architecture detection (at present). I only need this for Red Hat Enterprise Linux family (including CentOS, Scientific Linux and Rocky), Ubuntu and Debian distributions. Adding others would be trivial, it is just a case of finding theirlsb_release
return values and an appropriate fallback (file) method.
Nagios
-
16 Apr 2023 Linux healthcheck script
On my systems at home I use Icinga2 to monitor health, adding new checks as and when I identify something I think needs checking or if a failure occurs that was not detected. Sometimes it is necessary to do some checks via other means, such as SLURM’s healthcheck program so it can be useful to have checks in script form. On previous systems, we have used the Nagios plugins that Icinga uses to minimise the maintenance overhead of have duplicated tests. The script will be written in bash and minimise dependencies on non-Coreutils files to try and keep it portable to different distributions.
Draytek
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
Fttc
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
Vdsl
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
Vigor 130
-
05 May 2023 Setting up DrayTek Vigor 130 for Sky FTTC (VDSL) broadband
This post begins with a rant about Virgin Media ignoring their own contract and cutting us off 17 days before they told us our services would end (just 13 days after we gave the contractual “30 days notice” to leave). It follows with setting up a DrayTek Vigor 130 VDSL2/ADSL modem with a Linux router for Sky’s fibre-to-the-cabinet (FTTC) broadband service.
Ncsc
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
System administration
-
22 Aug 2023 Security anti-patterns and browsing down
While browsing for some information on browsing down, I found some useful resources from the National Cyber Security Centre; a whitepaper on Security Architecture Anti-Patterns, guidance on secure system administration and a blog post on protecting management interfaces (which focuses on browsing down).
Bind
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
Chef
-
22 Aug 2023 Automated Debian install
This is another of those posts that I started and some time (measured in months) later I split up due to not having completed what I set out to do. My overall goal is to have a fully automated install that results in a system with disk encryption setup up but can be remotely unlocked and managed. The intention is that, in most circumstances, any of my systems could be reinstalled headlessly (that is, without plugging in a keyboard or monitor).
Kubernetes
-
07 Sep 2023 Kubernetes basics online course
A little while ago I received an invite to attend an online workshop on SUSE’s Rancher product](https://www.rancher.com/products/rancher) at their “Rancher Academy”. Through that I discovered their Kubernetes Basics on demand course which I found gave a good introduction to Kubernetes at the level I needed - covering at a high-level what the various bits of it does before diving into how to make it do stuff.
Online courses
-
07 Sep 2023 Kubernetes basics online course
A little while ago I received an invite to attend an online workshop on SUSE’s Rancher product](https://www.rancher.com/products/rancher) at their “Rancher Academy”. Through that I discovered their Kubernetes Basics on demand course which I found gave a good introduction to Kubernetes at the level I needed - covering at a high-level what the various bits of it does before diving into how to make it do stuff.
Suse
-
07 Sep 2023 Kubernetes basics online course
A little while ago I received an invite to attend an online workshop on SUSE’s Rancher product](https://www.rancher.com/products/rancher) at their “Rancher Academy”. Through that I discovered their Kubernetes Basics on demand course which I found gave a good introduction to Kubernetes at the level I needed - covering at a high-level what the various bits of it does before diving into how to make it do stuff.
Training
-
07 Sep 2023 Kubernetes basics online course
A little while ago I received an invite to attend an online workshop on SUSE’s Rancher product](https://www.rancher.com/products/rancher) at their “Rancher Academy”. Through that I discovered their Kubernetes Basics on demand course which I found gave a good introduction to Kubernetes at the level I needed - covering at a high-level what the various bits of it does before diving into how to make it do stuff.
Internet of things
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
Solar
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
Solis
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
-
26 Sep 2023 Adding Solar VLAN
We are getting solar panels installed and the system comes with an inverter that uses a WiFi module to connect to a cloud service. Having looked into published information online, I have concluded that the WiFi module is going nowhere near anything else on my network so I am creating a separate VLAN for it.
Hp elitedesk 800 g4
-
17 Oct 2023 Resetting firmware passwords on HP EliteDesk 800 G4
According to HP it is not possible to reset an unknown firmware password and “a system board replacement is required, and additional customer costs apply”. However, according to a YouTube video there is process that works and having tested it I can confirm it does.
Glow green
-
17 Oct 2023 Solar inverter wireless dongle install
We had out new solar panels installed today, They were supplied by a company by Glow Green, although the install itself was handled by a subcontractor. I would recommend them, the experience I had was very smooth. I previously setup the network for the inverter’s data logging module but inevitably there were a few issues which this post is about.
Cis benchmark
-
24 Oct 2023 Running CIS Benchmark Assessor on servers with Ansible
I have recently been using the CIS Benchmark Assessor tool to validate the compliance of systems with the CIS Benchmarks. What I am looking at is ensuring compliance doesn’t get worse - 100% compliance would render the systems unusable so a balance is required. As a first step to automating compliance monitoring, I have automated the running of the tool and gathering reports using Ansible.
Cfengine
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
Networking
-
15 May 2024 SSL and clustering live Proxmox Virtual Environment
This follows on from my post building the cluster hosts to standalone Proxmox Virtual Environment servers and covers SSL certificates and clustering them. I last clustered Proxmox Virtual Environment in my air-gapped lab back in 2022.
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
-
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment). -
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
-
29 Dec 2023 Using Ansible to find IP addresses for DHCP clients
This post follows on from automating Debian install, picking up doing the post-install configuration from the point of having a (generic) baseline OS installed. I am using Ansible to do the post-installation configuration but any other configuration management tool could be used and I have personally used SaltStack, Puppet and cfengine to implement this approach (simple, minimal OS install handing off to configuration management tool to do host-specific customisation post-install) with a variety of Linux distributions. Reasons I like this approach include that all host-specific configuration and data is in one location, creating clarity about whether a setting or configuration comes from the install script (e.g. kickstart/preseed) or configuration management tool (or both), and all customisations being applied by the configuration management tool means those remain correct (and corrected by the tool if they deviate) throughout the lifetime of the system.
Dropbear
-
26 Mar 2024 Turning unlock crypt Ansible playbook into a role
I previously created a playbook to remotely unlock my encrypted root paritions, which works well but as a playbook it can only be run directly or utilised via
ansible.builtin.import_playbook
. To make it more flexible, for example to allow it to be used as part of a reboot cycle inside another role, I decided to make it a role. -
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
Initramfs
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
Rfc2131
-
12 Jan 2024 Orchestrating Debian install and automated post-install configuration with Ansible
In the exciting* conclusion of the process of using Ansible to find dynamic client IPs and solving the PXE/iPXE/Debian installer/dropbear/OS identity crisis, I use this work to automate the post-install configuration of systems installed using my generic Debian install preseed. In this post I will be going through the install Ansible playbook (including some tweaks to the Debian installer preseed file), post-install configuration (bootstrap) playbook, remote unlocking playbook and reinstall playbook.
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
Standards compliance
-
03 Jan 2024 DHCP, IP addresses, client IDs and an identity crisis
Following on from my post on looking up DHCP client IP addresses with Ansible, I had intermittent problems with hosts changing IP, which I initially observed if the OS was uncleanly shutdown. The root cause (discussed below) is that the Debian installer, the DHCP client used by initramfs for dropbear and OS DHCP client are not all using the same client id. In the situation I first saw this, I suspected that on a clean shutdown the OS’s DHCP client issues a release on the IP so it is available (and with very low IP churn in my development environments it happened to be issued again when it came back up) however on an unclean shutdown there was still a valid lease to the OS’s client id resulting in dropbear getting a different IP but post-unlock the OS (using the same client-id as the unreleased lease) recovered the “old” IP lease. I confirmed this hypothesis with empirical testing. In this post, I discuss why this is happening and use Ansible to dynamically configure the DHCP server to workaround the problem.
Pam
-
13 Jan 2024 Disabling and re-renabling TOTP for sudo with Ansible
I previously described how I configured TOTP using Google’s PAM module as a second factor for sudo. As I have been working with Ansible, which can use
sudo
throughout the execution of a playbook taking longer than the TOTP is valid for this can be a problem. While I am still developing my new setup, I have found it necessary to disable and re-enable the TOTP (falling back to the default of using the user account password forsudo
), and have made two short playbooks that remove and re-add the configuration described in my previous post from 2019.
Dt92e
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Evohome
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Hr92
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Honeywell
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Rants
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Youtube
-
13 Jan 2024 Binding Honeywell DT92E wireless thermostat to EvoHome controller
Since January 2018 we have had a Honeywell EvoHome heating system which includes HR92 smart radiator valves. These valves control the water flow to the radiators and sense the room temperature, turning each room into its own heating zone. In two rooms this has been less than satisfactory - one has two radiators (its not clear how the system reconciles this but the net effect is that it is often too cold) and the other has a radiator largely concealed behind a unit. As someone put it online, the HR92 valves are “very good at sensing the temperature next to a hot radiator”. To improve this, I have added two DT92E wireless thermostats in the rooms where we were not happy with the temperature.
Dnssec
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future.
Privoxy
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future.
Squid
-
04 Apr 2024 Mirror proxy for limited access networks
In my new network design, I crate a new VLAN that, for security, I did not want to provide a default route to, or routed access to anything outside my network. However the new VM hosts within still need to be able to get their packages and updates. So, I want to provide limited internet access via a very restrictive “whitelist” proxy with strict rules on what can be accessed (initially just
deb.debian.org
). I may even make this an authenticating proxy, in the future.
Kea
-
07 Apr 2024 Migrate DHCP server configuration from Salt to Ansible
One of the big bits I have not yet migrated from SaltStack to Ansible is my router, including DHCP and DNS. The management subnet was not configured to allow PXE booting, so I decided this was the right opportunity to make a start on that migration to Ansible. I did this by expanding my existing DHCP role with additional tasks.
Hosts
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides. -
14 Apr 2024 Managing hosts with Ansible
Ansible does not seem to have any built-in modules for managing hosts files, unlike SaltStack which has such a module out of the box. Fortunately the file is a plain text, line orientated, format and so easily managed by
ansible.builtin.lineinfile
. My need to manage this file came to the fore while I was building my live Proxmox virtual environment cluster which requires the local hostname resolves to its real IP via/etc/hosts
and I decided to add entries for all Proxmox virtual environment hosts so that they are not dependent on DNS (which allows DNS to be virtualised within the virtualisation environment).
Nftables
-
19 Apr 2024 Building live Proxmox Virtual Environment cluster
Now I have automated installing Debian I can finally setup the HP EliteDesk 800 G2 systems I bought back in March last year. The systems came with 8GB of RAM fitted but I upgraded them all to 32GB as I knew I wanted to run a number of virtual machines on each. These systems have 4 core/4 thread i5-6500T 2.5GHz processors.
Cephfs
-
21 May 2024 CephFS on Proxmox Virtual Environment
One of the things I did not setup in my new ProxmoxVE cluster was CephFS. To start with, I PXE booted my VMs into an installer but I wanted to experiment with trying to get Grub to chainload another distribution’s shim to load their kernel (spoiler alert: without success). The easiest way I thought to play with this was to boot from a Fedora install CD, whose Grub has tftp and http support, and try to chainload a Debian installer. In order to quickly do this, I wanted to attach an ISO to a new VM (as Fedora isn’t available via my PXE server and I thought this would be convenient for the future) which required setting up CephFS to store the ISO.
Fedora
-
21 May 2024 CephFS on Proxmox Virtual Environment
One of the things I did not setup in my new ProxmoxVE cluster was CephFS. To start with, I PXE booted my VMs into an installer but I wanted to experiment with trying to get Grub to chainload another distribution’s shim to load their kernel (spoiler alert: without success). The easiest way I thought to play with this was to boot from a Fedora install CD, whose Grub has tftp and http support, and try to chainload a Debian installer. In order to quickly do this, I wanted to attach an ISO to a new VM (as Fedora isn’t available via my PXE server and I thought this would be convenient for the future) which required setting up CephFS to store the ISO.
Cifs
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
Dot files
-
04 Aug 2024 Adding a bastion host - migrating additional roles to ansible
Having thought I had finished migrating my monitoring server configuration to Ansible, however when I came to start the next step of setting up the bastion I noticed I had neglected to consider the existing 2 factor configuration. Which is rather shocking considering Ansible not playing nicely with it is the motivation for this work…
Ansible galaxy
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides.
Gpl
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides.
Revision control
-
30 Aug 2024 Migrating Ansible role to self-contained repository
I have been working on deploying some VMs in a development environment at work, which I wanted to configure with Ansible and as part of that I needed to manage the
hosts
file. Fortunately I already have an Ansible role for doing that that I wrote in April so, rather than email (or get some other way) the code to myself, I decided to publish it on GitHub and install the role from there both sides.
Bsd
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
Jump host
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
Openbsd
-
15 Sep 2024 Adding a bastion host - setting up the bastion
After finally breaking through the barrier of migrating sufficient of my SaltStack managed configuration to Ansible, I can build my first bastion host. My thinking has moved on slightly from my original design but, for now, I am going to try and focus this post on just building the bastion and leave discussing the network design for another post.
Adhd
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Disability
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Health
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Neurodiversity
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Neurotypical
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Ocd
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Ptsd
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
School
-
20 Sep 2024 ADHD - Take 2 - Part 1 - Welcome to the ADHDer family
If you have a shorter attention span, or just want the highlights, I’ve provided a TL;DR version at bottom - just click here. It won’t hurt to read that first then look at the long bit, if you want the filler, either.
Dates
-
04 Oct 2024 Negative times in Excel
For reasons I won’t go into, I use an Excel spreadsheet to track my time at work and transcribe it once a week to our hours recording system. Recently I modified it to include how many hours I had left allocated for this week to each project I was resourced to work on. When I “spent” more hours than allocated, this turned into a series of hash (
#
) marks - fortunately there was a simple way to have it display negative times instead.
Adhd australia
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…
Adhd uk
-
05 Oct 2024 3rd Annual Global ADHD Conference
Being very recently diagnosed with ADHD, I took the afternoon off work to attend the free (although I did make a donation towards the running costs as someone in the fortunate position to do so) 3rd Annual Global ADHD Conference jointly organised between ADHD UK and ADHD Australia the day before last. I was only able to attend that afternoon but it was very interesting and I took away some useful things (which I am noting here, mainly for my own benefit and to organise/consolidate the various post-its I scribbled things on during the talks) from two sessions in particular…