Social - Alice Ice

Social - Alice Ice

The small joy of making tools for yourself.

A nice terminal table displaying a lists of servers, their hostname, the operating system they run, the specific flavor of it and version.

it also shows the amount of pending system updates to be applied, as well as security updates.

All the hosts show Status as "Online" in green.

Whenever hosts have a non zero amount of updates in the security column, the number is red.

The top header reads "Host Status Overview" in italics.
At the bottom there is a prompt labeled "exosphere" awaiting more commands.

@mr_daemon Heh. I find myself building almost the same screen this morning, but for CI test results.

My homebrew tool for patches reporting is shaping up nicely. Apologies for the horrifying video aspect ratio.

It can now save and cache state across runs, which is nice.

My adorable little console based tool for patch reporting continues to take shape nicely. This output is consistent across platforms, too.

I haven't had this much fun writing anything in ages.

A screenshot of a terminal view showing the output of an exosphere command: host show ayakashi -u

There is a details box at the top containing the hostname, ip address, online status, last refresh timestamp and operating system details. It also contains a short summary with the number of available updates.

Below is a table detailing individual security updates, including the name, current version, proposed version, whether or not it is a security update, as well as the source repository the package comes from.

Rows where the security column is set to Yes are tastefully highlighted.

@mr_daemon

This looks interesting! 😁

How does it work under the hood?
replies
1
announces
0
likes
0

@aliceice You populate the configuration file in any format (toml, yaml, json, straight up Python mapping) with hosts and connection details. (works best with ssh agents and key pairs).
Then on first load you do an inventory sync and it connects to the systems in parallel using fabric through a thread pool, and runs a series of commands and file reads to determine what os and flavor is at play. It then matches one of the package manager providers that all implement a basic api for this information (so adding new ones is fairly straightforward). Then whenever you refresh a system it calls that api, which in turn does more fabric commands to slice and dice the output of the package manager and coerce it into a dataclass with common fields.

Ultimately, all of this gets serialized to disk in a shelve based cache that I extended to do lzma compression. I then have a bunch of Typer commands to query any of it and render it in a nice Rich based output, in a makeshift REPL.

Its actually weirdly reliable.

@mr_daemon what's it called?

@thesargard Tentative name is Exosphere, I'm probably going to release it publicly when it's feature complete and cleaned up

I finally managed to write the Yum/DNF provider abstraction for RHEL like systems for my little patch reporting program.

It was all sorts of irritating because the package manager has all the low level information but only feeds it to you piecemeal via yum/dnf, so this is parsed out in 3 queries.

In the end, it just works transparently.

A screenshot of the middle of the updates listing from Exosphere.

The columns contain their usual (package, current version, new version, security status, and source), except it now contains rpm packages from repositories, off an AlmaLinux 9 host. A screenshot of the botton of the status table from Exosphere.

It contains the usual columns with host details: name, OS, flavor, version, update count, security update count and status.

Visible are four entries, the first two are for debian 12 linux systems.

The last two are redhat systems, and "rehl 9.5" shows up in the flavor and version columns.

One of the rhel systems shows 210 updates, 19 of which are security updates.

I've also made the view filterable by name, which is nice.

A screenshot of the exosphere console.

The command line reads "inventory status fenrir hugin"

The table below has headers:
Host, OS, Flavor, Version, Updates, Security, Status

Only two rows show in the table, which are for the hosts "fenrir" and "hugin", which show the os as linux, the flavor as rhel, version 9.6 and 9.5 respectively, 0 updates, 0 security and status Online.

@mr_daemon is this fleet control app just for patches?

@Viss So far yes. It doesn't even apply them for you either, since there's way better automation tooling available for that, like say, Ansible

But so far it's a nice way of getting a centralized view of

1) is all my shit up to date
2) is everything up

Which are two questions I have often lol

@Viss That said I've written it to be extensible enough that if I suddenly have a third recurring question, it can definitely be made to tell me the answer.

@mr_daemon sounds pretty great!

My little patch reporting program is nearing the state where it's probably solid enough to release in the wild, I think.

I just have to write some documentation, clean up some authentication details, and figure out what is the lowest version of Python I'm willing to support outside of uv.

Here is a short demo of how it works in practice