Understanding Bootstrapping

πŸ“š Hoofdstuk 29.2: Understanding Bootstrapping

────────────────────────────────────────────
πŸ”§ Wat is Bootstrapping?
────────────────────────────────────────────
Bootstrapping = automatisch installeren en configureren van een systeem of VM.
β†’ Vaak via shellscripts, Kickstart of cloud-init.

────────────────────────────────────────────
πŸ“œ Booten met Shell Scripts
────────────────────────────────────────────
β€’ Configuratiebestanden worden ingelezen door shell scripts
β€’ Scripts starten VM’s automatisch op en voeren installatie uit

────────────────────────────────────────────
πŸͺ› Kickstart met Anaconda (Red Hat)
────────────────────────────────────────────
β€’ Kickstartbestand = .ks.cfg β†’ bevat alle installatie-instellingen
β€’ Automatisch gegenereerd bij installatie in:
/root/anaconda-ks.cfg
β€’ Let op: bevat versleutelde wachtwoorden β†’ goed beveiligen

➀ Opslaglocaties:
β€’ USB, DVD, netwerk, lokaal

➀ Installatiebron:
β€’ ISO of installatietree

➀ Installatie starten:
β€’ Bij bootprompt: linux ks=hd:sdc1:/ks.cfg
β€’ virt-install voorbeeld:
virt-install --initrd-inject /root/VM-Install/ks.cfg \
--extra-args="ks=file:/ks.cfg console=tty0 console=ttyS0,115200n8"

────────────────────────────────────────────
☁️ Cloud-init
────────────────────────────────────────────
β€’ Tool voor VM-initialisatie, cloud en lokaal
β€’ Geschreven in Python
β€’ Ondersteunt AWS, Azure, DigitalOcean, VMware, KVM

➀ Configuratiebestand:
β€’ /etc/cloud/cloud.cfg

➀ Mogelijkheden:
β€’ Hostname instellen
β€’ Mount points
β€’ Locale/taal
β€’ SSH-sleutels toevoegen

➀ Belangrijke subcommando’s:
Subcommando Functie
init: Start initialisatie
status: Bekijk status van cloud-init
clean: Reset alle logs en data
analyze: Analyseer cloud-init logs
query: Bekijk metadata van de instantie
single: Draait één module