class ganeti2 {
- package { 'ganeti2':
- ensure => installed
- }
+ include ganeti2::params
+ include ganeti2::firewall
- package { 'drbd8-utils':
+ $drbd = $ganeti2::params::drbd
+
+ package { 'ganeti2':
ensure => installed
}
ensure => installed
}
- @ferm::rule { 'dsa-ganeti-noded-v4':
- description => 'allow ganeti-noded communication between',
- rule => 'proto tcp mod state state (NEW) dport (1811) @subchain \'ganeti-noded\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
- notarule => true,
- }
-
- @ferm::rule { 'dsa-ganeti-confd-v4':
- description => 'allow ganeti-confd communication',
- rule => 'proto udp mod state state (NEW) dport (1814) @subchain \'ganeti-confd\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
- notarule => true,
- }
-
- @ferm::rule { 'dsa-ganeti-rapi-v4':
- description => 'allow ganeti-rapi communication',
- rule => 'proto tcp mod state state (NEW) dport (5080) @subchain \'ganeti-rapi\' { saddr ($HOST_GANETI_V4) daddr ($HOST_GANETI_V4) ACCEPT; }',
- notarule => true,
- }
-
- @ferm::rule { 'dsa-drbd-v4':
- description => 'allow drbd communication',
- rule => 'proto tcp mod state state (NEW) dport (11000:11999) @subchain \'drbd\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }',
- notarule => true,
- }
-
- @ferm::rule { 'dsa-ganeti-migrate':
- description => 'allow kvm to migrate instances',
- rule => 'proto tcp dport 8102 @subchain \'ganeti-migrate\' { saddr ($HOST_GANETI_BACKEND_V4) daddr ($HOST_GANETI_BACKEND_V4) ACCEPT; }',
- notarule => true,
- }
-
- @ferm::rule { 'dsa-ganeti-ssh':
- description => 'allow ganeti to ssh around',
- rule => 'proto tcp dport ssh @subchain \'ganeti-ssh\' { saddr ( $HOST_GANETI_V4 $HOST_GANETI_BACKEND_V4) ACCEPT; }',
- notarule => true,
+ if $drbd {
+ package { 'drbd8-utils':
+ ensure => installed
+ }
}
file {
;
'/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',
;
}