]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/ganeti2/manifests/init.pp
wheezy
[dsa-puppet.git] / modules / ganeti2 / manifests / init.pp
index 7a472e07329278dcdb87a8e2e40c7b0c86b73e83..743a29d51a68ff1061c6caf0249c099a9ee7a1bc 100644 (file)
@@ -1,16 +1,64 @@
 class ganeti2 {
 
+       include ganeti2::params
+       include ganeti2::firewall
+
+       $drbd = $ganeti2::params::drbd
+
        package { 'ganeti2':
                ensure => installed
        }
 
-       package { 'drbd8-utils':
+       package { 'ganeti-instance-debootstrap':
+               ensure => installed
+       }
+
+       package { 'ganeti-htools':
                ensure => installed
        }
 
-       @ferm::rule { 'dsa-ganeti-v4':
-               description => 'Allow ganeti from ganeti master',
-               rule        => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti\' { saddr ($HOST_GANETI_V4) ACCEPT; }',
-               notarule    => true,
+       if $drbd {
+               package { 'drbd8-utils':
+                       ensure => installed
+               }
+       }
+
+       file {
+               '/etc/ganeti/instance-debootstrap/variants.list':
+                       content => template('ganeti2/instance-debootstrap/variants.list.erb'),
+                       ;
+               '/etc/ganeti/instance-debootstrap/variants/dsa.conf':
+                       content => template('ganeti2/instance-debootstrap/variants/dsa.conf.erb'),
+                       ;
+               '/etc/ganeti/instance-debootstrap/variants/dsa-wheezy.conf':
+                       content => template('ganeti2/instance-debootstrap/variants/dsa-wheezy.conf.erb'),
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/00-dsa-configure-networking':
+                       content => template('ganeti2/instance-debootstrap/hooks/00-dsa-configure-networking.erb'),
+                       mode   => '0555',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/10-dsa-install-extra-packages':
+                       content => template('ganeti2/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb'),
+                       mode   => '0555',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/20-dsa-install-bootloader':
+                       content => template('ganeti2/instance-debootstrap/hooks/20-dsa-install-bootloader.erb'),
+                       mode   => '0555',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/30-dsa-install-ssh-keys':
+                       content => template('ganeti2/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb'),
+                       mode   => '0555',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/40-dsa-setup-swapfile':
+                       content => template('ganeti2/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb'),
+                       mode   => '0555',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/clear-root-password':
+                       mode   => '0444',
+                       ;
+               '/etc/ganeti/instance-debootstrap/hooks/xen-hvc0':
+                       mode   => '0444',
+                       ;
        }
+
 }