Gehel has uploaded a new change for review.

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

Change subject: Kartotherian: deploy application configuration with scap3
......................................................................

Kartotherian: deploy application configuration with scap3

Bug: T150021
Change-Id: Ieac317b263a4a394941f41a74e46b4090a85648a
---
A scap/config-files.yaml
M scap/scap.cfg
A scap/templates/config.yaml.j2
3 files changed, 78 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/maps/kartotherian/deploy 
refs/changes/76/321376/1

diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 0000000..40f36fe
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+​/etc/kartotherian/config.yaml:
+​  template: config.yaml.j2
+​  erb_syntax: True
+​  remote_vars: /etc/kartotherian/config-vars.yaml
diff --git a/scap/scap.cfg b/scap/scap.cfg
index c80ee37..52a1302 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -10,6 +10,7 @@
 service_name: kartotherian
 service_port: 6533
 lock_file: /tmp/scap.kartotherian.lock
+config_deploy: True
 
 [wmnet]
 # git_server: mira.codfw.wmnet
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
new file mode 100644
index 0000000..a9dd794
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,72 @@
+logging:
+  level: warn
+  name: kartotherian
+  streams:
+    - host: <%= @logstash_host %>
+      port: <%= @logstash_port %>
+      type: gelf
+    - level: info
+      path: /srv/log/kartotherian/main.log
+      type: file
+metrics:
+  host: <%= @metrics_host %>
+  name: kartotherian
+  port: <%= @metrics_port %>
+  type: statsd
+num_workers: <%= @num_workers %>
+services:
+  - conf:
+      allowedDomains:
+        https:
+          - mediawiki.org
+          - wikibooks.org
+          - wikidata.org
+          - wikimedia.org
+          - wikimediafoundation.org
+          - wikinews.org
+          - wikipedia.org
+          - wikiquote.org
+          - wikisource.org
+          - wikiversity.org
+          - wikivoyage.org
+          - wiktionary.org
+      cors: "*"
+      geoshapes:
+        allowUserQueries: true
+        database: gis
+        host: localhost
+        lineTable: planet_osm_line
+        password: <%= @geoshapes_password %>
+        polygonTable: planet_osm_polygon
+        table: planet_osm_polygon
+        user: <%= @geoshapes_user %>
+      mwapi_req:
+        body: "{{ default(request.query, {}) }}"
+        headers:
+          host: "{{request.params.domain}}"
+          user-agent: "{{user-agent}}"
+        method: post
+        uri: <%= @mwapi_uri %>
+      port: <%= @port %>
+      proxy: ""
+      restbase_req:
+        body: "{{request.body}}"
+        headers: "{{request.headers}}"
+        method: "{{request.method}}"
+        query: "{{ default(request.query, {}) }}"
+        uri: "<%= @restbase_base_url %>/{{domain}}/v1/{+path}"
+      sources: <%= @conf_sources %>
+      variables:
+        cassandra-pswd: <%= cassandra_password %>
+        cassandra-servers:
+        <% @cassandra_servers.each do |server| -%>
+          - <%= @server %>
+        <% end -%>
+        cassandra-user: <%= @cassandra_user %>
+        osmdb-pswd: <%= @osmdb_password %>
+        osmdb-user: <%= @osmdb_user %>
+    entrypoint:
+    module: "./src/app.js"
+    name: kartotherian
+worker_heap_limit_mb: 300
+worker_heartbeat_timeout: 7500

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieac317b263a4a394941f41a74e46b4090a85648a
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Gehel <gleder...@wikimedia.org>

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

Reply via email to