🌉 bridged from @duckduckduck@programming.dev by Tidepool
duckduckduck
@duckduckduck.programming.dev.ap.tdpl.io
How do you keep track of packages on your machines?
I manage a pretty disparate cluster of servers. Lots of Ubuntu VMs using Proxmox, a k8s cluster for Jupyter notebooks, and some old bare metal one-offs (Solaris, etc). Though Debian based is probably by far the most common.
Right now I've inherited a spreadsheet listing OS versions and physical locations of each of the machines, some info on more stable VMs that handle key services (dns, chat, mail, web services, etc). Finally there are some VMs that belong to researchers who could be doing anything
I'm not alone in managing all this thank gourd, but I'm new here, so it is a chore every time a new CVE drops to go trawling around to check what software is installed where and what version it is.
Any ideas on how to implement a sort of queryable database of all the packages and their versions? I'm imagining a service that polls the individual nodes and fetches the information in whatever way is necessary for that system, then plops that info into a document db and presents it as a web app that lets people (me) do simple CRUD operations as well as add whatever context is relevant (last_checked, notes, location, history, etc).
PS. I definitely don't want to roll out a prescriptive one-size-fits-all deployment model to make the job of querying easier. I'm fine taking on the complexity if I can let the people using my cluster continue being freaky little weirdos. :)
Flow suggestions for pushing to remote--sometimes?
Probably silly. Say I've got a remote repo that is only available sometimes, like a removable drive, and I want to add it as a remote, but I don't want to get an error each-- Actually, maybe disregard... I was just poking about in the CLI and remembered that ofc I could add a named remote without adding its
pushurlto my main remote like "origin". So it's actually easiest to just do likebash
# Add the remote git clone --bare . /mnt/asdf/asdf git remote add usb /mnt/asdf/asdf # Push to it by name whenever git push usb
Seems intuitive to me, but maybe I'm X/Ying it... how would other people go about having a "sometimes" available remote repo, where you want to track easily and efficiently keep track of all the git history?
Any way to set the default subject line of commit message when you do a git revert?
Whenever I do a
git revertI go into an edit session with the following pre-filled.bash
Revert "wip: does this work?" This reverts commit ad21a2ae23166b3f3cddoooooooom94821e3cdb4. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. ...
...and so on. I like to use conventional commits, so I change this to
revert: "wip: does this work?". Is there a way to get the initial template for the revert commit message to appear this way by default? Lowercase, and with a colon. ——— UPDATE This is what I came up withbash
#!/bin/bash COMMIT_MSG_FILE=$1 old_subject_line=$(head -1 $COMMIT_MSG_FILE) # Not a revert if [[ ! "$old_subject_line" =~ ^Revert\ \" ]] then exit 0 fi new_subject_line=$(echo $old_subject_line|sed 's/^Revert/revert:/') sed -i "1s/.*/$new_subject_line/" $COMMIT_MSG_FILECuriously, the case where two "Reverts" in a row become a "Reapply" doesn't come up like I thought it would. Maybe it only happens if you use the default
Revert "yada yada yada"subject line.