ArielGlenn has submitted this change and it was merged.
Change subject: move wikidata json, ttl dumps cron job to snapshot1007
......................................................................
move wikidata json, ttl dumps cron job to snapshot1007
also remove ensure parameter, tiny cleanup
Bug: T133694
Change-Id: I2e218d46035a6a4fe43f7a9fc646025083e81a1c
---
M modules/role/manifests/snapshot/cron/primary.pp
M modules/role/manifests/snapshot/cron/secondary.pp
M modules/role/manifests/snapshot/cronjobs.pp
M modules/snapshot/manifests/cron/wikidatadumps/json.pp
M modules/snapshot/manifests/cron/wikidatadumps/ttl.pp
M modules/snapshot/templates/cron/wikidatadumps-shared.sh.erb
6 files changed, 6 insertions(+), 45 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/role/manifests/snapshot/cron/primary.pp
b/modules/role/manifests/snapshot/cron/primary.pp
index ca9716c..a450851 100644
--- a/modules/role/manifests/snapshot/cron/primary.pp
+++ b/modules/role/manifests/snapshot/cron/primary.pp
@@ -1,14 +1,6 @@
class role::snapshot::cron::primary {
include role::snapshot::common
- class { 'snapshot::cron::wikidatadumps::json':
- enable => true,
- user => 'datasets',
- }
- class { 'snapshot::cron::wikidatadumps::ttl':
- enable => true,
- user => 'datasets',
- }
class { 'snapshot::addschanges':
enable => true,
user => 'datasets',
diff --git a/modules/role/manifests/snapshot/cron/secondary.pp
b/modules/role/manifests/snapshot/cron/secondary.pp
index 83c55b4..cbb28ac 100644
--- a/modules/role/manifests/snapshot/cron/secondary.pp
+++ b/modules/role/manifests/snapshot/cron/secondary.pp
@@ -1,14 +1,6 @@
class role::snapshot::cron::secondary {
include role::snapshot::common
- class { 'snapshot::cron::wikidatadumps::json':
- enable => false,
- user => 'datasets',
- }
- class { 'snapshot::cron::wikidatadumps::ttl':
- enable => false,
- user => 'datasets',
- }
class { 'snapshot::addschanges':
enable => false,
user => 'datasets',
diff --git a/modules/role/manifests/snapshot/cronjobs.pp
b/modules/role/manifests/snapshot/cronjobs.pp
index 1d58195..0d752d9 100644
--- a/modules/role/manifests/snapshot/cronjobs.pp
+++ b/modules/role/manifests/snapshot/cronjobs.pp
@@ -5,4 +5,6 @@
class { '::snapshot::cron::cirrussearch': user => 'datasets' }
class { '::snapshot::cron::centralauthdump': user => 'datasets' }
class { '::snapshot::cron::dumplists': user => 'datasets' }
+ class { '::snapshot::cron::wikidatadumps::json': user => 'datasets' }
+ class { '::snapshot::cron::wikidatadumps::ttl': user => 'datasets' }
}
diff --git a/modules/snapshot/manifests/cron/wikidatadumps/json.pp
b/modules/snapshot/manifests/cron/wikidatadumps/json.pp
index 7ef3c9e..4618213 100644
--- a/modules/snapshot/manifests/cron/wikidatadumps/json.pp
+++ b/modules/snapshot/manifests/cron/wikidatadumps/json.pp
@@ -1,20 +1,7 @@
class snapshot::cron::wikidatadumps::json(
- $enable = true,
$user = undef,
) {
include snapshot::cron::wikidatadumps::common
-
- if ($enable == true) {
- $ensure = 'present'
- }
- else {
- $ensure = 'absent'
- }
-
- system::role { 'snapshot::wikidatadumps::json':
- ensure => $ensure,
- description => 'producer of weekly wikidata json dumps'
- }
$scriptPath = '/usr/local/bin/dumpwikidatajson.sh'
file { $scriptPath:
@@ -26,7 +13,7 @@
}
cron { 'wikidatajson-dump':
- ensure => $ensure,
+ ensure => 'present',
command => $scriptPath,
user => $user,
minute => '15',
diff --git a/modules/snapshot/manifests/cron/wikidatadumps/ttl.pp
b/modules/snapshot/manifests/cron/wikidatadumps/ttl.pp
index f200df9..ce71051 100644
--- a/modules/snapshot/manifests/cron/wikidatadumps/ttl.pp
+++ b/modules/snapshot/manifests/cron/wikidatadumps/ttl.pp
@@ -1,20 +1,7 @@
class snapshot::cron::wikidatadumps::ttl(
- $enable = true,
$user = undef,
) {
include snapshot::cron::wikidatadumps::common
-
- if ($enable == true) {
- $ensure = 'present'
- }
- else {
- $ensure = 'absent'
- }
-
- system::role { 'snapshot::wikidatadumps::ttl':
- ensure => $ensure,
- description => 'producer of weekly wikidata ttl dumps'
- }
$scriptPath = '/usr/local/bin/dumpwikidatattl.sh'
file { $scriptPath:
@@ -26,7 +13,7 @@
}
cron { 'wikidatattl-dump':
- ensure => $ensure,
+ ensure => 'present',
command => $scriptPath,
user => $user,
minute => '0',
diff --git a/modules/snapshot/templates/cron/wikidatadumps-shared.sh.erb
b/modules/snapshot/templates/cron/wikidatadumps-shared.sh.erb
index 348e8f4..50ec3ef 100644
--- a/modules/snapshot/templates/cron/wikidatadumps-shared.sh.erb
+++ b/modules/snapshot/templates/cron/wikidatadumps-shared.sh.erb
@@ -8,7 +8,8 @@
#
# Marius Hoch < [email protected] >
-configfile="<%= scope.lookupvar('snapshot::dumps::dirs::dumpsdir')
-%>/confs/wikidump.conf"
+confdir="<%= scope.lookupvar('snapshot::dumps::dirs::dumpsdir') -%>/confs"
+configfile="${confdir}/wikidump.conf"
today=`date +'%Y%m%d'`
daysToKeep=70
--
To view, visit https://gerrit.wikimedia.org/r/300903
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e218d46035a6a4fe43f7a9fc646025083e81a1c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits