diff --git a/manifests/script.pp b/manifests/script.pp index 2f7c200..ccb03ad 100644 --- a/manifests/script.pp +++ b/manifests/script.pp @@ -218,6 +218,9 @@ class sunetdrive::script ( group => 'root', mode => '0700', } + file { '/root/tasks/backupsinglenodedb.sh': + ensure => absent, + } if $environment == 'test' { sunet::scriptherder::cronjob { 'reboot-customer': cmd => '/root/tasks/reboot-customer.sh', @@ -263,8 +266,8 @@ class sunetdrive::script ( # Opt in to folder structure in projectbuckets if $customer in ['gih', 'mdu'] { sunet::scriptherder::cronjob { 'create_folders_in_project_buckets': - cmd => 'true', ensure => absent, + cmd => 'true', } file { '/root/tasks/create_folders_in_project_buckets.sh': ensure => absent, @@ -293,24 +296,21 @@ class sunetdrive::script ( warn_criteria => ['exit_status=1','max_age=2h'], } } - file { '/root/tasks/backupsinglenodedb.sh': - ensure => absent, - } - file { '/root/tasks/backupmultinodedb.sh': - ensure => file, - content => template('sunetdrive/script/backupmultinodedb.erb.sh'), - owner => 'root', - group => 'root', - mode => '0700', - } - sunet::scriptherder::cronjob { "backupmultinodedb": - cmd => "/root/tasks/backupmultinodedb.sh", - hour => '2', - minute => '0', - ok_criteria => ['exit_status=0','max_age=2d'], - warn_criteria => ['exit_status=1','max_age=3d'], - } if $customer == 'common' { + file { '/root/tasks/backupmultinodedb.sh': + ensure => file, + content => template('sunetdrive/script/backupmultinodedb.erb.sh'), + owner => 'root', + group => 'root', + mode => '0700', + } + sunet::scriptherder::cronjob { 'backupmultinodedb': + cmd => '/root/tasks/backupmultinodedb.sh', + hour => '2', + minute => '0', + ok_criteria => ['exit_status=0','max_age=2d'], + warn_criteria => ['exit_status=1','max_age=3d'], + } if $environment == 'prod' { file { '/root/tasks/aggregate.sh': ensure => file, @@ -326,15 +326,15 @@ class sunetdrive::script ( ok_criteria => ['exit_status=0','max_age=2d'], warn_criteria => ['exit_status=1','max_age=3d'], } - } + } $singlenodes.each | $singlenode| { $multinode = hiera_hash('multinode_mapping')[$singlenode]['server'] $multinodeserver = "${multinode}.${site_name}" $nccontainer = "nextcloud-${singlenode}_app_1" sunet::scriptherder::cronjob { "backup${singlenode}db": - ensure => absent, - cmd => 'true', + ensure => absent, + cmd => 'true', } sunet::scriptherder::cronjob { "listusers_${singlenode}": cmd => "/root/tasks/listusers.sh ${singlenode} ${multinodeserver}", @@ -377,6 +377,13 @@ class sunetdrive::script ( warn_criteria => ['exit_status=1','max_age=3d'], } } else { + file { '/root/tasks/backupmultinodedb.sh': + ensure => absent, + } + sunet::scriptherder::cronjob { 'backupmultinodedb': + ensure => absent, + cmd => 'true', + } sunet::scriptherder::cronjob { 'backupdb': cmd => "/root/tasks/backupdb.sh ${backup_server}", hour => '2', diff --git a/templates/application/config.php.erb b/templates/application/config.php.erb index 0faea1f..f804137 100644 --- a/templates/application/config.php.erb +++ b/templates/application/config.php.erb @@ -35,6 +35,9 @@ $CONFIG = array ( 'drive_email_template_text_left' => '<%= @drive_email_template_text_left %>', 'drive_email_template_plain_text_left' => '<%= @drive_email_template_plain_text_left %>', 'drive_email_template_url_left' => '<%= @drive_email_template_url_left %>', +<% if @location == 'sunet-test' -%> + 'filelocking.debug' => true, +<% end -%> 'forcessl' => true, 'gs.enabled' => '<%= @gs_enabled %>', 'gs.federation' => '<%= @gs_federation %>', diff --git a/templates/application/mappingfile-prod.json.erb b/templates/application/mappingfile-prod.json.erb index 4f71ad4..0f2b606 100644 --- a/templates/application/mappingfile-prod.json.erb +++ b/templates/application/mappingfile-prod.json.erb @@ -1,57 +1,57 @@ { - "/@antagning\.se$/": "antagning.drive.sunet.se", - "/bth\.se$/": "bth.drive.sunet.se", - "/chalmers\.se$/": "chalmers.drive.sunet.se", - "/du\.se$/": "du.drive.sunet.se", - "/eduid\.se$/": "extern.drive.sunet.se", - "/esh\.se$/": "esh.drive.sunet.se", - "/fhs\.se$/": "fhs.drive.sunet.se", - "/gih\.se$/": "gih.drive.sunet.se", - "/gu\.se$/": "gu.drive.sunet.se", - "/hb\.se$/": "hb.drive.sunet.se", - "/@shh\.se$/": "shh.drive.sunet.se", - "/hh\.se$/": "hh.drive.sunet.se", - "/hhs\.se$/": "hhs.drive.sunet.se", - "/hig\.se$/": "hig.drive.sunet.se", - "/his\.se$/": "his.drive.sunet.se", - "/hj\.se$/": "hj.drive.sunet.se", - "/hkr\.se$/": "hkr.drive.sunet.se", - "/hv\.se$/": "hv.drive.sunet.se", - "/irf\.se$/": "irf.drive.sunet.se", - "/kb\.se$/": "kb.drive.sunet.se", - "/ki\.se$/": "ki.drive.sunet.se", - "/kkh\.se$/": "kkh.drive.sunet.se", - "/kmh\.se$/": "kmh.drive.sunet.se", - "/konstfack\.se$/": "konstfack.drive.sunet.se", - "/kth\.se$/": "kth.drive.sunet.se", - "/kva\.se$/": "kva.drive.sunet.se", - "/liu\.se$/": "liu.drive.sunet.se", - "/lnu\.se$/": "lnu.drive.sunet.se", - "/ltu\.se$/": "ltu.drive.sunet.se", - "/lu\.se$/": "lu.drive.sunet.se", - "/mah\.se$/": "mau.drive.sunet.se", - "/mau\.se$/": "mau.drive.sunet.se", - "/mdh\.se$/": "mdu.drive.sunet.se", - "/mdu\.se$/": "mdu.drive.sunet.se", - "/miun\.se$/": "miun.drive.sunet.se", - "/nordunet\.se$/": "nordunet.drive.sunet.se", - "/nrm\.se$/": "nrm.drive.sunet.se", - "/oru\.se$/": "oru.drive.sunet.se", - "/rkh\.se$/": "rkh.drive.sunet.se", - "/sics\.se$/": "sics.drive.sunet.se", - "/slu\.se$/": "slu.drive.sunet.se", - "/smhi\.se$/": "smhi.drive.sunet.se", - "/sp\.se$/": "sp.drive.sunet.se", - "/su\.se$/": "su.drive.sunet.se", - "/sunet\.se$/": "sunet.drive.sunet.se", - "/suni\.se$/": "suni.drive.sunet.se", - "/swamid\.se$/": "swamid.drive.sunet.se", - "/ths\.se$/": "ths.drive.sunet.se", - "/uhr\.se$/": "uhr.drive.sunet.se", - "/umu\.se$/": "umu.drive.sunet.se", - "/uniarts\.se$/": "uniarts.drive.sunet.se", - "/uu\.se$/": "uu.drive.sunet.se", - "/vinnova\.se$/": "vinnova.drive.sunet.se", - "/vr\.se$/": "vr.drive.sunet.se", + "/antagning.se$/": "antagning.drive.sunet.se", + "/bth.se$/": "bth.drive.sunet.se", + "/chalmers.se$/": "chalmers.drive.sunet.se", + "/du.se$/": "du.drive.sunet.se", + "/eduid.se$/": "extern.drive.sunet.se", + "/esh.se$/": "esh.drive.sunet.se", + "/fhs.se$/": "fhs.drive.sunet.se", + "/gih.se$/": "gih.drive.sunet.se", + "/gu.se$/": "gu.drive.sunet.se", + "/hb.se$/": "hb.drive.sunet.se", + "/@shh.se$/": "shh.drive.sunet.se", + "/@hh.se$/": "hh.drive.sunet.se", + "/hhs.se$/": "hhs.drive.sunet.se", + "/hig.se$/": "hig.drive.sunet.se", + "/his.se$/": "his.drive.sunet.se", + "/hj.se$/": "hj.drive.sunet.se", + "/hkr.se$/": "hkr.drive.sunet.se", + "/hv.se$/": "hv.drive.sunet.se", + "/irf.se$/": "irf.drive.sunet.se", + "/kb.se$/": "kb.drive.sunet.se", + "/ki.se$/": "ki.drive.sunet.se", + "/kkh.se$/": "kkh.drive.sunet.se", + "/kmh.se$/": "kmh.drive.sunet.se", + "/konstfack.se$/": "konstfack.drive.sunet.se", + "/kth.se$/": "kth.drive.sunet.se", + "/kva.se$/": "kva.drive.sunet.se", + "/liu.se$/": "liu.drive.sunet.se", + "/lnu.se$/": "lnu.drive.sunet.se", + "/ltu.se$/": "ltu.drive.sunet.se", + "/lu.se$/": "lu.drive.sunet.se", + "/mah.se$/": "mau.drive.sunet.se", + "/mau.se$/": "mau.drive.sunet.se", + "/mdh.se$/": "mdu.drive.sunet.se", + "/mdu.se$/": "mdu.drive.sunet.se", + "/miun.se$/": "miun.drive.sunet.se", + "/nordunet.se$/": "nordunet.drive.sunet.se", + "/nrm.se$/": "nrm.drive.sunet.se", + "/oru.se$/": "oru.drive.sunet.se", + "/rkh.se$/": "rkh.drive.sunet.se", + "/sics.se$/": "sics.drive.sunet.se", + "/slu.se$/": "slu.drive.sunet.se", + "/smhi.se$/": "smhi.drive.sunet.se", + "/sp.se$/": "sp.drive.sunet.se", + "/su.se$/": "su.drive.sunet.se", + "/sunet.se$/": "sunet.drive.sunet.se", + "/suni.se$/": "suni.drive.sunet.se", + "/swamid.se$/": "swamid.drive.sunet.se", + "/ths.se$/": "ths.drive.sunet.se", + "/uhr.se$/": "uhr.drive.sunet.se", + "/umu.se$/": "umu.drive.sunet.se", + "/uniarts.se$/": "uniarts.drive.sunet.se", + "/uu.se$/": "uu.drive.sunet.se", + "/vinnova.se$/": "vinnova.drive.sunet.se", + "/vr.se$/": "vr.drive.sunet.se", "/$/": "extern.drive.sunet.se" } diff --git a/templates/application/mappingfile-test.json.erb b/templates/application/mappingfile-test.json.erb index f4429db..b74ecb8 100644 --- a/templates/application/mappingfile-test.json.erb +++ b/templates/application/mappingfile-test.json.erb @@ -1,57 +1,57 @@ { - "/antagning\.se$/": "antagning.drive.test.sunet.se", - "/bth\.se$/": "bth.drive.test.sunet.se", - "/chalmers\.se$/": "chalmers.drive.test.sunet.se", - "/du\.se$/": "du.drive.test.sunet.se", - "/eduid\.se$/": "extern.drive.test.sunet.se", - "/esh\.se$/": "esh.drive.test.sunet.se", - "/fhs\.se$/": "fhs.drive.test.sunet.se", - "/gih\.se$/": "gih.drive.test.sunet.se", - "/gu\.se$/": "gu.drive.test.sunet.se", - "/hb\.se$/": "hb.drive.test.sunet.se", - "/@shh\.se$/": "shh.drive.test.sunet.se", - "/hh\.se$/": "hh.drive.test.sunet.se", - "/hhs\.se$/": "hhs.drive.test.sunet.se", - "/hig\.se$/": "hig.drive.test.sunet.se", - "/his\.se$/": "his.drive.test.sunet.se", - "/hj\.se$/": "hj.drive.test.sunet.se", - "/hkr\.se$/": "hkr.drive.test.sunet.se", - "/hv\.se$/": "hv.drive.test.sunet.se", - "/irf\.se$/": "irf.drive.test.sunet.se", - "/kb\.se$/": "kb.drive.test.sunet.se", - "/ki\.se$/": "ki.drive.test.sunet.se", - "/kkh\.se$/": "kkh.drive.test.sunet.se", - "/kmh\.se$/": "kmh.drive.test.sunet.se", - "/konstfack\.se$/": "konstfack.drive.test.sunet.se", - "/kth\.se$/": "kth.drive.test.sunet.se", - "/kva\.se$/": "kva.drive.test.sunet.se", - "/liu\.se$/": "liu.drive.test.sunet.se", - "/lnu\.se$/": "lnu.drive.test.sunet.se", - "/ltu\.se$/": "ltu.drive.test.sunet.se", - "/lu\.se$/": "lu.drive.test.sunet.se", - "/mah\.se$/": "mau.drive.test.sunet.se", - "/mau\.se$/": "mau.drive.test.sunet.se", - "/mdh\.se$/": "mdu.drive.test.sunet.se", - "/mdu\.se$/": "mdu.drive.test.sunet.se", - "/miun\.se$/": "miun.drive.test.sunet.se", - "/nordunet\.se$/": "nordunet.drive.test.sunet.se", - "/nrm\.se$/": "nrm.drive.test.sunet.se", - "/oru\.se$/": "oru.drive.test.sunet.se", - "/rkh\.se$/": "rkh.drive.test.sunet.se", - "/sics\.se$/": "sics.drive.test.sunet.se", - "/slu\.se$/": "slu.drive.test.sunet.se", - "/smhi\.se$/": "smhi.drive.test.sunet.se", - "/sp\.se$/": "sp.drive.test.sunet.se", - "/su\.se$/": "su.drive.test.sunet.se", - "/sunet\.se$/": "sunet.drive.test.sunet.se", - "/suni\.se$/": "suni.drive.test.sunet.se", - "/swamid\.se$/": "swamid.drive.test.sunet.se", - "/ths\.se$/": "ths.drive.test.sunet.se", - "/uhr\.se$/": "uhr.drive.test.sunet.se", - "/umu\.se$/": "umu.drive.test.sunet.se", - "/uniarts\.se$/": "uniarts.drive.test.sunet.se", - "/uu\.se$/": "uu.drive.test.sunet.se", - "/vinnova\.se$/": "vinnova.drive.test.sunet.se", - "/vr\.se$/": "vr.drive.test.sunet.se", + "/antagning.se$/": "antagning.drive.test.sunet.se", + "/bth.se$/": "bth.drive.test.sunet.se", + "/chalmers.se$/": "chalmers.drive.test.sunet.se", + "/du.se$/": "du.drive.test.sunet.se", + "/eduid.se$/": "extern.drive.test.sunet.se", + "/esh.se$/": "esh.drive.test.sunet.se", + "/fhs.se$/": "fhs.drive.test.sunet.se", + "/gih.se$/": "gih.drive.test.sunet.se", + "/gu.se$/": "gu.drive.test.sunet.se", + "/hb.se$/": "hb.drive.test.sunet.se", + "/@shh.se$/": "shh.drive.test.sunet.se", + "/@hh.se$/": "hh.drive.test.sunet.se", + "/hhs.se$/": "hhs.drive.test.sunet.se", + "/hig.se$/": "hig.drive.test.sunet.se", + "/his.se$/": "his.drive.test.sunet.se", + "/hj.se$/": "hj.drive.test.sunet.se", + "/hkr.se$/": "hkr.drive.test.sunet.se", + "/hv.se$/": "hv.drive.test.sunet.se", + "/irf.se$/": "irf.drive.test.sunet.se", + "/kb.se$/": "kb.drive.test.sunet.se", + "/ki.se$/": "ki.drive.test.sunet.se", + "/kkh.se$/": "kkh.drive.test.sunet.se", + "/kmh.se$/": "kmh.drive.test.sunet.se", + "/konstfack.se$/": "konstfack.drive.test.sunet.se", + "/kth.se$/": "kth.drive.test.sunet.se", + "/kva.se$/": "kva.drive.test.sunet.se", + "/liu.se$/": "liu.drive.test.sunet.se", + "/lnu.se$/": "lnu.drive.test.sunet.se", + "/ltu.se$/": "ltu.drive.test.sunet.se", + "/lu.se$/": "lu.drive.test.sunet.se", + "/mah.se$/": "mau.drive.test.sunet.se", + "/mau.se$/": "mau.drive.test.sunet.se", + "/mdh.se$/": "mdu.drive.test.sunet.se", + "/mdu.se$/": "mdu.drive.test.sunet.se", + "/miun.se$/": "miun.drive.test.sunet.se", + "/nordunet.se$/": "nordunet.drive.test.sunet.se", + "/nrm.se$/": "nrm.drive.test.sunet.se", + "/oru.se$/": "oru.drive.test.sunet.se", + "/rkh.se$/": "rkh.drive.test.sunet.se", + "/sics.se$/": "sics.drive.test.sunet.se", + "/slu.se$/": "slu.drive.test.sunet.se", + "/smhi.se$/": "smhi.drive.test.sunet.se", + "/sp.se$/": "sp.drive.test.sunet.se", + "/su.se$/": "su.drive.test.sunet.se", + "/sunet.se$/": "sunet.drive.test.sunet.se", + "/suni.se$/": "suni.drive.test.sunet.se", + "/swamid.se$/": "swamid.drive.test.sunet.se", + "/ths.se$/": "ths.drive.test.sunet.se", + "/uhr.se$/": "uhr.drive.test.sunet.se", + "/umu.se$/": "umu.drive.test.sunet.se", + "/uniarts.se$/": "uniarts.drive.test.sunet.se", + "/uu.se$/": "uu.drive.test.sunet.se", + "/vinnova.se$/": "vinnova.drive.test.sunet.se", + "/vr.se$/": "vr.drive.test.sunet.se", "/$/": "extern.drive.test.sunet.se" }