Ganeti installation
apt install bridge-utils ganeti ganeti-doc ganeti-instance-debootstrap ganeti-os-noop
- *KVM Network configuration**
/etc/network/interfaces
# Management interface auto eno1 iface eno1 inet manual
auto br-lan iface br-lan inet static
address 10.4.64.211 netmask 255.255.255.240 gateway 10.4.64.209 dns-nameservers 210.4.77.180 bridge_ports eno1 bridge_stp off bridge_fd 0 bridge_maxwait 0
# VM Service interface public auto eno2 iface eno2 inet manual
auto br-svc iface br-svc inet manual
bridge_ports eno2 bridge_stp off bridge_fd 0 bridge_maxwait 0
# Replication network auto eno3 iface eno3 inet manual
auto br-rep iface br-rep inet static
address 10.4.64.226 netmask 255.255.255.240 bridge_ports eno3 bridge_stp off bridge_fd 0 bridge_maxwait 0
http://ftp.debian.org/debian/pool/main/g/ganeti-os-noop/
Ganeti-os-noop_0.2-4_all.deb and install
https://wiki.osuosl.org/ganeti/common_commands.html
https://nsrc.org/workshops/2014/sanog23-virtualization/raw-attachment/wiki/Agenda/ganeti.pdf
egrep -c '(vmx|svm)' /proc/cpuinfo
gnt-cluster modify -N link=br-svc
Cluster conf
- # echo “options drbd minor_count=128 usermode_helper=/bin/true” >/etc/modprobe.d/drbd.conf
- # echo “drbd” »/etc/modules
- # rmmod drbd # ignore error if the module isn't already loaded
- # modprobe drbd
- Adding nodes to the cluster - MASTER NODE ONLY
- # gnt-node add iptcloud2.bdcom.com
- # gnt-cluster verify
- VNC PASS send to Cluster
- echo 'RU6W5^r_Zh' >/etc/ganeti/vnc-cluster-password
- chmod 600 /etc/ganeti/vnc-cluster-password
- gnt-cluster copyfile /etc/ganeti/vnc-cluster-password
- gnt-cluster modify -H kvm:vnc_password_file=/etc/ganeti/vnc-cluster-password
- gnt-instance info cwp
- gnt-instance list -o +network_port
- gnt-instance shutdown ntvbd
- gnt-instance modify -B minmem=4GB,maxmem=8GB ntvbd
- gnt-instance list -o +network_port
- gnt-instance start ntvbd
- root@spc1:~# history |grep mtest
- 344 gnt-instance add -t plain -o noop -s 400G -B minmem=4GB,maxmem=8GB -n spc1.bdcom.com.bd –no-start –no-name-check –no-ip-check mtest
- 345 gnt-instance start -H boot_order=cdrom,cdrom_image_path=/var/iso/debian-7.11.0-amd64-netinst.iso mtest
- 349 gnt-instance reboot mtest
- 362 gnt-instance drop mtest
- 363 gnt-instance remove mtest
- 365 gnt-instance add -t plain -o noop -s 400G -B minmem=4GB,maxmem=8GB -n spc1.bdcom.com.bd –no-start –no-name-check –no-ip-check mtest
- 366 gnt-instance start -H boot_order=cdrom,cdrom_image_path=/var/iso/debian-7.11.0-amd64-netinst.iso mtest
- 375 gnt-instance reboot mtest
- 376 gnt-instance reboot mtest
- 404 gnt-instance reboot mtest
- 478 gnt-instance info mtest
- 483 gnt-instance shutdown mtest
- 493 gnt-instance remove mtest
- 495 history |grep mtest
- 454 gnt-instance info syn2 |grep vcpu
- 455 gnt-instance modify -B vcpus=2 syn2
- gnt-instance list -o +network_port
- gnt-instance shutdown ntvbd
- gnt-instance modify -B minmem=4GB,maxmem=8GB ntvbd
- gnt-instance list -o +network_port
- gnt-instance start ntvbd
- gnt-node list
- gnt-node list-storage
- gnt-cluster info | more
- gnt-instance add -t plain -o noop -s 400G -B minmem=4GB,maxmem=4GB -n vps1.bdcom.com –no-start –no-name-check –no-ip-check dns2
- tail /var/log/ganeti/node-daemon.log
- alias gls='gnt-instance list -o +network_port'
- #alias glst='gnt-instance list -o name,pnode,snodes,oper_ram,nic.bridge/0,network_port,nic.link/0,sda_size,status'
- alias glst='gnt-instance list -o name,pnode,oper_ram,nic.bridge/0,network_port,nic.link/0,sda_size,status'
- vi .bashrc
- source .bashrc
- glst
https://nsrc.org/workshops/2014/bdnog1/raw-attachment/wiki/Track3Agenda/ex-ganeti-install-bdnog.htm
- gnt-backup export -n node1.example.com instance3.example.com
- # gnt-instance add -t drbd -H lxc -B minmem=128G,maxmem=128G,vcpus=8 -o clone-image+sles11-sp3 –net 0:network=gruen103,ip=X.X.X.X –disk 0:size=15G,name='/:ext3:noatime' –disk 1:size=100G,name='/data:xfs:noatime' –no-name-check –no-ip-check –no-wait-for-sync hc2.XXXXXX.de
- 467 gnt-node list
- 468 gnt-node modify –offline=yes vpsc2.bdcom.com
- 469 gnt-node list
- 470 gnt-node remove vpsc2.bdcom.com
- 471 gls
- 472 gnt-instance remove rnd
- 473 gnt-instance remove rnd –ignore-failures
- 474 gnt-instance remove –ignore-failures rnd
- 475 gls
- 476 gnt-instance remove –ignore-failures olbwebmin
- 477 gnt-instance remove –ignore-failures office-gw
- 478 gnt-instance remove –ignore-failures mblaster
- 479 clear
- 480 gls
- 481 gnt-instance remove –ignore-failures dalo-aaa
- 482 gnt-instance remove –ignore-failures cacti-wasa
- 483 clear
- 484 gls
- 485 gnt-instance remove –ignore-failures ansible
- 486 gnt-node remove vpsc2.bdcom.com
- 487 gnt-node list