Alexandros Kosiaris has submitted this change and it was merged.

Change subject: scap: Add co-master configuration
......................................................................


scap: Add co-master configuration

Configuration for scap to facilitate master-master replication.

Needed by: I3d2b4e7495d75540c914b2eb999124ad1ee6f8b0
Bug: T104826
Change-Id: I5c0a1fd283cc545ab073a514e933a87d5fe23996
---
M hieradata/common/scap/dsh.yaml
M modules/scap/manifests/dsh.pp
M modules/scap/manifests/master.pp
3 files changed, 34 insertions(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/hieradata/common/scap/dsh.yaml b/hieradata/common/scap/dsh.yaml
index 94f9969..a3bbfd7 100644
--- a/hieradata/common/scap/dsh.yaml
+++ b/hieradata/common/scap/dsh.yaml
@@ -14,3 +14,7 @@
   - "mw2119.codfw.wmnet" # B4 codfw
 #  - "mw2148.codfw.wmnet" # C3 codfw
   - "mw2187.codfw.wmnet" # C4 codfw
+
+scap_masters:
+  - "tin.eqiad.wmnet"
+  - "mira.codfw.wmnet"
diff --git a/modules/scap/manifests/dsh.pp b/modules/scap/manifests/dsh.pp
index 2b47a6f..15ddb72 100644
--- a/modules/scap/manifests/dsh.pp
+++ b/modules/scap/manifests/dsh.pp
@@ -1,10 +1,23 @@
 # == Class scap::dsh
 #
 # Sets up dsh config files alone, without actually
-# setting up dsh. Useful primarily for monitoring
+# setting up dsh. Useful primarily for monitoring and deploy servers.
+#
+# == Paramters:
+# [*group_source*]
+#   Puppet file source for /etc/dsh/group.
+#   Default 'puppet:///modules/dsh/group'
+#
+# [*scap_proxies*]
+#   List of FQDNs for servers to be used as scap rsync proxies. Default []
+#
+# [*scap_masters*]
+#   List of FQDNs for servers to be used as scap masters. Default []
+#
 class scap::dsh (
     $group_source = 'puppet:///modules/scap/dsh/group',
     $scap_proxies = [],
+    $scap_masters = [],
 ){
     file { '/etc/dsh':
         ensure => directory,
@@ -27,6 +40,13 @@
         mode    => '0444',
     }
 
+    file { '/etc/dsh/group/scap-masters':
+        content => join($scap_masters, "\n"),
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+    }
+
     file { '/etc/dsh/dsh.conf':
         owner  => 'root',
         group  => 'root',
diff --git a/modules/scap/manifests/master.pp b/modules/scap/manifests/master.pp
index 76e4b91..e033ca4 100644
--- a/modules/scap/manifests/master.pp
+++ b/modules/scap/manifests/master.pp
@@ -37,4 +37,13 @@
     class { 'scap::l10nupdate':
         deployment_group => $deployment_group,
     }
+
+    # Allow rsync of common module to mediawiki-staging as GID=wikidev
+    # This is for master-master sync of /srv/mediawiki-staging
+    sudo::user { 'scap-master-sync':
+        user       => 'mwdeploy',
+        privileges => [
+            'ALL = (mwdeploy:wikidev) NOPASSWD: /usr/bin/rsync *\:\:common 
/srv/mediawiki-staging',
+        ]
+    }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c0a1fd283cc545ab073a514e933a87d5fe23996
Gerrit-PatchSet: 11
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to