0x90-pyinfra/ararat/deploy.py

17 lines
807 B
Python
Raw Normal View History

2024-11-30 08:27:13 +00:00
# if it doesn't exist, create encrypted data partition
# mount encrypted data partition
# apk add kvm virsh
# rc-update add libvirtd
# add networking: https://wiki.alpinelinux.org/wiki/KVM#Networking
# modprobe tun
# echo "tun" >> /etc/modules-load.d/tun.conf
# cat /etc/modules | grep tun || echo tun >> /etc/modules
# if it doesn't exist, create debian base image (later: and other base images): https://mop.koeln/blog/creating-a-local-debian-vm-using-cloud-init-and-libvirt/#download-the-image
# for every active VM, if no image exists, run virt-install with the chosen base image and their cloud-init.yml file: https://mop.koeln/blog/creating-a-local-debian-vm-using-cloud-init-and-libvirt/#preparing-a-cloud-init-file
# for every active VM, make sure an IP is assigned and traffic is passed to it