On 6/22/24 11:33, Dmitrii Odintcov wrote:
Hi all,


Sorry to resurrect an old-ish thread, but I am facing the exact same
task, minus the know-how.

Basically I am looking to pre-configure a number of Debian setups -
let's say, "server", "laptop" and "PC" - that would contain sets of
packages to install (or uninstall), configuration files (including but
not limited to /etc/), and possibly arbitrary scripts to execute upon
installation (e.g. to make more precise edits to configs).

I would like to store these in some central, git-controlled location
where I could pull them from to my target machines. This kind of setup
could be rather low-level, such as configuring APT sources and
preferences, installing and configuring systemd-networkd, etc.
Ideally, I would also be able to incorporate these into a Debian
installer so I could get a new machine "up and running" with my
defaults in one go.

It is worth adding that I am not looking to build an "infrastructure",
and no setup *between* these machines (networking, file sharing, etc.)
is necessary.

Generally, I would rather avoid complicated tools like Ansible and
those with large dependencies such as interpreted languages (except
Perl).

So far, equivs and config-package-dev appear most relevant, but the
former is somewhat lacking in documentation (or I am in
documentation-finding ability), and the latter seems to be focused on
config editing/deployment rather than package installation.


Would be grateful for some advice!


I think the "best" answer depends upon the scale of your installation.


I have a SOHO network with a dozen or so Debian, Windows, macOS, and iOS clients, a FreeBSD/ZFS CVS, SSH, and Samba server, and a FreeBSD/ZFS backup server. For system administration, including configuration management, I have gone down the do-it-yourself (DIY) path using lowest-common-denominator FOSS command line tools.


After the network, ssh(1), and rsync(1), the most valuable tool for system administration (including configuration management) has been a version control system. I prefer CVS over Git because CVS provides monotonically-increasing MAJOR.MINOR version numbers via keywords (e.g. $Revision$) that can be included inside managed plaintext files. I create a CVS project for everything I want to manage. For OS's, I check in a sysadmin log file with my notes and console sessions, a list of packages installed, various reports that I have run, and any system configuration files that I have modified, added, or deleted.


After version control, the next most valuable tool has been scripting. Over the years, I have written numerous scripts to automate repetitive chores. When the needs are simple, I write Bourne shell scripts. When I want more power, I upgrade to Perl. All of the scripts are checked in to CVS.


I expect Ansible, Puppet, etc., would work at my scale, but are designed for large installations.


David

Reply via email to