From 993f7c5f782505bfd0fe89d731dee0825377cf03 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 6 Aug 2012 08:19:26 -0500 Subject: [PATCH] Rename backup to bup. Naming it after what it installs. Also, split the target cronjob into a define. Change-Id: I73a4383f529c60bc35c60241dfc91508965d755e Reviewed-on: https://review.openstack.org/10885 Reviewed-by: Clark Boylan Reviewed-by: James E. Blair Approved: Monty Taylor Tested-by: Jenkins --- modules/{backup => bup}/manifests/init.pp | 8 +------- modules/bup/manifests/site.pp | 8 ++++++++ modules/openstack_project/manifests/jenkins_dev.pp | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) rename modules/{backup => bup}/manifests/init.pp (51%) create mode 100644 modules/bup/manifests/site.pp diff --git a/modules/backup/manifests/init.pp b/modules/bup/manifests/init.pp similarity index 51% rename from modules/backup/manifests/init.pp rename to modules/bup/manifests/init.pp index 1bcbad175b..2dc807a760 100644 --- a/modules/backup/manifests/init.pp +++ b/modules/bup/manifests/init.pp @@ -1,4 +1,4 @@ -class backup ($backup_user, $backup_server) { +class bup { package { "bup": ensure => present } @@ -20,10 +20,4 @@ class backup ($backup_user, $backup_server) { " } - cron { "bup-rs-ord": - user => root, - hour => "5", - minute => "37", - command => "tar -X /etc/bup-excludes -cPf - / | bup split -r $backup_user@$backup_server: -n root -q", - } } diff --git a/modules/bup/manifests/site.pp b/modules/bup/manifests/site.pp new file mode 100644 index 0000000000..fd68e30a82 --- /dev/null +++ b/modules/bup/manifests/site.pp @@ -0,0 +1,8 @@ +define bup::site($backup_user, $backup_server) { + cron { "bup-$name": + user => root, + hour => "5", + minute => "37", + command => "tar -X /etc/bup-excludes -cPf - / | bup split -r $backup_user@$backup_server: -n root -q", + } +} diff --git a/modules/openstack_project/manifests/jenkins_dev.pp b/modules/openstack_project/manifests/jenkins_dev.pp index df4af0aa03..661dc094d3 100644 --- a/modules/openstack_project/manifests/jenkins_dev.pp +++ b/modules/openstack_project/manifests/jenkins_dev.pp @@ -2,7 +2,8 @@ class openstack_project::jenkins_dev { class { 'openstack_project::server': iptables_public_tcp_ports => [80, 443, 4155] } - class { 'backup': + include bup + bup::site { 'rs-ord': backup_user => 'bup-jenkins-dev', backup_server => 'ci-backup-rs-ord.openstack.org' }