[MediaWiki-commits] [Gerrit] maps...deploy[master]: tilerator - deplyo config with scap3

2016-12-13 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324760 )

Change subject: tilerator - deplyo config with scap3
..


tilerator - deplyo config with scap3

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

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



diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..4eececb
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,9 @@
+---
+/etc/tilerator/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/tilerator/config-vars.yaml
+/etc/tileratorui/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/tileratorui/config-vars.yaml
diff --git a/scap/scap.cfg b/scap/scap.cfg
index b5b51c8..3906040 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -11,6 +11,7 @@
 # service_name: tilerator
 # service_port: 6534
 lock_file: /tmp/scap.tilerator.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 000..d8abdd6
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,51 @@
+logging:
+  level: warn
+  name: <%= log_name %>
+  streams:
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- level: warn
+  path: <%= log_file %>
+  type: file
+metrics:
+  host: <%= metrics_host %>
+  name: <%= metrics_name %>
+  port: <%= metrics_port %>
+  type: statsd
+num_workers: <%= num_workers %>
+services:
+  - conf:
+  allSourcesPublic: true
+  cors: "*"
+  daemonOnly: true
+  mwapi_req:
+body: "{{ default(request.query, {}) }}"
+headers:
+  host: "{{request.params.domain}}"
+  user-agent: "{{user-agent}}"
+method: post
+uri: <%= mwapi_uri %>
+  port: <%= port %>
+  proxy: <%= proxy %>
+  restbase_req:
+body: "{{request.body}}"
+headers: "{{request.headers}}"
+method: "{{request.method}}"
+query: "{{ default(request.query, {}) }}"
+uri: "<%= restbase_uri %>/{{domain}}/v1/{+path}"
+  sources: <%= conf_sources %>
+  variables:
+cassandra-pswd: <%= cassandra_password %>
+cassandra-servers:
+<% for server in cassandra_servers -%>
+  - <%= server %>
+<% endfor -%>
+cassandra-user: <%= cassandra_user %>
+osmdb-pswd: <%= osmdb_password %>
+osmdb-user: <%= osmdb_user %>
+entrypoint: <%= entrypoint %>
+module: <%= module %>
+name: <%= name %>
+worker_heap_limit_mb: <%= worker_heap_limit_mb %>
+worker_heartbeat_timeout: <%= worker_heartbeat_timeout %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib73413750bcfe5b64ea6c1e536e0e22d4fdfff40
Gerrit-PatchSet: 3
Gerrit-Project: maps/tilerator/deploy
Gerrit-Branch: master
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: tilerator - deplyo config with scap3

2016-12-01 Thread Gehel (Code Review)
Gehel has uploaded a new change for review.

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

Change subject: tilerator - deplyo config with scap3
..

tilerator - deplyo config with scap3

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


  git pull ssh://gerrit.wikimedia.org:29418/maps/tilerator/deploy 
refs/changes/60/324760/1

diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..4eececb
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,9 @@
+---
+/etc/tilerator/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/tilerator/config-vars.yaml
+/etc/tileratorui/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/tileratorui/config-vars.yaml
diff --git a/scap/scap.cfg b/scap/scap.cfg
index b5b51c8..3906040 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -11,6 +11,7 @@
 # service_name: tilerator
 # service_port: 6534
 lock_file: /tmp/scap.tilerator.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 000..b10fe69
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,51 @@
+logging:
+  level: warn
+  name: <%= log_name %>
+  streams:
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- level: warn
+  path: <%= log_file %>
+  type: file
+metrics:
+  host: <%= metrics_host %>
+  name: <%= metrics_name %>
+  port: <%= metrics_port %>
+  type: statsd
+num_workers: <%= num_workers %>
+services:
+  - conf:
+  allSourcesPublic: <%= all_sources_public %>
+  cors: "*"
+  daemonOnly: true
+  mwapi_req:
+body: "{{ default(request.query, {}) }}"
+headers:
+  host: "{{request.params.domain}}"
+  user-agent: "{{user-agent}}"
+method: post
+uri: <%= mwapi %>
+  port: <%= port %>
+  proxy: <%= proxy %>
+  restbase_req:
+body: "{{request.body}}"
+headers: "{{request.headers}}"
+method: "{{request.method}}"
+query: "{{ default(request.query, {}) }}"
+uri: "<%= restbase %>/{{domain}}/v1/{+path}"
+  sources: <%= conf_sources %>
+  variables:
+cassandra-pswd: <%= cassandra_password %>
+cassandra-servers:
+<% for server in cassandra_servers -%>
+  - <%= server %>
+<% endfor -%>
+cassandra-user: <%= cassandra_user %>
+osmdb-pswd: <%= osmdb_password %>
+osmdb-user: <%= osmdb_user %>
+entrypoint: <%= entrypoint %>
+module: <%= module %>
+name: <%= name %>
+worker_heap_limit_mb: <%= worker_heap_limit_mb %>
+worker_heartbeat_timeout: <%= worker_heartbeat_timeout %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib73413750bcfe5b64ea6c1e536e0e22d4fdfff40
Gerrit-PatchSet: 1
Gerrit-Project: maps/tilerator/deploy
Gerrit-Branch: master
Gerrit-Owner: Gehel 

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