Ottomata has uploaded a new change for review.
https://gerrit.wikimedia.org/r/171543
Change subject: Use mysql::config::client to render a research pw file readable
by the stats user.
......................................................................
Use mysql::config::client to render a research pw file readable by the stats
user.
Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272
---
M manifests/misc/statistics.pp
1 file changed, 22 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/43/171543/1
diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 4f95894..87721dc 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -709,14 +709,14 @@
# then rsyncs those files to stat1001 so they can be served publicly
class misc::statistics::limn::mobile_data_sync {
include misc::statistics::base
- include passwords::mysql::research
+ include misc::statistics::stats_researchdb_password
$working_path = $misc::statistics::base::working_path
$source_dir = "${working_path}/limn-mobile-data"
$command = "${source_dir}/generate.py"
$config = "${source_dir}/mobile/"
- $mysql_credentials = "${working_path}/.my.cnf.research"
+ $mysql_credentials = '/etc/mysql/conf.d/stats-research-client.cnf'
$rsync_from = "${working_path}/limn-public-data"
$output = "${rsync_from}/mobile/datafiles"
$log = '/var/log/limn-mobile-data.log'
@@ -741,11 +741,12 @@
mode => '0660',
}
- file { $mysql_credentials:
- owner => $user,
- group => $user,
- mode => '0600',
- content => template('misc/mysql-config-research.erb'),
+ # This path is used in the limn-mobile-data config.
+ # Symlink this until they change it.
+ #
https://github.com/wikimedia/analytics-limn-mobile-data/blob/2321a6a0976b1805e79fecd495cf12ed7c6565a0/mobile/config.yaml#L5
+ file { "${working_path}/.my.cnf.research":
+ ensure => 'link',
+ target => $mysql_credentials,
}
file { [$source_dir, $rsync_from, $output]:
@@ -1026,3 +1027,17 @@
mode => '0440',
}
}
+
+# Same as above, but renders a file readable by the stats user.
+class misc::statistics::stats_researchdb_password {
+ include misc::statistics::user
+
+ # This file will render at
+ # /etc/mysql/conf.d/research-client.cnf.
+ mysql::config::client { 'stats-research':
+ user => $::passwords::mysql::research::user,
+ pass => $::passwords::mysql::research::pass,
+ group => $misc::statistics::user::username,
+ mode => '0440',
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/171543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icec6a5d9cf78c8224697575af7db651f4d004272
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits