RSSAmplifier

Blog

The Technical Blog of James on purpleidea.com

Recent content in The Technical Blog of James on purpleidea.com

purpleidea.comRSS feed ↗210 posts

Latest posts

My perspectives on AI/LLMs

There’s a lot of talk about “AI” and “LLMs” recently. Here are my thoughts, experiences, and perspectives about all that. There seems to be a growing rift in the software industry about these tools. I’m publishing this post to make my opinions as clear as possible. Of note, I’ve provided specific git commit examples of some interesting results I’ve…

The switch as an ordinary GNU/Linux server

In 2014 I wrote an article about the switch as an ordinary GNU/Linux server. This had been my dream since my early days using Linux to build routers and I didn’t know why we didn’t use the same management interfaces on switches as we did on Linux. The folks at Cumulus Networks made this a reality and in 2014 they were kind enough to give me access to some hardware to test things out.

10 years of mgmt

I publicly released mgmt to the internet 10 years ago. I can’t believe it’s been 10 years. In this post I’ll talk about: The new mgmt company A one-time new customer offer Unexpected wins Past failures Some history A new release And more… The company : I’ve officially started a company. I’ve been working on this for some time now, and it’s time to let you…

Better git status

I’ve been using git status for quite a long time now. Let’s make it better. My old aliases : My ~/.gitconfig has had: [alias] s = status d = diff l = log --show-signature for as long as I can remember. They’ve served me well. The problem : In one of my projects , I occasionally have a bunch of untracked files, particularly when I’m hacking on something new that isn’t…

Running etcd over SSH

Want to tunnel etcd traffic over SSH? Here’s a pitfall I ran into. The problem : Mgmt supports tunnelling the etcd traffic over SSH. This is quite useful, because it means that for it to connect to etcd, it doesn’t need to open up any new ports other than 22 . You can run the agent like so: mgmt run --ssh-url = etcd@etcdserver:22 --seeds = http://127.0.0.1:2379 --no-server --no-magic…

Working around an iPXE issue

iPXE is a terrific tool, but despite their very respectable documentation, it has some rough edges, and it still feels like an “in crowd” kind of thing, where you have to learn the common tricks by knowing someone. The problem : I’ve been building a provisioning tool in mgmt and instead of always relying on distro-specific boot images, I decided to use iPXE to handle the early…

Modules and imports in mgmt

Mgmt modules are used for structuring your code across multiple files. This keeps things readable and allows for code reusability. For example, it should be easy to write a single module which can be effectively used by many different parties. To me, it never felt like code reuse was a core design objective with other tools. In mgmt it has been since the very beginning. I’m very proud of our…

Mgmt Configuration Language: Functions

It’s been a little while since I introduced the Mgmt Configuration Language . I originally wrote this article in 2019, and as I was working on it alongside the code for functions, when I realized that lambdas didn’t work properly. It took some time to finally solve that properly. Since then I’ve been working to get mgmt production ready. It’s properly useful for production…

Better dmesg in five minutes

I last wrote about dmesg in 2016 . It has mostly not changed since then, but I’ve changed my setup slightly. Here’s a short article about what I did so that you can do it too, and so that I can remember for the next time. Previously : Previous I had a bash alias which looked like this: alias dmesg='dmesg --follow || dmesg' since some machines didn’t yet support the --follow flag.

A new provisioning tool built with mgmt

Today I’m announcing a new type of provisioning tool. This is both the culmination of a long road, and the start of a new era. Please read on for all of the details. Feel free to skip to the relevant sections you’re interested in if you don’t want all of the background. Ten years : The vision for this specific tool started around ten years ago. Previously, as a sysadmin, I spent…

Bash $PATH filtering

As most modern GNU+Linux distro users already know, you get a lot of tools included for free! Many of these may clutter up your $PATH and make bash tab completion more difficult than it has to be. Here&rsquo;s a way to improve this! A mess : Here&rsquo;s what I see when I tab-complete cd<TAB> : james@computer:~$ cd cd cddb_query cd-info cd-read cd-convert cd-drive cd-it8 cdrecord cd-create-profile…

Upcoming Speaking and Events

There are three upcoming mgmtconfig events happening within the next seven days! mgmt @ FOSDEM : On February 3rd, I&rsquo;ll be giving a talk in the golang devroom at FOSDEM . Please come early (1hr+) if you want to get a seat, usually this room is especially full. This happens in Brussels, but it should be recorded if there aren&rsquo;t any technical glitches. (I got rejected for the main track,…

Git branch filtering

If you have more than one git branch up in the air at the same time, having a system to track them and filter them is essential. Here are the stages I went through with git branch . xkcd reminds us that we're insane Prefixes : My first tip involves using a memorable prefix. For new features I name my branches with feat/ . For example feat/my-new-feature . Yes the slash and the dashes are treated…

Five minute hacks: Swapping left and right headphone audio in wireplumber

I&rsquo;m on Fedora 37 at the moment. My headphone audio is backwards. How do we fix it? I&rsquo;ve apparently never found the right magic until now. The Setup : I have a crappy &ldquo;couch computer&rdquo;. It&rsquo;s used for casual internet browsing and video watching. It has an analog audio out which goes to my speakers. I&rsquo;d like to use headphones for when I don&rsquo;t want to annoy my…

One minute hacks: Saving time inserting images in Libreoffice

You&rsquo;ve probably used libreoffice. You opened a document, and proceeded to insert an image into the text. It wiggles all over and never rests where you want it to. The solution : You most likely want the &ldquo;anchor as character&rdquo; option. Right-click on the newly inserted image, go to the Anchor menu item, and choose As Character . You will have to do this for each image you insert…

UEFI booting, and with a new kernel module

Picture this. You&rsquo;ve got a supermicro server. It&rsquo;s got eight hot-swappable 3.5" HDD&rsquo;s. You want to use all of those for storage, so you buy a nifty add-on that let&rsquo;s you add four additional 2.5" SSD&rsquo;s. Those are great for your OS. That&rsquo;s a great way to keep your data separate. The motherboard only supports eight drives, so you&rsquo;ll need an HBA for the…

Improving git diff output in 5 min

Everyone uses git diff . But there&rsquo;s that odd annoyance that you&rsquo;ve probably seen before but are so used to that you&rsquo;ve forgotten about it. The a/ and b/ prefixes&hellip; Example : james@computer:~/code/mgmt ( feat/cool-feature ) $ git diff diff --git a/lang/funcs/core/os/readfile_func.go b/lang/funcs/core/os/readfile_func.go index 206ba798d..48ac29dc7 100644 ---…

Blocked select logging (deadlock finding) in golang

I&rsquo;ve been writing some massively concurrent code for mgmt lately. The concurrency makes it incredibly bug prone. In this case it&rsquo;s usually races or deadlocks. I&rsquo;ve got a new trick to make the process more pleasant. The Problem : I&rsquo;m sure many of you have written some code like this before: // just a small excerpt for { select { case <- someEvent: // some awesome thing…

Deadline context test cancellation in golang

I decided to write a fancy test harness in golang today. The test wraps a big internal engine for mgmt and at the top-level it takes a context for cancellation. If you don&rsquo;t know about the context package, then you should go understand that and then come back here&hellip; Don&rsquo;t feel bad, I had no idea what it was about at first either! The Problem : I assumed there would be some way to…

Magic typing with shortcuts on Linux

Ever find yourself typing more characters than is necessary when using some annoying application or website? Here&rsquo;s a quick hack around that. Intro : There&rsquo;s a magic program called xdotool written by Jordan Sissel that solves this problem. I&rsquo;ve known about his excellent work for years, but only today did I learn he also wrote xdotool . It&rsquo;s named as such because it tells…

USB Audio on a Boombox

In an earlier post, I got USB audio working on my used, manual, 2013 Honda Civic EX . Today I&rsquo;ll do the same for a Sony ZS-RS60BT boombox . Here it is in all its used glory after a little cleaning. Background : I decided I should get a small portable boombox to practice my dope dance moves . I currently still suck because I think I spend more time computering than out on the floor. In any…

Working at Amazon

TL;DR: I&rsquo;ve got a new job working for Amazon , in the &ldquo;Open Source Program Office&rdquo;. I&rsquo;m now an Amazoner! More information below&hellip; The Amazon. Source: https://en.wikipedia.org/wiki/Amazon_rainforest Background : A little over three months ago, I decided to get back into full-time work . For the past 2.5 years since I left my job at Red Hat , I&rsquo;ve been mostly…

James is available for hire!

TL;DR: I&rsquo;m available for hire. Experienced at Linux/Golang/Mentoring/etc. More information below! A drawing of me coding away. A photo of me giving a talk to a sold-out crowd. Background : Two years ago, I left my job at Red Hat to work on mgmt config full-time. I&rsquo;m still passionate about this project, and I&rsquo;m proud of the progress that has been made in the last two years, but…

Inexpensive Dynamic DNS over IRC

The one thing that I&rsquo;ve been using for longer than ssh is dynamic dns. In this article I&rsquo;ll explain how I built an inexpensive, reliable, private alternative to the mainstream tools commonly available today using only golang and IRC . Background : I&rsquo;ve had an account with dyndns.org for a long time. They used to be free, but then they cut off the free tier, but left existing…

USB Car Audio in a Civic

Transportation is very important to me. My whole life I&rsquo;ve never owned a car. I have gotten by with biking, public transit, and various car sharing services. Sadly, biking is incredibly dangerous and stressful, because most cars don&rsquo;t respect bicycles, and in the winter it&rsquo;s not very practical, the STM (public transit) offers an incredibly unreliable and unpleasant service, and…

Mgmt Configuration Language: Class and Include

It&rsquo;s been a little over a year since I introduced the Mgmt Configuration Language . A lot has happened since then, and I&rsquo;d like to introduce some of the missing features that weren&rsquo;t available when the language was first introduced. If you haven&rsquo;t already read that post , please start there and come back when you&rsquo;re finished. In this article we&rsquo;ll learn about…

Upcoming Speaking and Events

mgmt @ FOSDEM : Later today I&rsquo;m giving four talks about mgmt at FOSDEM . I&rsquo;m also giving two more on the following day. (One is a 5 min lightning talk.) I don&rsquo;t know how I got accepted for so many talks, I just replied to the CFP for every room where I thought I had something interesting to share, and well, here we are! I got rejected for the main track again, but I guess…

A guide to fighting with a Cisco access point

In my hands is a Cisco AIR-CAP-3502-E-A-K9 that I saved from the landfill. After about eight hours of suffering, and what was surely a cancer causing dose of RF-radiation , I now know: How to convince this access point to provide me with wifi. Why Cisco products are probably best left in the garbage. What follows is my setup guide and review for using a Cisco Aironet device. This guide will likely…

The End of a Red Giant

As I&rsquo;m sure you&rsquo;ve now heard, Red Hat is being acquired by IBM . Reactions have ranged from: The first two emotions everyone experienced. to: The classic humourous response. to: The classy response. to: The thing we're all curious about. to everything in between. If someone were to leak me a copy of the memo-list 2018-October.txt.gz mailman archive, I&rsquo;d sure love to see that! (Of…

Hyperlinks in GNOME terminal

Over the years I&rsquo;ve learned about many of the advantages of using a modern terminal and shell. I&rsquo;m talking about using bash with GNOME terminal on a modern GNU/Linux distribution. I particularly like switching between the terminal and GUI applications. It&rsquo;s now even better. Automatic Hyperlinks : Occasionally, some program running in your shell might output what looked like a…

Breaking out of the Slack walled garden

I&rsquo;m old school cool. Real hackers chat on open, distributed platforms. Most technical discussion can be found on the Libera.chat IRC network. It&rsquo;s not perfect, but the advantages clearly outweigh the drawbacks. Recently, I needed to join an existing large &ldquo;community&rdquo; on the centralized, proprietary walled garden that is the Slack network. The Problem : Connecting to the the…

A new sync primitive in golang

I&rsquo;ve been working on lots of new stuff in mgmt and I had a synchronization problem that needed solving&hellip; Long story short, I built it into a piece of re-usable functionality, exactly like you might find in the sync package. For details and examples, please continue reading&hellip; The Problem : I want to multicast a signal to an arbitrary number of goroutines. As you might already…

Leaving Red Hat

I&rsquo;ve spent about four years at Red Hat , and now it&rsquo;s time to move on&hellip; TL;DR: had to leave Red Hat and start Patreon to fund mgmt . What follows is a bit of historical rambling, and some forward looking statements. Retrospective : Long-time readers of my blog will know that I was very active in the puppet ecosystem for many years. I learned a lot while writing puppet code, and…

Running `make` from anywhere

Sometimes while I&rsquo;m deep inside mgmt &rsquo;s project directory, I want to run an operation from the Makefile which lives in the root! Unfortunately, if you do so while nested, you&rsquo;ll just get: james@computer:~/code/mgmt/resources$ make build make: *** No rule to make target 'build' . Stop. The Ten Minute Solution : I figured I&rsquo;d hack out a quick solution. What I came up with…

Mgmt Configuration Language

Mgmt has given us a lot of great features, demos, and insight into how infrastructure automation should be managed. Unfortunately it wasn&rsquo;t a complete tool yet, because it was missing a crucial piece for its completeness. That all changes today with the addition of: the language . An ideal language allows us to express easily what is useful for the programming task, and at the same time…

Hello World!

Hello! This is a new version of my website and blog. If you experience any issues, please let me know! Happy Hacking, James You can hire James and his team at m9rx corporation . You can follow James on Mastodon for more frequent updates and other random thoughts. You can follow James on Twitter for more frequent updates and other random thoughts. You can support James on GitHub if you'd like to…

Copyleft is Dead. Long live Copyleft!

As you may have noticed, we recently re-licensed mgmt from the AGPL ( Affero General Public License) to the regular GPL . This is a post explaining the decision and which hopefully includes some insights at the intersection of technology and legal issues. Disclaimer : I am not a lawyer, and these are not necessarily the opinions of my employer. I think I&rsquo;m knowledgeable in this area, but…

Extracting movies from libreoffice

I have a short movie that I imported into a libreoffice presentation. I wanted a copy of that movie back, but I couldn&rsquo;t figure out how to extract a copy. In desperation, I figured I&rsquo;d try opening the file with file-roller , the GNOME archive manager. james@computer:/tmp$ file mgmt-berlin-osdc-17may2017.odp mgmt-berlin-osdc-17may2017.odp: OpenDocument Presentation james@computer:/tmp$…

Declarative vs. Imperative paradigms

Recently, while operating two different remote-controlled appliances, I realized that it was high time for a discussion about declarative and imperative paradigms. Let&rsquo;s start by looking at the two remotes: Two different "remotes". The one on the left operates a television, and the one on the right controls a central heating and cooling system. At first glance you will notice that one of…

Osmocom femtocell un-boxing

LaForge and the fine folks at Osmocom ( Sysmocom ) recently had a femtocell giveaway . I didn&rsquo;t expect to have much time to hack on things, but they were still quite generous in sending me one. It arrived, and I took some un-boxing photos for anyone who is curious. A box arrived in the mail... Which recurses into an inner box... Inner box is box like. Finally... The unit is displayed. Here…

Metaparameters in mgmt

In mgmt we have meta parameters . They are similar in concept to what you might be familiar with from other tools, except that they are more clearly defined (in a single struct) and vastly more powerful. In mgmt, a meta parameter is a parameter which is codified entirely in the engine, and which can be used by any resource. In contrast with Puppet, require/before are considered meta parameters ,…

Faster golang builds

I&rsquo;ve been hacking in golang since before version 1.4, and the speed at which my builds finished has been mostly trending downwards. Let&rsquo;s look into the reasons and some fixes. TL;DR click-bait title: &ldquo;Get 4x faster golang builds with this one trick!&rdquo;. Here are the three reasons my builds got slower: The compiler Before version 1.5, the compiler was written in C but with…

Ten minute hacks: Process pause & resume

I&rsquo;m old school and still rocking an old X220 laptop because I didn&rsquo;t like the new ones . My battery life isn&rsquo;t as great as I&rsquo;d like it to be, but it gets worse when some &ldquo;webapp&rdquo; (which I&rsquo;d much rather have as a native GTK+ app) causes Firefox to rev my CPU with their websocket (hi gmail!) poller. This seems to happen most often on planes or when I&rsquo;m…

Send/Recv in mgmt

I previously published &ldquo; A revisionist history of configuration management &rdquo;. I meant for that to be the intro to this article, but it ended up being long enough that it deserved a separate post. I will explain Send/Recv in this article, but first a few clarifications to the aforementioned article. Clarifications I mentioned that my &ldquo;revisionist history&rdquo; was inaccurate, but…

A revisionist history of configuration management

I&rsquo;ve got a brand new core feature in mgmt called send/recv which I plan to show you shortly, but first I&rsquo;d like to start with some background. History This is my historical perspective and interpretation about the last twenty years in configuration management. It&rsquo;s likely inaccurate and slightly revisionist, but it should be correct enough to tell the design story that I want to…

Remote execution in mgmt

Bootstrapping a cluster from your laptop, or managing machines without needing to first setup a separate config management infrastructure are both very reasonable and fundamental asks. I was particularly inspired by Ansible &rsquo;s agent-less remote execution model, but never wanted to build a centralized orchestrator. I soon realized that I could have my ice cream and eat it too. Prior knowledge…

mgmt has a logo

The mgmt config project got a logo! The full commit is here . Thanks to Sarah Jane Cox for creating it. Happy Hacking, James PS: I might have a few stickers to give out too! Ask me next time you see me if you&rsquo;d like one! Alternatively, use the artwork to make your own and share with your friends! You can hire James and his team at m9rx corporation . You can follow James on Mastodon for more…

Live dmesg following

All good sysadmins eventually learn about using tail -F to tail files. Yes upper-case F is superior. Around the time I wrote that article, I remember wanting to stream dmesg output too! The functionality wasn&rsquo;t available without some sort of polling hack, but it turns out that kernel support for this actually landed around the same time in version 3.5.0! Most GNU/Linux distros are probably…

Seen in downtown Montreal...

The Technical Blog of James was seen on an outdoor electronic display in downtown Montreal! Thanks to one of my readers for sending this in. I guess the smart phone revolution is over, and people are taking to reading my articles on bigger screens! The "poutine" is decent proof that this is probably Montreal. If you&rsquo;ve got access to a large electronic display, put up the blog, snap a photo,…

Ten minute hacks: Hacking airplane headphones

I was stuck on a 14 hour flight last week, and to my disappointment, only one of the two headphone speakers were working. The plane&rsquo;s media centre has an audio connector that looks like this: Someone should consider probing this USB port. The hole to the left is smaller than a 3.5mm headphone jack, and designed for a proprietary headphone connector that I didn&rsquo;t have, and the two holes…