Alexandros Kosiaris has submitted this change and it was merged.

Change subject: cxserver: Deploy Youdao MT service
......................................................................


cxserver: Deploy Youdao MT service

Bug: T146731
Change-Id: Ibe673557765c7eedbce5758876dd513e253f0e72
---
M hieradata/labs/deployment-prep/common.yaml
M hieradata/role/common/scb.yaml
M manifests/role/cxserver.pp
M modules/cxserver/manifests/init.pp
M modules/cxserver/templates/config.yaml.erb
5 files changed, 16 insertions(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 6b1643b..216c65e 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -137,6 +137,7 @@
 "cxserver::apertium": http://apertium-beta.wmflabs.org
 "cxserver::proxy": deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080
 "cxserver::yandex_url": https://translate.yandex.net
+"cxserver::youdao_url": https://fanyi.youdao.com/paidapi/fanyiapi
 "cxserver::registry": registry.yaml
 role::deployment::mediawiki::key_fingerprint: 
f0:54:06:fa:17:27:97:a2:cc:69:a0:a7:df:4c:0a:e3
 "role::deployment::salt_masters::deployment_server": 
deployment-tin.eqiad.wmflabs
diff --git a/hieradata/role/common/scb.yaml b/hieradata/role/common/scb.yaml
index cb9dfc9..6a16c13 100644
--- a/hieradata/role/common/scb.yaml
+++ b/hieradata/role/common/scb.yaml
@@ -44,4 +44,5 @@
   - "restbase.svc.%{::rb_site}.wmnet"
   - "apertium.svc.%{::site}.wmnet"
 cxserver::yandex_url: https://translate.yandex.net
+cxserver::youdao_url: https://fanyi.youdao.com/paidapi/fanyiapi
 ores::web::redis_host: oresrdb1001.eqiad.wmnet
diff --git a/manifests/role/cxserver.pp b/manifests/role/cxserver.pp
index c16535b..ef77efb 100644
--- a/manifests/role/cxserver.pp
+++ b/manifests/role/cxserver.pp
@@ -7,10 +7,12 @@
 
     include ::passwords::cxserver
     $yandex_api_key = $::passwords::cxserver::yandex_api_key
+    $youdao_api_key = $::passwords::cxserver::youdao_api_key
     $jwt_secret = $::passwords::cxserver::jwt_secret
 
     class { '::cxserver':
         yandex_api_key => $yandex_api_key,
+        youdao_api_key => $youdao_api_key,
         jwt_secret     => $jwt_secret,
     }
 }
diff --git a/modules/cxserver/manifests/init.pp 
b/modules/cxserver/manifests/init.pp
index 23ed1ba..c4d3a3a 100644
--- a/modules/cxserver/manifests/init.pp
+++ b/modules/cxserver/manifests/init.pp
@@ -11,6 +11,10 @@
 #   Url to Yandex service.
 # [*yandex_api_key*]
 #   API key for Yandex service.
+# [*youdao_url*]
+#   Url to Youdao service.
+# [*youdao_api_key*]
+#   API key for Yandex service.
 # [*jwt_secret*]
 #   JWT secret token.
 # [*no_proxy_list*]
@@ -21,6 +25,8 @@
     $apertium = "http://apertium.svc.${::site}.wmnet:2737";,
     $yandex_url = undef,
     $yandex_api_key = undef,
+    $youdao_url = undef,
+    $youdao_api_key = undef,
     $jwt_secret = undef,
     $no_proxy_list = undef,
     $registry = 'registry.wikimedia.yaml',
diff --git a/modules/cxserver/templates/config.yaml.erb 
b/modules/cxserver/templates/config.yaml.erb
index 6ea2a0d..4a29cd3 100644
--- a/modules/cxserver/templates/config.yaml.erb
+++ b/modules/cxserver/templates/config.yaml.erb
@@ -21,7 +21,12 @@
   yandex:
     api: '<%= @yandex_url %>'
     key: '<%= @yandex_api_key %>'
-  <% end -%>
+  <%- end -%>
+  <%- if @youdao_url -%>
+  youdao:
+    api: '<%= @youdao_url %>'
+    key: '<%= @youdao_api_key %>'
+  <%- end -%>
 
 # registry to use
 registry: <%= @registry %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe673557765c7eedbce5758876dd513e253f0e72
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com>
Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to