Pyoungmeister has submitted this change and it was merged.

Change subject: beta: adapt lucene search cron for beta
......................................................................


beta: adapt lucene search cron for beta

sync-conf-from-common had harcoded 10.5.0.8 IP addresses, abstracted
that out to three new configuration variables that varies based on the
realm.  Also made all-labs.dblist to be used when on labs.

Change-Id: I4421ab8913e54e1343fa22b779a14424ff69d7df
---
M manifests/search.pp
1 file changed, 14 insertions(+), 1 deletion(-)

Approvals:
  Demon: Looks good to me, but someone else must approve
  Pyoungmeister: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/search.pp b/manifests/search.pp
index e651a27..81c54bc 100644
--- a/manifests/search.pp
+++ b/manifests/search.pp
@@ -77,14 +77,27 @@
                                }
                }
 
+               # Conf for sync-conf-from-common cronjob
+               if $::realm == 'production' {
+                       $sync_conf_all_dblist = '10.0.5.8::common/all.dblist'
+                       $sync_conf_initialisesettings = 
'10.0.5.8::common/wmf-config/InitialiseSettings.php'
+                       $sync_conf_messages = 
'10.0.5.8::common/php/languages/messages'
+               } else {
+                       $sync_conf_all_dblist = 
'/data/project/apache/common/all-labs.dblist'
+                       $sync_conf_initialisesettings = 
'/data/project/apache/common/wmf-config/InitialiseSettings.php'
+                       $sync_conf_messages = 
'/data/project/apache/common/php-master/languages/messages'
+               }
                cron {
                        ## to occassionally poll for mediawiki configs
                        sync-conf-from-common:
                                require => File["/a/search/conf"],
-                               command => 'rsync -a --delete 
--exclude=**/.svn/lock --no-perms 10.0.5.8::common/all.dblist /a/search/conf/ 
&& rsync -a --delete --exclude=**/.svn/lock --no-perms 
10.0.5.8::common/wmf-config/InitialiseSettings.php /a/search/conf/ && rsync -a 
--delete --exclude=**/.svn/lock --no-perms 
10.0.5.8::common/php/languages/messages /a/search/conf/',
+                               command => "rsync -a --delete 
--exclude=**/.svn/lock --no-perms ${sync_conf_all_dblist} /a/search/conf/ && 
rsync -a --delete --exclude=**/.svn/lock --no-perms 
${sync_conf_initialisesettings} /a/search/conf/ && rsync -a --delete 
--exclude=**/.svn/lock --no-perms ${sync_conf_messages} /a/search/conf/",
                                user => lsearch,
                                minute => 15,
                                ensure => present;
+               }
+
+               cron {
                        ## this is to compliment log4j's log rotation. we want 
to use log4j's logrotate ability, as it's easier on the system,
                        ## but log4j does not yet have "delete old logs" 
capability :/
                        delete-old-logs:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4421ab8913e54e1343fa22b779a14424ff69d7df
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Pyoungmeister <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to