January 10, 2023

Yak Shaving

The Kubernetes project is not looking at all like a Kubernetes project right now. I have been taking detours with everything else. I keep telling myself it has all been for the greater cause and that’s why I believe it.

It turns out it takes some time if you start setting up a development environment from scratch when you want it the same way on three different operating systems and all automated. So, that’s what I bagged as a confirmed thing late last night.

Ansible

I am using Ansible to build my development environment. Here’s the rough setup I have:

  • An OS X laptop. For this project, I run it mostly to run iTerm2 as a terminal for an SSH session to my devbox.
  • A Windows laptop. For this project, I run Terminal as a terminal for an SSH session to my devbox.
  • A Proxmox VE hypervisor running my devbox.
  • The devbox itself.

Despite the laptops being extras for this project, I still want the Powerline fonts to work and to be able to do local editing with the same Neovim configuration as always. So, they are targets for my Ansible inventory as well and it is quite the trick to have OS X, Windows 11, Debian and Ubuntu install enough packages to compile a fuzzy finder using make or mingw32-make and install all the dependencies.

Also, since I am running Ansible on the devices with screens as well, I decided to also install Neovide for a standalone GUI experience of Neovim.

Devbox of the week

Yesterday, I rebuilt my Proxmox templates for Ubuntu and Debian with the Qemu agent installed and it appears that now Ansible can pick one up by name from the inventory and run a playbook.

After setting one of those up from my “devbox to create other devboxes”, I pushed my remaining changes to a branch on git and moved on to the next devbox. I also set up some logistics for credentials so that encrypted stuff can stay encrypted and I can move through my network easily. That’s almost a success. There are still a couple of problems:

Caveat DNS

A newly created devbox will possibly get a zeroconf name ubuntu or debian from my router. If there is another one by that name, it will not. I will need to get some stable names. Also, calling home from a VPN does not see those names.

Caveat Proxmox LXC

It would be practical to run my text editor and git from a container than a full-blown virtualized computer with quadruple specs. However, Proxmox is unable to detect container IPs automatically. I can inject them by name into the Ansible inventory, only to have the setting overridden by the proxmox inventory plugin.

Also, the templates provided by Proxmox are a bit stale, so an apt dist-upgrade was a necessary first step to get Ansible rolling nicely.

But I can adopt such a container as my devbox… it just isn’t nice.

Testmart HDMI KVM

On paper, the Tesmart HDMI KVM is ticking all the boxes. It is controlled from a LAN port, it has 16 ports, sits in a rack and is supported by PiKVM. However, according to PiKVM it requires a Windows application for remote control and does not respond to DHCP. Since PiKVM supports it, the real problem was most likely going to be changing the IP to a range on my home network instead of the global default of 192.168.1.10. There is a three pin RS232 port too, if I brick it, but I go with LAN.

Also, the KVM beeps very loud by default and there is a bright blue 8 segment display illuminating the darkness. Totally unnecessary.

I found a shell script on Github by the name tesmart.sh that “works” for my needs. There were a few issues. First, it needed 2 lines of sed to start working on OS X:

  • sed -e 's/realpath/readlink -f --/ to use a command that exists
  • sed -e 's/cat -vE/cat -v/g to not use a parameter that doesn’t exist

After this, it was apparent that there device didn’t respond anything to the ncat queries the script sent, but all the writes went through. So:

# Mute the mindnumbing BEEEPS
./tesmart.sh m

# Set the led display to timeout
./tesmart.sh l 10

# Set network stuff
./tesmart.sh set-ip <ip>
./tesmart.sh set-netmask <mask>
./tesmart.sh set-gateway <gw>

Then double-check the numbers before powering off to apply.

Fonts

I paid some real money for a font called Comic Code that looks better than it sounds. However, the world of today expects fonts to have all kinds of glyphs for Github, Apple, branch, telephone and some ornaments as well. Humans have been like this since the rise of Egypt.

These glyphs are Open Source and apparently there is a way to patch them into existing fonts. It is pretty easy if you have docker.

docker run -v $(pwd):/in -v $(pwd)/out:/out nerdfonts/patcher -w -c -s

Installing them on OS X requires sudo cp *.otf /Library/Fonts which is easy to do in Ansible and Windows apparently requires a 108-line Powershell script. The latter I didn’t automate yet. However, with all the cruft in the script I used removed, I believe it to be entirely possible.

Next steps

Now I am ready to start working on customized RPi images on a devbox or alternatively hook up my networking gear and wiring to star the cube.

© Ferrix Hovi 2023