diff -Nru brightbox-mysql-system-0.4/debian/changelog brightbox-mysql-system-0.5/debian/changelog --- brightbox-mysql-system-0.4/debian/changelog 2012-12-04 19:06:31.000000000 +0000 +++ brightbox-mysql-system-0.5/debian/changelog 2012-12-10 11:07:49.000000000 +0000 @@ -1,3 +1,10 @@ +brightbox-mysql-system (0.5-1) precise; urgency=low + + * Added swap file + * Change ppa gpg keyserver to ubuntu one + + -- John Leach Mon, 10 Dec 2012 11:07:08 +0000 + brightbox-mysql-system (0.4-1) precise; urgency=low * New auth system, root authenticated by auth_socket diff -Nru brightbox-mysql-system-0.4/manifests/brightbox-mysql-system.pp brightbox-mysql-system-0.5/manifests/brightbox-mysql-system.pp --- brightbox-mysql-system-0.4/manifests/brightbox-mysql-system.pp 2012-12-04 17:35:30.000000000 +0000 +++ brightbox-mysql-system-0.5/manifests/brightbox-mysql-system.pp 2012-12-10 10:54:33.000000000 +0000 @@ -19,6 +19,11 @@ days => 3650 } +swap::file { "/.swapfile": + size => 512, + before => Class["percona::server::base"] +} + include percona::server::5_5 class { "percona::server::base": ssl => true, diff -Nru brightbox-mysql-system-0.4/modules/apt/manifests/init.pp brightbox-mysql-system-0.5/modules/apt/manifests/init.pp --- brightbox-mysql-system-0.4/modules/apt/manifests/init.pp 2012-11-01 13:18:51.000000000 +0000 +++ brightbox-mysql-system-0.5/modules/apt/manifests/init.pp 2012-12-10 11:03:52.000000000 +0000 @@ -62,7 +62,7 @@ # actually the last 8 characters of the fingeprint) define apt::key($id) { exec { "apt-key-$name": - command => "/usr/bin/apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys $id", + command => "/usr/bin/apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys $id", unless => "/usr/bin/apt-key list | /bin/grep $id", notify => Exec["apt-update"] } diff -Nru brightbox-mysql-system-0.4/modules/swap/manifests/init.pp brightbox-mysql-system-0.5/modules/swap/manifests/init.pp --- brightbox-mysql-system-0.4/modules/swap/manifests/init.pp 1970-01-01 00:00:00.000000000 +0000 +++ brightbox-mysql-system-0.5/modules/swap/manifests/init.pp 2012-10-16 14:51:10.000000000 +0000 @@ -0,0 +1,34 @@ +# name is path to the swap file +# size is in megabytes +define swap::file($size = 1024) { + + exec { "create-swap-for-$name": + creates => $name, + path => "/bin", + command => "dd if=/dev/zero of=${name} bs=1M count=${size}", + notify => Exec["mkswap-for-$name"] + } + + exec { "mkswap-for-$name": + refreshonly => true, + path => "/sbin", + command => "mkswap ${name}", + notify => Exec["swapon-for-$name"] + } + + exec { "swapon-for-$name": + refreshonly => true, + path => "/sbin", + command => "swapon ${name}" + } + + mount { $name: + device => "$name", + fstype => swap, + ensure => defined, + atboot => true, + options => defaults, + require => Exec["mkswap-for-$name"] + } + +}