Build of ISOs and execution of the debian-installer in qemu up to ssh connection when the machine is ready:
Build of ISOs, execution of the debian-installer in qemu and deployment with Ansible:
Debian Preseed is a mean to completely automate the debian-installer steps. There are several ways to setup the debian installer “preseeding”. The one I choose is to edit the netboot ISO image in order to include my installer configuration.
- The preseed.cfg creates a hands off installation with the following features:
- Swiss keyboard and locale
- GPT partioning
- No swap
- Sudo without password for users in the sudo group
Feel free to adapt to your needs!
To rebuild the ISO images, make sure you’ve Docker installed and type:
- This will download the debian installer ISO image, modify it and provide 2 ISO:
- buster-server.iso -> the available disk space is assigned mostly to /var
- buster-standard.iso -> the available disk space is assigned mostly to /
To use the ISO:
sudo dd if=buster-server.iso of=<put the device matching the USB key you just plugged>
this will erase the entire content of the USB key.
the debian installer will not ask any question -> it will erase completely the first drive of the machine to install debian.
- To test the iso, first make sure you have KVM / Qemu and a vncviewer installed. You can then run:
- make test_iso in one terminal: this will start QEMU in background and wait for the full installation to finish by connecting with SSH inside the resulting installation
- vncviewer localhost:59000 to see the process in action
- As a demonstration, the following roles are applied (see task.yml):
- ansible_buster_base : configure non-free, install firmwares and configure locales
- ansible_users : configure the user accounts
- ansible_docker : install docker
- ansible_portainer : deploy Portainer to easily manage the containers locally
- ansible_registy : deploy a local docker registry
- ansible_groups : Add users to groups
This is just an example how easy it is to deploy fully automatically a debian system.