Alexandros Kosiaris has submitted this change and it was merged. Change subject: CXServer: Do not use the proxy for RESTBase and Apertium ......................................................................
CXServer: Do not use the proxy for RESTBase and Apertium Change-Id: Ice049a1e0b49fa3d4d7cc58c3b7c0437d71fa241 --- M hieradata/labs/deployment-prep/common.yaml M modules/cxserver/manifests/init.pp M modules/cxserver/templates/config.yaml.erb 3 files changed, 14 insertions(+), 4 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index cf1c0d0..62d462a 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -96,7 +96,8 @@ "cxserver::apertium": http://apertium-beta.wmflabs.org "cxserver::proxy": deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080 "cxserver::yandex_url": https://translate.yandex.net -"cxserver::restbase_url": http://deployment-restbase02.deployment-prep.eqiad.wmflabs:7231/@lang.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/@title +"cxserver::restbase_host": http://deployment-restbase02.deployment-prep.eqiad.wmflabs:7231 +"cxserver::restbase_path": '/@lang.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/@title' 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-bastion.eqiad.wmflabs "hhvm::extra::fcgi": diff --git a/modules/cxserver/manifests/init.pp b/modules/cxserver/manifests/init.pp index f476e80..9bd4490 100644 --- a/modules/cxserver/manifests/init.pp +++ b/modules/cxserver/manifests/init.pp @@ -5,8 +5,10 @@ # # === Parameters # -# [*restbase_url*] -# Url to Restbase API. +# [*restbase_host*] +# The host/port where to reach RESTBase +# [*restbase_path*] +# The URI path to append to *restbase_host* # [*apertium*] # Url to Apertium service. # [*yandex_url*] @@ -18,7 +20,8 @@ # [*jwt_secret*] # JWT secret token. class cxserver( - $restbase_url = 'http://restbase.svc.eqiad.wmnet:7231/@lang.wikipedia.org/v1/page/html/@title', + $restbase_host = 'http://restbase.svc.eqiad.wmnet:7231', + $restbase_path = '/@lang.wikipedia.org/v1/page/html/@title', $apertium = 'http://apertium.svc.eqiad.wmnet:2737', $yandex_url = undef, $yandex_api_key = undef, @@ -29,6 +32,8 @@ $ordered_registry = ordered_json($registry) } + $restbase_url = "${restbase_host}${restbase_path}" + service::node { 'cxserver': port => 8080, config => template('cxserver/config.yaml.erb'), diff --git a/modules/cxserver/templates/config.yaml.erb b/modules/cxserver/templates/config.yaml.erb index 06cb9a3..c5fe1be 100644 --- a/modules/cxserver/templates/config.yaml.erb +++ b/modules/cxserver/templates/config.yaml.erb @@ -9,6 +9,10 @@ algorithms: [ 'HS256' ] <% end -%> +no_proxy: + - <%= @restbase_host %> + - <%= @apertium %> + mt: apertium: api: '<%= @apertium %>' -- To view, visit https://gerrit.wikimedia.org/r/259700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice049a1e0b49fa3d4d7cc58c3b7c0437d71fa241 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mobrovac <mobro...@wikimedia.org> Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits