Base os install ad a template in your hypervisor. Ansible playbook with a task to spin up the VM, another task to setup network and required packages. Then other playbooks for the software/services setup.
I use Ansible for all my deployments and just got a PXE boot set up with a preseed file to automate the install process and get the host ready to run playbooks.
I've been really pleased with this strategy overall. I think that Ansible works really well for programmatically generating config files which in turn makes moving applications between servers effortless. I control docker volume mounts with ansible variables and encrypt secrets with ansible vault so I can do everything all in one place.
Troubleshooting issues is a lot easier and recovering from a backup is faster and a requires less effort since I can just pull down the Ansible config from git and redeploy.
I use NixOS but I don't bother with automatic deployment or even automatic formatting. I don't feel it's necessary in a homelab setting as hardware failure rarely happens at such small scale and the manual steps left aren't that significant.
Setup a good kickstart script (even if it's just enough for Ansible to Configure it the rest of the way). It's awesome when messing with a system to be able to reboot select the reinstall PXE boot option and get a fresh install to tinker on.
On a similar note, I want to try boot2container as my PXE target next personally
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0