[MediaWiki-commits] [Gerrit] Update RESTBase configs for RESTBase v0.9.1 - change (operations/puppet)

2015-12-07 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Update RESTBase configs for RESTBase v0.9.1
..

Update RESTBase configs for RESTBase v0.9.1

RESTBase 0.9 comes with a major cleanup in config handling. This moves most
service configurations out of the top-level config, and instead uses spec
modules to configure the service for each project.

Since this is a large change that we can't really test outside of puppet,
we'll need to thoroughly test this in staging before carefully rolling it out
in production. We have tested a similar configuration change in labs, but that
is not using the exact same template, and could thus differ in behavior from
production.

Change-Id: If4fc33c7bcf42cf9cde8d31b5bb9b6351142c59a
WARNING: DO NOT MERGE UNTIL PUPPET IS DISABLED ON THE PRODUCTION RB CLUSTER!
---
M modules/restbase/templates/config.labs.yaml.erb
M modules/restbase/templates/config.yaml.erb
2 files changed, 808 insertions(+), 1,321 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/257408/1

diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index f836a76..622f72b 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -1,325 +1,3 @@
-# RESTBase config
-
-info:
-  name: restbase
-
-
-
-# Swagger spec templates, referenced using yaml references in the spec section
-# below.
-templates:
-
-  wmf-content-1.0.0: /content/1.0.0
-swagger: '2.0'
-# swagger options, overriding the shared ones from the merged specs (?)
-info: /content-info/1.0.0
-  version: 1.0.0-beta
-  title: Wikimedia REST API
-  description: >
-  This API aims to provide coherent and low-latency access to
-  Wikimedia content and services. It is currently in beta testing, so
-  things aren't completely locked down yet. Each entry point has
-  explicit stability markers to inform you about development status
-  and change policy, according to [our API version
-  policy](https://www.mediawiki.org/wiki/API_versioning).
-
-  ### High-volume access
-- As a general rule, don't perform more than 200 requests/s to
-  this API.
-- Set a unique `User-Agent` header that allows us to contact you
-  quickly. Email addresses or URLs of contact pages work well.
-- Consider using our [HTML
-  dumps](https://phabricator.wikimedia.org/T17017) once they
-  become available.
-
-  termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use
-  contact:
-name: the Wikimedia Services team
-url: http://mediawiki.org/wiki/RESTBase
-  license:
-name: Apache2
-url: http://www.apache.org/licenses/LICENSE-2.0
-
-securityDefinitions: /content-security/1.0.0
-  mediawiki_auth:
-description: Checks permissions using MW api
-type: apiKey
-in: header
-name: cookie
-x-internal-request-whitelist:
-  - /^https?:\/\/.+wmflabs.org.*\/w\/api\.php$/
-  - <%= @parsoid_uri %>
-  - <%= @graphoid_uri %>
-  - <%= @mobileapps_uri %>
-  - <%= @mathoid_uri %>
-  - <%= @aqs_uri %>
-  header_match:
-description: Checks client ip against one of the predefined whitelists
-x-error-message: This client is not allowed to use the endpoint
-x-whitelists:
-  internal:
-- /^(?::::)?(?:10|127)\./
-
-# Override the base path for host-based (proxied) requests. In our case,
-# we proxy https://{domain}/api/rest_v1/ to the API.
-x-host-basePath: /api/rest_v1
-
-x-modules:
-  - name: mobileapps-public
-path: specs/mediawiki/v1/mobileapps
-type: spec
-options:
-  host: <%= @mobileapps_uri %>
-
-  - name: graphoid
-path: wikimedia/v1/graphoid_v1
-type: spec
-options:
-  host: <%= @graphoid_uri %>
-
-  - name: page-summary
-path: wikimedia/v1/summary_v1.js
-options:
-  # One hour, for now.
-  response_cache-control: 'max-age: 3600, s-maxage: 3600'
-
-  - name: mathoid
-path: specs/media/v1/mathoid
-type: spec
-options:
-  host: <%= @mathoid_uri %>
-
-x-subspecs:
-  - mediawiki/v1/content
-
-
-  wmf-sys-1.0.0: /sys/1.0.0
-info:
-  title: Default MediaWiki sys API module
-  version: 1.0.0
-paths:
-  /{module:table}: /sys/table
-x-modules:
-  # There can be multiple modules too per stanza, as long as the
-  # exported symbols don't conflict. The operationIds from the spec
-  # will be resolved against all of the modules.
-  - name: restbase-mod-table-cassandra
-   

[MediaWiki-commits] [Gerrit] Update RESTBase configs for RESTBase v0.9.1 - change (operations/puppet)

2015-12-07 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Update RESTBase configs for RESTBase v0.9.1
..


Update RESTBase configs for RESTBase v0.9.1

RESTBase 0.9 comes with a major cleanup in config handling. This moves most
service configurations out of the top-level config, and instead uses spec
modules to configure the service for each project.

Since this is a large change that we can't really test outside of puppet,
we'll need to thoroughly test this in staging before carefully rolling it out
in production. We have tested a similar configuration change in labs, but that
is not using the exact same template, and could thus differ in behavior from
production.

Change-Id: If4fc33c7bcf42cf9cde8d31b5bb9b6351142c59a
WARNING: DO NOT MERGE UNTIL PUPPET IS DISABLED ON THE PRODUCTION RB CLUSTER!
---
M modules/restbase/templates/config.labs.yaml.erb
M modules/restbase/templates/config.yaml.erb
2 files changed, 808 insertions(+), 1,321 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index f836a76..622f72b 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -1,325 +1,3 @@
-# RESTBase config
-
-info:
-  name: restbase
-
-
-
-# Swagger spec templates, referenced using yaml references in the spec section
-# below.
-templates:
-
-  wmf-content-1.0.0: /content/1.0.0
-swagger: '2.0'
-# swagger options, overriding the shared ones from the merged specs (?)
-info: /content-info/1.0.0
-  version: 1.0.0-beta
-  title: Wikimedia REST API
-  description: >
-  This API aims to provide coherent and low-latency access to
-  Wikimedia content and services. It is currently in beta testing, so
-  things aren't completely locked down yet. Each entry point has
-  explicit stability markers to inform you about development status
-  and change policy, according to [our API version
-  policy](https://www.mediawiki.org/wiki/API_versioning).
-
-  ### High-volume access
-- As a general rule, don't perform more than 200 requests/s to
-  this API.
-- Set a unique `User-Agent` header that allows us to contact you
-  quickly. Email addresses or URLs of contact pages work well.
-- Consider using our [HTML
-  dumps](https://phabricator.wikimedia.org/T17017) once they
-  become available.
-
-  termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use
-  contact:
-name: the Wikimedia Services team
-url: http://mediawiki.org/wiki/RESTBase
-  license:
-name: Apache2
-url: http://www.apache.org/licenses/LICENSE-2.0
-
-securityDefinitions: /content-security/1.0.0
-  mediawiki_auth:
-description: Checks permissions using MW api
-type: apiKey
-in: header
-name: cookie
-x-internal-request-whitelist:
-  - /^https?:\/\/.+wmflabs.org.*\/w\/api\.php$/
-  - <%= @parsoid_uri %>
-  - <%= @graphoid_uri %>
-  - <%= @mobileapps_uri %>
-  - <%= @mathoid_uri %>
-  - <%= @aqs_uri %>
-  header_match:
-description: Checks client ip against one of the predefined whitelists
-x-error-message: This client is not allowed to use the endpoint
-x-whitelists:
-  internal:
-- /^(?::::)?(?:10|127)\./
-
-# Override the base path for host-based (proxied) requests. In our case,
-# we proxy https://{domain}/api/rest_v1/ to the API.
-x-host-basePath: /api/rest_v1
-
-x-modules:
-  - name: mobileapps-public
-path: specs/mediawiki/v1/mobileapps
-type: spec
-options:
-  host: <%= @mobileapps_uri %>
-
-  - name: graphoid
-path: wikimedia/v1/graphoid_v1
-type: spec
-options:
-  host: <%= @graphoid_uri %>
-
-  - name: page-summary
-path: wikimedia/v1/summary_v1.js
-options:
-  # One hour, for now.
-  response_cache-control: 'max-age: 3600, s-maxage: 3600'
-
-  - name: mathoid
-path: specs/media/v1/mathoid
-type: spec
-options:
-  host: <%= @mathoid_uri %>
-
-x-subspecs:
-  - mediawiki/v1/content
-
-
-  wmf-sys-1.0.0: /sys/1.0.0
-info:
-  title: Default MediaWiki sys API module
-  version: 1.0.0
-paths:
-  /{module:table}: /sys/table
-x-modules:
-  # There can be multiple modules too per stanza, as long as the
-  # exported symbols don't conflict. The operationIds from the spec
-  # will be resolved against all of the modules.
-  - name: restbase-mod-table-cassandra
-version: 1.0.0
-