Automation of a local dev environment to learn, self-document, save time and avoid to reinvent the wheel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
debian-unattended/README.md

1.7 KiB

Debian unattended install

ATTENTION: this repo is focused on my thesis work so expect some mess and low generalization.

Usage

Get help:

./regeniso-sid.sh -h

Examples:

Note: preseed/kube.cfg at the moment works only with the netinst image. The reason is that with the netinst-minimal I should manually install some kernel modules (cdrom for example) and at the moment I don't know how to do this.

Generate a netinst with a kube preseed:

./regeniso-sid.sh preseed/kube.cfg netinst stable amd64 auto "bluetooth.blacklist=yes bnep.blacklist=yes"

Initialize the VM

Create a VM and launch the unattended install.

Minimal requirements:

  • 2 Cores
  • 3GB RAM (8GB for a decent experience)

Once the unattended installation finished successfully we should prepare the environment inside the VM.

user: virtualuser

password: test

Launch this script:

/srv/custom/main.sh

Once it concluded successfully shut down the VM.

Use the image of the first VM as a base and create 3 different linked volumes:

qemu-img create -f qcow2 -b baseImage.qcow2 deltaImage.qcow2

Create 3 clones of the base VM and associate at each one a delta image. Beware that each VM must have a different MAC address.

Launch the 3 VM clones and in one of them (usually the first) login and then install Rancher:

Login without polluting the known hosts file:

ssh virtualuser@ipAddress -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"

Add an unique hostname to each VM:

hostnamectl set-hostname unique-hname-101

And then launch this to install Rancher:

docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher