Akosiaris has submitted this change and it was merged.

Change subject: helium backup director/storage server
......................................................................


helium backup director/storage server

Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
---
M manifests/role/backup.pp
M manifests/site.pp
2 files changed, 61 insertions(+), 12 deletions(-)

Approvals:
  Akosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index b881de4..f032d8e 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -1,10 +1,13 @@
 # A set of roles for the backup director, storage and client as they are
 # configured in WMF
 
-$director = "FILLMEIN"
+class role::backup::config {
+    $director = 'helium.eqiad.wmnet'
+    $database = 'db1001.eqiad.wmnet'
+}
 
 class role::backup::director {
-    system_role { "role::backup::director": description => "Primary Backup 
server" }
+    system_role { 'role::backup::director': description => 'Backup server' }
 
     class { 'bacula::director':
         sqlvariant          => 'mysql',
@@ -12,9 +15,9 @@
     }
 
     # One pool for all
-    bacula::director::pool { 'WMF':
+    bacula::director::pool { 'production':
         max_vols         => 30,
-        storage          => 'WMFFiles',
+        storage          => 'FileStorage1',
         volume_retention => '180 days',
     }
 
@@ -24,7 +27,15 @@
     $days = ['Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri']
 
     backup::schedule { $days:
-        pool    => 'WMF',
+        pool    => 'production',
+    }
+
+    bacula::director::catalog { 'production':
+        dbname      => 'bacula',
+        dbuser      => 'bacula',
+        dbhost      => $bacula::config::database,
+        dbport      => '3306',
+        dbpassword  => $passwords::bacula::database
     }
 
     # This has been taken straight from old files/backup/disklist-*
@@ -83,25 +94,61 @@
         includes => [ '/var/vmail' ]
     }
 
-    # The console should be on the director 
+    # The console should be on the director
     bacula::console { 'bconsole':
         director   => $::fqdn,
     }
 }
 
 class role::backup::storage() {
-    system_role { "role::backup::storage": description => "Storage backup 
server" }
+    system_role { 'role::backup::storage': description => 'Backup Storage' }
+
+    include nfs::netapp::common
 
     class { 'bacula::storage':
-        director            => $director,
+        director            => $role::backup::config::director,
         sd_max_concur_jobs  => 5,
         sqlvariant          => 'mysql',
     }
-    
-    bacula::storage::device { 'FileStorage':
+
+    # We have two storage devices to overcome any limitations from backend
+    # infrastructure (e.g. Netapp used to have only < 16T volumes)
+    file { ['/srv/bacula-sd1',
+            '/srv/bacula-sd2' ]:
+        ensure  => directory,
+        owner   => 'bacula',
+        group   => 'bacula',
+        mode    => '0660',
+        require => Class['bacula::storage'],
+    }
+
+    mount { '/srv/bacula-sd1' :
+        ensure  => mounted,
+        device  => "${nfs::netapp::common::device}:/vol/bacula-sd1",
+        fstype  => 'nfs',
+        options => "${nfs::netapp::common::options},rw",
+        require => File['/srv/bacula-sd1'],
+    }
+
+    mount { '/srv/bacula-sd2' :
+        ensure  => mounted,
+        device  => "${nfs::netapp::common::device}:/vol/bacula-sd2",
+        fstype  => 'nfs',
+        options => "${nfs::netapp::common::options},rw",
+        require => File['/srv/bacula-sd2'],
+    }
+
+    bacula::storage::device { 'FileStorage1':
         device_type     => 'File',
         media_type      => 'File',
-        archive_device  => '/srv/backups',
+        archive_device  => '/srv/bacula-sd1',
+        max_concur_jobs => 2,
+    }
+
+    bacula::storage::device { 'FileStorage2':
+        device_type     => 'File',
+        media_type      => 'File',
+        archive_device  => '/srv/bacula-sd2',
         max_concur_jobs => 2,
     }
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a0487ff..aa82d79 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1037,7 +1037,9 @@
 
 node "helium.eqiad.wmnet" {
     include standard,
-        role::poolcounter
+        role::poolcounter,
+        role::backup::director,
+        role::backup::storage
 }
 
 node "holmium.wikimedia.org" {

-- 
To view, visit https://gerrit.wikimedia.org/r/79334
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris <[email protected]>
Gerrit-Reviewer: Akosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to