summaryrefslogtreecommitdiffstats
path: root/roles/github2fedmsg/templates
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2014-06-16 20:20:21 +0000
committerRalph Bean <rbean@redhat.com>2014-06-16 20:20:21 +0000
commit0458fc105b587331af7b9288f11c9562b3bb2852 (patch)
treed03653f2cc11373be533b360abd2b8bd210f8687 /roles/github2fedmsg/templates
parent20b6ff52b15aaabc303c26e7ac1c64621dc2fe36 (diff)
downloadansible-0458fc105b587331af7b9288f11c9562b3bb2852.tar.gz
ansible-0458fc105b587331af7b9288f11c9562b3bb2852.tar.xz
ansible-0458fc105b587331af7b9288f11c9562b3bb2852.zip
Start of a github2fedmsg role.
Diffstat (limited to 'roles/github2fedmsg/templates')
-rw-r--r--roles/github2fedmsg/templates/github2fedmsg.ini85
-rw-r--r--roles/github2fedmsg/templates/githubsecrets.py23
2 files changed, 108 insertions, 0 deletions
diff --git a/roles/github2fedmsg/templates/github2fedmsg.ini b/roles/github2fedmsg/templates/github2fedmsg.ini
new file mode 100644
index 000000000..911d1a279
--- /dev/null
+++ b/roles/github2fedmsg/templates/github2fedmsg.ini
@@ -0,0 +1,85 @@
+[pipeline:main]
+pipeline =
+ tw2
+ github2fedmsg
+
+[filter:proxy-prefix]
+use = egg:PasteDeploy#prefix
+prefix = /github2fedmsg
+scheme = https
+
+[filter:tw2]
+use = egg:tw2.core#middleware
+script_name = /
+
+[app:github2fedmsg]
+use = egg:github2fedmsg
+
+filter-with = proxy-prefix
+
+#pyramid.reload_templates = true
+pyramid.default_locale_name = en
+pyramid.includes =
+ pyramid_tm
+
+sqlalchemy.url = postgresql://{{github2fedmsgDBUser}}:{{github2fedmsgDBPassword}}@db-github2fedmsg/github2fedmsg
+
+mako.directories=github2fedmsg:templates
+
+{% if env != 'staging' %}
+velruse.github.consumer_key = {{github2fedmsgGHkey}}
+velruse.github.scope = repo
+velruse.openid.identifier = https://id.fedoraproject.org/
+velruse.openid.realm = https://apps.fedoraproject.org/github2fedmsg
+github.callback = https://apps.fedoraproject.org/github2fedmsg/webhook
+github.secret = {{github2fedmsgGHSecret}}
+{% else %}
+velruse.github.consumer_key = {{github2fedmsgGHkey_staging}}
+velruse.github.scope = repo
+velruse.openid.identifier = https://id.stg.fedoraproject.org/
+velruse.openid.realm = https://apps.stg.fedoraproject.org/github2fedmsg
+github.callback = https://apps.stg.fedoraproject.org/github2fedmsg/webhook
+github.secret = {{github2fedmsgGHSecret_staging}}
+{% endif %}
+
+session.secret="{{github2fedmsgSessionSecret}}"
+authnsecret="{{github2fedmsgAuthnSecret}}"
+
+# Begin logging configuration
+
+[loggers]
+keys = root, github2fedmsg, sqlalchemy
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_github2fedmsg]
+level = DEBUG
+handlers =
+qualname = github2fedmsg
+
+[logger_sqlalchemy]
+level = WARN
+handlers =
+qualname = sqlalchemy.engine
+# "level = INFO" logs SQL queries.
+# "level = DEBUG" logs SQL queries and results.
+# "level = WARN" logs neither. (Recommended for production systems.)
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
+
+# End logging configuration
diff --git a/roles/github2fedmsg/templates/githubsecrets.py b/roles/github2fedmsg/templates/githubsecrets.py
new file mode 100644
index 000000000..19fdbb24c
--- /dev/null
+++ b/roles/github2fedmsg/templates/githubsecrets.py
@@ -0,0 +1,23 @@
+# This file is a part of github2fedmsg, a pubsubhubbub to zeromq bridge.
+# Copyright (C) 2014, Red Hat, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# github2fedmsg's secret key to the kingdom
+{% if env != 'staging' %}
+secret_oauth_token = "{{github2fedmsgGHsecret_oauth_token}}"
+{% else %}
+secret_oauth_token = "{{github2fedmsgGHsecret_oauth_token_staging}}"
+{% endif %}
+