S4E8: "I Am Such a Git"

Posted
Comments 0

Navigation
Previous EpisodeNext Episode
Log
Recorded (UTC) Aired (UTC) Editor
2019-05-30 03:30:35 2019-06-09 01:14:49 "Edita"
Verification
Format SHA256 GPG Audio File
MP3 382bf4a92a33cf65b2fd7d5204b2c6d6568cd6b4a97818e8a7e74885668ccc06 click click
OGG 9babdac86ffb600a98d4acfc62eb453f37cb5ba5cbc8f58a66083d1b9705e69b click click

I did a big oopsie on this, so it’s a little…. unconventional. We talk about keeping configuration files in git (both /etc and your user’s dotfiles/dotdirs) and about designing “static systems” (live CDs, PXE/iPXE boot filesystems, etc.)

Just the Tip

  • Paden talks about LVM.
    • LVM, Logical Volume Manager, is exactly what it says (a way of creating virtual storage devices from physical ones).
    • This allows you to create a JBOD storage device.
      • LVM is not RAID!
    • Paden mentions resizing partitions and the like. This can be done if care is taken on direct physical storage as well, though it does require unmounting.
      • Jthan mentions using it for VM disks. However, disk images themselves can be resized (at least in libvirt environments) directly.
      • Personally, I hate LVM. I just see it as overhead and complication that isn’t needed anymore, which is probably why RHEL/CentOS 7 no longer use it as part of the default partitioning scheme for new installs. It also makes data recovery incredibly more difficult. If you want RAID, use RAID.
    • It is highly recommended that you refer to the Arch wiki entry and Gentoo wiki entry for more usage examples and information.
    • The Windows equivalent, for the MS admins out there, is dynamic disks (pre-Windows 10)/Storage spaces.

Notes

Starts at 11m01s.

I was drinking a Guinness Extra Stout. Paden was drinking Coors Light (he started with Absolut Vodka). Jthan was drinking “one of everything” — first a gin and tonic with Tanqueray and during the second take a Miller Lite.

Due to an error with Audacity, we completely lost my track for our first attempt of recording this episode. The produced and released version is our second take. If you’d like to hear Jthan and Paden’s tracks (combined), you can find a link to it in the errata.

  • Keeping dotfiles/dotdirs (and /etc) in git
    • I keep all of /etc as a (local-only) repository, and in your backups to save space you can just track /etc/.git.
    • Jthan keeps a select public repo of /etc contents, not his whole /etc.
      • You can use this easily with .gitignore by first matching everything in /etc (*) and then manually whitelisting specific files (!nginx/conf.d/site.conf). I can write a more detailed article explaining this if demand warrants it.
    • I mention SaltStack has a specific git module.
    • We have talked about configuration management “many times before”
    • Paden keeps a repo like Jthan does but manually copies files as-needed.
    • Paden mentions a tool I introduced him to, tig.
    • User-specific configuration files and directories (~/.foo, ~/.config/*bar*, etc.) control user-specific settings.
    • BE EXTREMELY CAREFUL if you configure remotes!
  • Designing static system images (21m09s)
    • Useful for PXE/iPXE images, Live CD/USB images, etc.
    • It takes a fair bit of disk space:
    1. Start with a “full” system, be it a directory you can chroot into or a VM, etc. This is so you can easily update, (re-)configure, test, etc. the image’s runtime environment. This is your golden image or base image.
    2. Then for each build release, you copy this directory and strip out unnecessary data to save space.
      1. Uninstall software you don’t need (compilers, etc.)
      2. Package manager caches
      3. Unused locales
      4. Many things in /var/cache and /var/tmp
    3. Then rendered into a compressed, read-only format (usually SquashFS), and usually combined with one or several OverlayFS mounts that allow certain directories to be “written” to during runtime (but will be removed on reboot, as OverlayFS writes live in RAM in this implementation).
      • Home directories should ideally be mounted over NFS or the like, so users don’t lose their user-specific application configurations, data, etc. on reboot.

15 Clams

In this segment, Jthan shares with you a little slice of life. The title is a reference to this video. (2m16s in)

Starts at 28m27s.

Jthan takes a huge issue with one of NixCraft’s tweets (original tweet).

Errata

  • Easter egg! Did you catch it? At the intro of the episode, I say “This has been Sysadminstrivia; I’m Brent” — this is normally my sign-off/outro for an episode! I did this because it was our second time recording.
  • The (XZ-compressed) mixed track of Jthan and Paden’s “draft 1” can be found here. Note that it has not been edited, just some basic sound quality cleanup was performed so it may feel rough.

Music

Music Credits
Track Title Artist Link Copyright/License
Intro Self Driving Sro click CC-BY-SA 4.0
Outro Phase 4 Xylo-Ziko click CC-BY-NC-SA 4.0
(All music is royalty-free, properly licensed for use, used under fair use, or public domain.)

Author
Categories

Comments

There are currently no comments on this article.

Comment...

Enter your comment below. Fields marked * are required. You must preview your comment before submitting it.