Hello Ottomata,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/94293
to review the following change.
Change subject: Split geowiki paths in base path and scripts
......................................................................
Split geowiki paths in base path and scripts
This preparation step allows to move the checkout of the geowiki
scripts around more easily in follow-up commits.
Change-Id: I80ea50c0fcc9e53f1f1a92a1ef0a7aa7f08179f3
---
M manifests/misc/statistics.pp
1 file changed, 14 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/93/94293/1
diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 5474528..163a413 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -820,10 +820,11 @@
require misc::statistics::user
$geowiki_user = $misc::statistics::user::username
- $geowiki_path = '/a/geowiki'
+ $geowiki_base_path = '/a/geowiki'
+ $geowiki_scripts_path = "${geowiki_base_path}"
git::clone { 'geowiki':
- directory => $geowiki_path,
+ directory => $geowiki_scripts_path,
origin => "https://gerrit.wikimedia.org/r/p/analytics/geowiki.git",
ensure => 'latest',
owner => $geowiki_user,
@@ -839,12 +840,12 @@
passwords::mysql::research
$geowiki_user = $misc::statistics::geowiki::geowiki_user
- $geowiki_path = $misc::statistics::geowiki::geowiki_path
+ $geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path
$research_mysql_user = $passwords::mysql::research::user
$research_mysql_pass = $passwords::mysql::research::pass
- $conf_file = "${geowiki_path}/.research.my.cnf"
+ $conf_file = "${geowiki_base_path}/.research.my.cnf"
file { $conf_file:
owner => $geowiki_user,
group => $geowiki_user,
@@ -875,7 +876,8 @@
geoip
$geowiki_user = $misc::statistics::geowiki::geowiki_user
- $geowiki_path = $misc::statistics::geowiki::geowiki_path
+ $geowiki_base_path = $misc::statistics::geowiki::geowiki_base_path
+ $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path
$geowiki_mysql_research_conf_file =
$misc::statistics::geowiki::mysql::conf::research::conf_file
@@ -883,7 +885,7 @@
$globaldev_mysql_user = $passwords::mysql::globaldev::user
$globaldev_mysql_pass = $passwords::mysql::globaldev::pass
- $geowiki_mysql_globaldev_conf_file = "${geowiki_path}/.globaldev.my.cnf"
+ $geowiki_mysql_globaldev_conf_file =
"${geowiki_base_path}/.globaldev.my.cnf"
file { $geowiki_mysql_globaldev_conf_file:
owner => $geowiki_user,
group => $geowiki_user,
@@ -895,7 +897,7 @@
",
}
- $geowiki_backups_path = "${geowiki_path}/geowiki-backup-data"
+ $geowiki_backups_path = "${geowiki_base_path}/geowiki-backup-data"
file { $geowiki_backups_path:
ensure => 'directory',
owner => $geowiki_user,
@@ -910,7 +912,7 @@
minute => 0,
hour => 12,
user => $geowiki_user,
- command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o
${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv
--daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0
day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file}
--dest_sql_cnf=${geowiki_mysql_research_conf_file}",
+ command => "/usr/bin/python
${geowiki_scripts_path}/geowiki/process_data.py -o ${$geowiki_backups_path}
--wpfiles ${geowiki_scripts_path}/geowiki/data/all_ids.tsv --daily
--start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 day'
+\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_mysql_globaldev_conf_file}
--dest_sql_cnf=${geowiki_mysql_research_conf_file}",
require => File[$geowiki_backups_path],
}
}
@@ -925,7 +927,7 @@
misc::statistics::packages::python
$geowiki_user = $misc::statistics::geowiki::geowiki_user
- $geowiki_path = $misc::statistics::geowiki::geowiki_path
+ $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path
$geowiki_data_path = '/a/geowiki-data'
$geowiki_mysql_research_conf_file =
$misc::statistics::geowiki::mysql::conf::research::conf_file
@@ -946,7 +948,7 @@
minute => 0,
hour => 15,
user => $geowiki_user,
- command => "${geowiki_path}/scripts/make_and_push_limn_files.sh
--cron-mode --basedir=${geowiki_data_path}
--source_sql_cnf=${geowiki_mysql_research_conf_file}",
+ command =>
"${geowiki_scripts_path}/scripts/make_and_push_limn_files.sh --cron-mode
--basedir=${geowiki_data_path}
--source_sql_cnf=${geowiki_mysql_research_conf_file}",
require => [
Git::Clone['geowiki'],
Git::Clone['geowiki-data'],
@@ -966,7 +968,7 @@
require misc::statistics::geowiki
$geowiki_user = $misc::statistics::geowiki::geowiki_user
- $geowiki_path = $misc::statistics::geowiki::geowiki_path
+ $geowiki_scripts_path = $misc::statistics::geowiki::geowiki_scripts_path
# cron job to fetch geowiki data via http://gp.wmflabs.org/
# and checks that the files are up-to-date and within
@@ -975,7 +977,7 @@
minute => 30,
hour => 21,
user => $geowiki_user,
- command => "${geowiki_path}/scripts/check_web_page.sh",
+ command => "${geowiki_scripts_path}/scripts/check_web_page.sh",
# Disabled for now due to restructuring of geowiki
ensure => absent,
}
--
To view, visit https://gerrit.wikimedia.org/r/94293
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80ea50c0fcc9e53f1f1a92a1ef0a7aa7f08179f3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits