adding a new host to the FSF cluster

Instead of following the howto or resurect from backup, the z2-5 host of the FSF France ganeti cluster was recreated from scratch.

These notes require access to the cluster to be fully readable.

  • OVH squeeze 64
  • pksns1.pokersource.vm.gnt:/etc/bind/ : z2-5 IN A ;;
  • ssh pksns1.pokersource.vm.gnt /etc/init.d/bind9 reload
  • root@ks3096497:~/.ssh# rm authorized_keys2
    root@ks3096497:~/.ssh# wget -O authorized_keys
  • rsync -avH /etc/ganeti/hooks/
  • echo LANG=C > /etc/default/locale
  • /etc/crontab #*/1 * * * * root /usr/local/rtm/bin/rtm 51 > /dev/null 2> /dev/null
  • /etc/default/grub GRUB_DEFAULT=1
  • umount /home
  • remove /home from /etc/fstab
  • apt-get install linux-image-2.6.32-5-amd64
  • reboot
  • hostname
  • echo > /etc/hostname
  • apt-get remove lwresd
  • apt-get install dhcp3-server shorewall bind9 ganeti2
  • apt-get install etckeeper
  • scp /etc
  • /etc/ssh/sshd_config PasswordAuthentication no
  • root@z2-5:/etc#
    rsync --delete -avH bind/
    rsync --delete -avH shorewall/
    rsync --delete -avH dhcp3/
    mv /etc/dhcp /tmp
    ln -s /etc/dhcp3 /etc/dhcp
  • /etc/default/isc-dhcp-server INTERFACES=”br0″
  • scp /tmp
  • Copy from /tmp/interfaces
    auto lo:1
    iface lo:1 inet static
            up ip route add blackhole
    auto br0
    iface br0 inet static
            bridge_ports none
    	bridge_stp off
            bridge_maxwait 5
            up ip route add dev br0
    auto eth0:1
    iface eth0:1 inet static
          post-up ip route change default via dev eth0 src
  • ifup lo:1 ; ifup br0 ; ifup eth0:1
  • /etc/init.d/isc-dhcp-server restart
  • apt-get install mercurial
  • /etc/shorewall/params.local
  • /etc/default/shorewall startup=1
  • apt-get install openvpn
  • rsync --delete -avH openvpn/
  • rm /etc/openvpn/*
  • scp /usr/local/bin
  • /usr/local/bin/
  • manually change into in each /etc/openvpn/client-5-to-x.conf as fails to do it
  • in the OVH interface move the IP to the host
  • apt-get install quagga
  • rsync --delete -avH quagga/
  • /etc/quagga/ospfd.conf change hostname z2-5-ospfd and router-id
  • /etc/quagga/zebra.conf change hostname
  • /etc/init.d/quagga start
  • add to in /etc/munin/munin.conf
        use_node_name yes
        df.contacts nagios
        df.notify_alias Disk Usage
        iostat.contacts nagios
        iostat.notify_alias IO Stats
        cpu.contacts nagios
        cpu.notify_alias CPU usage
        memory.contacts nagios
        memory.notify_alias Memory usage
        if_eth0.contacts nagios
        if_eth0.notify_alias eth0 traffic
        if_err_eth0.contacts nagios
        if_err_eth0.notify_alias eth0 errors
  • apt-get install munin-node
  • /etc/munin/munin-node.conf allow .*$
  • from
    wget -O /usr/share/munin/plugins/kvm_cpu
    wget -O /usr/share/munin/plugins/kvm_mem
    wget -O /usr/share/munin/plugins/kvm_io
    wget -O /usr/share/munin/plugins/kvm_net
    chmod +x /usr/share/munin/plugins/kvm_*
    munin-node-configure --suggest --shell --families contrib
    munin-node-configure --suggest --shell --families contrib | bash
    /etc/init.d/munin-node restart
  • pvcreate /dev/sda2
  • vgcreate all /dev/sda2
  • gnt-node add –readd
  • gnt-node modify –offline=no
  • echo drbd minor_count=128 usermode_helper=/bin/true >> /etc/module
  • modprobe drbd minor_count=128 usermode_helper=/bin/true
  • /etc/init.d/drbd start
  • apt-get install ntp