]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
See if we still need instance-debootstrap
authorPeter Palfrader <peter@palfrader.org>
Fri, 19 Sep 2014 10:20:10 +0000 (12:20 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 19 Sep 2014 10:20:10 +0000 (12:20 +0200)
modules/ganeti2/manifests/init.pp
modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/hooks/20-dsa-install-bootloader.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/variants.list.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/variants/dsa-wheezy.conf.erb [deleted file]
modules/ganeti2/templates/instance-debootstrap/variants/dsa.conf.erb [deleted file]

index f5032041ac59aa8dd54935403021fe82fb67a631..4dd32fee69a2177c060e2e51cda79cb0f8ae1897 100644 (file)
@@ -17,10 +17,6 @@ class ganeti2 {
                ensure => installed
        }
 
-       package { 'ganeti-instance-debootstrap':
-               ensure => installed
-       }
-
        if $drbd {
                package { 'drbd8-utils':
                        ensure => installed
@@ -28,53 +24,4 @@ class ganeti2 {
        }
 
        site::linux_module { 'tun': }
-
-       file {
-               '/etc/ganeti/instance-debootstrap/variants.list':
-                       content => template('ganeti2/instance-debootstrap/variants.list.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       ;
-               '/etc/ganeti/instance-debootstrap/variants/dsa.conf':
-                       content => template('ganeti2/instance-debootstrap/variants/dsa.conf.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       ;
-               '/etc/ganeti/instance-debootstrap/variants/dsa-wheezy.conf':
-                       content => template('ganeti2/instance-debootstrap/variants/dsa-wheezy.conf.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/00-dsa-configure-networking':
-                       content => template('ganeti2/instance-debootstrap/hooks/00-dsa-configure-networking.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0555',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/10-dsa-install-extra-packages':
-                       content => template('ganeti2/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0555',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/20-dsa-install-bootloader':
-                       content => template('ganeti2/instance-debootstrap/hooks/20-dsa-install-bootloader.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0555',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/30-dsa-install-ssh-keys':
-                       content => template('ganeti2/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0555',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/40-dsa-setup-swapfile':
-                       content => template('ganeti2/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb'),
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0555',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/clear-root-password':
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0444',
-                       ;
-               '/etc/ganeti/instance-debootstrap/hooks/xen-hvc0':
-                       require => Package['ganeti-instance-debootstrap'],
-                       mode    => '0444',
-                       ;
-       }
-
 }
diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb
deleted file mode 100755 (executable)
index e06ecff..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-#!/bin/bash
-
-set -e
-
-if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
-  echo "Missing target directory"
-  exit 1
-fi
-
-if [ ! -d "$TARGET/etc/network" ]; then
-  echo "Missing target network directory"
-  exit 1
-fi
-
-if [ -z "$NIC_COUNT" ]; then
-  echo "Missing NIC COUNT"
-  exit 1
-fi
-
-rm -f $TARGET/etc/udev/rules.d/70-persistent-net.rules
-
-touch $TARGET/etc/udev/rules.d/75-cd-aliases-generator.rules
-touch $TARGET/etc/udev/rules.d/75-persistent-net-generator.rules
-
-
-###########################################
-fqdn=$(cat $TARGET/etc/hostname)
-echo ${fqdn%%.*} > $TARGET/etc/hostname
-
-###########################################
-if [ "$NIC_COUNT" -ge 1 ]; then
-  cat > $TARGET/etc/network/interfaces << EOF
-# /etc/network/interfaces
-
-auto lo
-iface lo inet loopback
-
-EOF
-fi
-
-
-###########################################
-###########################################
-<% if scope.lookupvar('::cluster').to_s == 'ganeti2.debian.org' -%>
-
-###########################################
-if [ "$NIC_COUNT" -ge 1 ]; then
-  cat >> $TARGET/etc/network/interfaces << EOF
-auto eth0
-iface eth0 inet static
-  address ${NIC_0_IP}
-  netmask 255.255.255.0
-  gateway 206.12.19.254
-
-  pre-up /sbin/sysctl -w net.ipv6.conf.\$IFACE.accept_ra=0 || true
-  up   ip addr add 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS/64 dev \$IFACE
-  up   ip r add default via 2607:f8f0:610:4000::1 src 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS dev \$IFACE
-  down ip r del default via 2607:f8f0:610:4000::1 src 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS dev \$IFACE
-  down ip addr del 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS/64 dev \$IFACE
-EOF
-
-fi
-
-###########################################
-cat > $TARGET/etc/resolv.conf <<EOF
-# /etc/resolv.conf
-search debprivate-ubc.debian.org debian.org
-nameserver 206.12.19.20
-nameserver 206.12.19.21
-EOF
-
-###########################################
-###########################################
-<% elsif scope.lookupvar('::cluster').to_s == 'ganeti-osuosl.debian.org' -%>
-#
-###########################################
-if [ "$NIC_COUNT" -ge 1 ]; then
-  cat >> $TARGET/etc/network/interfaces << EOF
-auto eth0
-iface eth0 inet static
-  address ${NIC_0_IP}
-  netmask 255.255.255.128
-  gateway 140.211.166.1
-
-  pre-up /sbin/sysctl -w net.ipv6.conf.\$IFACE.accept_ra=0 || true
-EOF
-
-fi
-
-###########################################
-cat > $TARGET/etc/resolv.conf <<EOF
-# /etc/resolv.conf
-search debian.org
-nameserver 140.211.166.130
-nameserver 140.211.166.131
-EOF
-
-<% elsif scope.lookupvar('::cluster').to_s == 'ganeti3.debian.org' -%>
-#
-###########################################
-if [ "$NIC_COUNT" -ge 1 ]; then
-  cat >> $TARGET/etc/network/interfaces << EOF
-auto eth0
-iface eth0 inet static
-  address ${NIC_0_IP}
-  netmask 255.255.255.192
-  gateway 82.195.75.126
-
-  pre-up /sbin/sysctl -w net.ipv6.conf.\$IFACE.accept_ra=0 || true
-EOF
-
-fi
-
-###########################################
-cat > $TARGET/etc/resolv.conf <<EOF
-# /etc/resolv.conf
-search debian.org
-nameserver 82.195.75.81
-nameserver 82.195.66.239
-nameserver 217.198.242.225
-EOF
-
-<% else -%>
-
-# No config for cluster <%= scope.lookupvar('::cluster').to_s %>
-cp /etc/resolv.conf $TARGET/etc/resolv.conf
-
-<% end -%>
-
-
-
-
-###########################################
-if [ "$NIC_COUNT" -ge 2 ]; then
-  cat >> $TARGET/etc/network/interfaces << EOF
-
-auto eth1
-iface eth1 inet static
-  address ${NIC_1_IP}
-  netmask 255.255.255.0
-EOF
-
-fi
-
-###########################################
-# clean up etc/hosts
-cat > $TARGET/etc/hosts << EOF
-127.0.0.1       localhost
-${NIC_0_IP} ${fqdn} ${fqdn%%.*}
-
-# The following lines are desirable for IPv6 capable hosts
-::1     ip6-localhost ip6-loopback
-fe00::0 ip6-localnet
-ff00::0 ip6-mcastprefix
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-EOF
-
-exit 0
-
-# vim:set syn=sh:
diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb
deleted file mode 100755 (executable)
index 0b0b866..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-set -e
-
-if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
-  echo "Missing target directory"
-  exit 1
-fi
-
-chroot "$TARGET" apt-get -qq update
-chroot "$TARGET" apt-get -qq install vim ssh extlinux
-
-node="$(hostname)"
-instance="$(cat $TARGET/etc/hostname)"
-sed -e "s#root@$node#root@$instance#" -i "$TARGET"/etc/ssh/ssh*pub
-
-if [ "$ARCH" = "amd64" ]; then
-    chroot "$TARGET" apt-get -qq install linux-image-amd64
-fi
-
-exit 0
diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/20-dsa-install-bootloader.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/20-dsa-install-bootloader.erb
deleted file mode 100755 (executable)
index 2bbba5e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. common.sh
-
-CLEANUP=( )
-set -x
-trap cleanup EXIT
-
-if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
-  echo "Missing target directory"
-  exit 1
-fi
-
-# allow extlinux to find device
-mount --bind /dev $TARGET/dev
-CLEANUP+=("umount $TARGET/dev")
-mount --bind /proc $TARGET/proc
-CLEANUP+=("umount $TARGET/proc")
-
-# generate configuration
-echo 'EXTLINUX_PARAMETERS="ro console=ttyS0,38400n8"' > $TARGET/etc/default/extlinux
-chroot "$TARGET" extlinux-update
-
-# install extlinux
-chroot "$TARGET" extlinux -i /boot/extlinux
-
-# install boot record
-dd if="$TARGET/usr/lib/extlinux/mbr.bin" of=$BLOCKDEV
-
-cleanup
-trap - EXIT
-
-exit 0
diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb
deleted file mode 100755 (executable)
index 895d9d6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. common.sh
-
-if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
-  echo "Missing target directory"
-  exit 1
-fi
-
-mkdir $TARGET/etc/ssh/userkeys
-cat /etc/ssh/userkeys/root > $TARGET/etc/ssh/userkeys/root
-grep '^AuthorizedKeysFile /etc/ssh/userkeys' $TARGET/etc/ssh/sshd_config || echo 'AuthorizedKeysFile /etc/ssh/userkeys/%u' >> $TARGET/etc/ssh/sshd_config
-
-exit 0
diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb
deleted file mode 100755 (executable)
index e8cd1d1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-. common.sh
-
-if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
-  echo "Missing target directory"
-  exit 1
-fi
-
-dd if=/dev/zero of="$TARGET/swapfile" bs=1024k count=512
-chmod 400 "$TARGET/swapfile"
-mkswap "$TARGET/swapfile"
-
-cat >> "$TARGET/etc/fstab" <<EOF
-/swapfile none swap sw 0 0
-EOF
-
-exit 0
-
-# vim:set syn=sh:
diff --git a/modules/ganeti2/templates/instance-debootstrap/variants.list.erb b/modules/ganeti2/templates/instance-debootstrap/variants.list.erb
deleted file mode 100644 (file)
index 0e6f5b4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-default
-dsa
-dsa-wheezy
diff --git a/modules/ganeti2/templates/instance-debootstrap/variants/dsa-wheezy.conf.erb b/modules/ganeti2/templates/instance-debootstrap/variants/dsa-wheezy.conf.erb
deleted file mode 100644 (file)
index 26b6ff9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<%=
-case scope.lookupvar('::cluster')
-        when "ganeti2.debian.org" then 'MIRROR="http://mirror-ubc.debian.org/debian"'
-        when "ganeti-osuosl.debian.org" then 'MIRROR="http://debian.osuosl.org/debian"'
-       when "ganeti3.debian.org" then 'MIRROR="http://mirror.ayous.org/debian"'
-       when "ganeti-bytemark.debian.org" then 'MIRROR="http://mirror.bytemark.co.uk/debian"'
-        else 'MIRROR="http://http.debian.net/debian"'
-end
-%>
-ARCH="amd64"
-SUITE="wheezy"
diff --git a/modules/ganeti2/templates/instance-debootstrap/variants/dsa.conf.erb b/modules/ganeti2/templates/instance-debootstrap/variants/dsa.conf.erb
deleted file mode 100644 (file)
index affb973..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<%=
-case scope.lookupvar('::cluster')
-        when "ganeti2.debian.org" then 'MIRROR="http://mirror-ubc.debian.org/debian"'
-        when "ganeti-osuosl.debian.org" then 'MIRROR="http://debian.osuosl.org/debian"'
-       when "ganeti3.debian.org" then 'MIRROR="http://mirror.ayous.org/debian"'
-       when "ganeti-bytemark.debian.org" then 'MIRROR="http://mirror.bytemark.co.uk/debian"'
-        else 'MIRROR="http://http.debian.net/debian"'
-end
-%>
-ARCH="amd64"
-SUITE="squeeze"