installing yet another host for FSF France

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

  • OVH squeeze 64
  • pksns1.pokersource.vm.gnt:/etc/bind/db.pokersource.info
    z2-1            IN      A       188.165.248.179 ;; ks380445.kimsufi.com
    z2-11           IN      A       87.98.251.28
    
  • ssh pksns1.pokersource.vm.gnt /etc/init.d/bind9 reload
  • change the reverse in the OVH manager for z2-1 and z2-11
    *

    root@ks3096497:~/.ssh# rm authorized_keys2
    root@ks3096497:~/.ssh# wget -O authorized_keys http://dachary.org/loic/id_rsa.pub
    
  • echo LANG=C > /etc/default/locale
  • /etc/crontab #*/1 * * * * root /usr/local/rtm/bin/rtm 51 > /dev/null 2> /dev/null
  • rm -fr /usr/local/rtm
  • /etc/default/grub GRUB_DEFAULT=1
  • umount /home
  • remove /home /dev/sda2 from /etc/fstab
  • fdisk /dev/sda and change /dev/sda2 to 8e (Linux LVM)
  • apt-get install linux-image-2.6.32-5-amd64
  • reboot
  • hostname z2-1.host.gnt
  • echo z2-1.host.gnt > /etc/hostname
  • apt-get remove lwresd
  • apt-get install etckeeper
  • git config --global user.email loic@dachary.org
    git config --global user.name "Loic Dachary"
    
  • apt-get install dhcp3-server shorewall bind9 ganeti2 emacs23-nox
  • cssh –options -A –tile root@z2-2.host.gnt root@z2-4.host.gnt root@z2-6.host.gnt root@z2-7.host.gnt root@z2-8.host.gnt
  • changes z2-1 and z2-11 IP in /etc/hosts
  • scp z2-8.pokersource.info:/etc/hosts /etc
  • rsync -avH z2-8.pokersource.info:/etc/ganeti/hooks/ /etc/ganeti/hooks/
  • /etc/ssh/sshd_config PasswordAuthentication no
  • apt-get install mercurial
    root@z2-5:/etc#
    rsync --delete -avH z2-8.pokersource.info:/etc/bind/ bind/
    rsync --delete -avH z2-8.pokersource.info:/etc/shorewall/ shorewall/
    rsync --delete -avH z2-8.pokersource.info:/etc/dhcp3/ dhcp3/
    mv /etc/dhcp /tmp
    ln -s /etc/dhcp3 /etc/dhcp
    
  • /etc/default/isc-dhcp-server INTERFACES=”br0″
  • Edit /etc/network//interfaces
    auto eth0:1
    iface eth0:1 inet static
          address 87.98.251.28
          netmask 255.255.255.255
          post-up ip route change default via 188.165.248.254 dev eth0 src 87.98.251.28
    
    auto lo:1
    iface lo:1 inet static
    	address 10.10.0.1
    	netmask 255.255.255.255
    	up ip route add blackhole 10.0.0.0/8
    
    auto br0
    iface br0 inet static
            address 10.10.0.254
            netmask 255.255.255.255
            bridge_ports none
            bridge_stp off
    	bridge_maxwait 5
            up ip route add 10.10.0.254 dev br0
    
    
    
  • ifup lo:1 ; ifup br0 ; ifup eth0:1
  • /etc/init.d/isc-dhcp-server start
  • /etc/shorewall/params.local
    IP_MAIN=188.165.248.179
    IP_FAILOVER=87.98.251.28
    VM_PROXY=10.10.1.10
    
  • /etc/default/shorewall startup=1
  • /etc/init.d/shorewall start
  • apt-get install openvpn
  • rsync --delete -avH z2-8.pokersource.info:/etc/openvpn/ /etc/openvpn/
  • rm /etc/openvpn/*.conf
  • scp z2-8.pokersource.info:/usr/local/bin/buildconf.sh /usr/local/bin
  • /usr/local/bin/buildconf.sh .host.gnt
  • manually change z2-x.pokersource.info into z2-x1.pokersource.info in each /etc/openvpn/client-1-to-x.conf as buildconf.sh fails to do it
  • in the OVH interface move the z2-51.pokersource.info IP to the z2-5.pokersource.info host
  • apt-get install quagga
  • rsync --delete -avH z2-8.pokersource.info:/etc/quagga/ quagga/
  • /etc/quagga/ospfd.conf change hostname z2-5-ospfd and router-id 10.10.0.5
  • /etc/quagga/zebra.conf change hostname z2-5.host.gnt
  • /etc/init.d/quagga start
  • add to munin.pokersource.info in /etc/munin/munin.conf
    [z2-1.pokersource.info]
        address z2-1.host.gnt
        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 http://trac.fsffrance.org/wiki/PatchInventory#Munin
    wget -O /usr/share/munin/plugins/kvm_cpu http://exchange.munin-monitoring.org/plugins/kvm_cpu/version/2/download
    wget -O /usr/share/munin/plugins/kvm_mem http://exchange.munin-monitoring.org/plugins/kvm_mem/version/1/download
    wget -O /usr/share/munin/plugins/kvm_io http://exchange.munin-monitoring.org/plugins/kvm_io/version/2/download
    wget -O /usr/share/munin/plugins/kvm_net http://exchange.munin-monitoring.org/plugins/kvm_net/version/2/download
    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
  • 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
  • z2-8.host.gnt: gnt-node add –readd z2-1.host.gnt
  • z2-8.host.gnt: gnt-node modify –offline=no z2-1.host.gnt
  • apt-get install ntp