During my endavours I had a situation where I had to provision 10 servers (install all of them manually and configure same things on all of them, same files etc).
There is a nice alternative to it called Stacki from StackIQ (bought by Teradata last year). What it offers is specialized PXE server that is used to boot baremetal/VM servers (CentOS/Redhat/Ubuntu).
Its architecture look as follows (Stacki server == Frontend, server to be provisioned == backend):
Firstly in CSV file you prepare a list of hosts with their MACs and as a next step you add puppet that will be used to provision the servers after booting.
More can be found here:
Frontend machine can be a VM – actually it worked pretty nice – tested with provisioning other VMs.
Recently I had to manually install kernel on one Debian machine. Steps are as follows:
- Download kernel-headers and kernel-image deb packages
- Install these packages with
dpkg --force-architecture --force-overwrite --install
After installation the following files shall appear in /boot directory:
- Still we are missing initial RAM disk and this one can be created with mkinitramfs:
mkinitramfs -o initrd.img-<kernel_version>-deb-32 <kernel_version>-deb-32
After this step RAMdisk will appear in /boot:
- Update grub and check /boot/grub/grub.cfg to verify that new entry is added:
First question – what is the purpose? Such fake loop device can be used as pv in lvm in case we want to play around and don’t want to add a new disk.
- Prepare a binary file with dd e.g. /srv/swift-disk.bin
- Create a script in e.g: /usr/lib/systemd/scripts and ensure that it is executable:
losetup /dev/loop0 /srv/swift-disk.bin
- Create a service in: /usr/lib/systemd/system
Description=Setup loop devices for swift
- Enable and start a service:
systemctl enable swift-loop.service
systemctl start swift-loop.service