Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275814

Change subject: parsoid::testing: use master_dc variables
......................................................................

parsoid::testing: use master_dc variables

Bug: T124670
Change-Id: Ia97446f7a4278e95db2e9daff71e527b90825967
---
M modules/role/manifests/parsoid/rt_client.pp
M modules/role/manifests/parsoid/testing.pp
M modules/testreduce/manifests/client.pp
R modules/testreduce/templates/parsoid-rt-client.config.js.erb
R modules/testreduce/templates/parsoid-rt-client.rttest.localsettings.js.erb
R modules/testreduce/templates/parsoid-vd-client.config.js.erb
6 files changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/275814/1

diff --git a/modules/role/manifests/parsoid/rt_client.pp 
b/modules/role/manifests/parsoid/rt_client.pp
index 57d218a..7b3515b 100644
--- a/modules/role/manifests/parsoid/rt_client.pp
+++ b/modules/role/manifests/parsoid/rt_client.pp
@@ -3,11 +3,11 @@
     include ::testreduce
 
     file { 
'/srv/parsoid/src/tests/testreduce/parsoid-rt-client.rttest.localsettings.js':
-        source => 
'puppet:///modules/testreduce/parsoid-rt-client.rttest.localsettings.js',
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        notify => Service['parsoid-rt-client'],
+        content => 
template('testreduce/parsoid-rt-client.rttest.localsettings.js.erb'),
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+        notify  => Service['parsoid-rt-client'],
     }
 
     testreduce::client { 'parsoid-rt-client':
diff --git a/modules/role/manifests/parsoid/testing.pp 
b/modules/role/manifests/parsoid/testing.pp
index 239f9a7..93e92a6 100644
--- a/modules/role/manifests/parsoid/testing.pp
+++ b/modules/role/manifests/parsoid/testing.pp
@@ -61,11 +61,11 @@
 
     # Use this parsoid instance for parsoid rt-testing
     file { '/srv/parsoid/src/localsettings.js':
-        source => 
'puppet:///modules/testreduce/parsoid-rt-client.rttest.localsettings.js',
-        owner  => 'root',
-        group  => 'wikidev',
-        mode   => '0444',
-        before => Service['parsoid'],
+        content => 
template('testreduce/parsoid-rt-client.rttest.localsettings.js.erb'),
+        owner   => 'root',
+        group   => 'wikidev',
+        mode    => '0444',
+        before  => Service['parsoid'],
     }
 
     service { 'parsoid':
diff --git a/modules/testreduce/manifests/client.pp 
b/modules/testreduce/manifests/client.pp
index e1662fd..ffcf516 100644
--- a/modules/testreduce/manifests/client.pp
+++ b/modules/testreduce/manifests/client.pp
@@ -9,11 +9,11 @@
     $instance_name
 ) {
     file { "/etc/testreduce/${instance_name}.config.js":
-        source => "puppet:///modules/testreduce/${instance_name}.config.js",
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        notify => Service[$instance_name],
+        content => template("testreduce/${instance_name}.config.js.erb"),
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+        notify  => Service[$instance_name],
     }
 
     file { "/lib/systemd/system/${instance_name}.service":
diff --git a/modules/testreduce/files/parsoid-rt-client.config.js 
b/modules/testreduce/templates/parsoid-rt-client.config.js.erb
similarity index 100%
rename from modules/testreduce/files/parsoid-rt-client.config.js
rename to modules/testreduce/templates/parsoid-rt-client.config.js.erb
diff --git a/modules/testreduce/files/parsoid-rt-client.rttest.localsettings.js 
b/modules/testreduce/templates/parsoid-rt-client.rttest.localsettings.js.erb
similarity index 94%
rename from modules/testreduce/files/parsoid-rt-client.rttest.localsettings.js
rename to 
modules/testreduce/templates/parsoid-rt-client.rttest.localsettings.js.erb
index 59b4060..54184a4 100644
--- a/modules/testreduce/files/parsoid-rt-client.rttest.localsettings.js
+++ b/modules/testreduce/templates/parsoid-rt-client.rttest.localsettings.js.erb
@@ -19,7 +19,7 @@
 
        // Use the API backends directly without hitting the text varnishes.
        // API requests are not cacheable anyway.
-       parsoidConfig.defaultAPIProxyURI = 'http://10.2.2.22';
+       parsoidConfig.defaultAPIProxyURI = 'http://api.svc.<%= 
scope.lookupvar['::mw_primary'] %>.wmnet;
 
        // Turn on the batching API
        parsoidConfig.useBatchAPI = true;
diff --git a/modules/testreduce/files/parsoid-vd-client.config.js 
b/modules/testreduce/templates/parsoid-vd-client.config.js.erb
similarity index 94%
rename from modules/testreduce/files/parsoid-vd-client.config.js
rename to modules/testreduce/templates/parsoid-vd-client.config.js.erb
index 60d0919..19fc913 100644
--- a/modules/testreduce/files/parsoid-vd-client.config.js
+++ b/modules/testreduce/templates/parsoid-vd-client.config.js.erb
@@ -35,7 +35,7 @@
                        // HTML2 generator options
                        html2: {
                                name: 'parsoid',
-                               server: 'http://parsoid.svc.eqiad.wmnet:8000',
+                               server: 'http://parsoid.svc.<%= 
scope.lookupvar("::parsoid_primary") %>.wmnet:8000',
                                dumpHTML: false,
                                postprocessorScript: 
'/srv/visualdiff/lib/parsoid.postprocess.js',
                                stylesYamlFile: 
'/srv/visualdiff/lib/parsoid.custom_styles.yaml',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia97446f7a4278e95db2e9daff71e527b90825967
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

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

Reply via email to