Ganeti
Ganeti is a virtualization cluster manager. We currently use it for our machines at Hetzner. It is planned to eventually replace all uses of Proxmox.
How-to
Create a new VM (manually)
In case the VM creation cookbook is not usable, VMs can also be created manually.
- Create in Netbox and allocate IPs
- Create the VM with:
$ sudo gnt-instance add -t plain -B minmem=1G,maxmem=1G,vcpus=1 --net 0:network=infra-gnt-hetzner-hel-a-dmz1,mac=generate --disk 0:size=8g -n gnt-hetzner-hel01.majava.org --os-type noop --hypervisor-parameters kvm:boot_order=network,vnc_bind_address=127.0.0.1,vnc_password_file=/etc/ganeti/vnc-cluster-password --no-start HOSTNAME.srv.majava.org $ sudo gnt-instance show HOSTNAME.srv.majava.org
- Record MAC address in Netbox
- Start the VM:
- Partition disks manually
- Wait for install to complete, and VM to shut down
- Change boot order to disk, and start it from there:
- Log in via mgmt, sign puppet certs
Create a new cluster
This command was used to create the gnt-hetzner-hel-a
cluster:
$ gnt-cluster init \
--no-etc-hosts --no-ssh-init \
--vg-name vg-gnt \
--master-netdev lo-gnt --master-netmask 128 --primary-ip-version 6 \
--secondary-ip 10.20.80.1 \
--enabled-hypervisors kvm \
--hypervisor-parameters kvm:kvm_path=/usr/bin/qemu-system-x86_64,kvm_flag=enabled,serial_speed=115200,migration_bandwidth=64,migration_downtime=500,kernel_path= \
--enabled-disk-templates=plain \
gnt-hetzner-hel-a.discovery.majava.org