Install separate koschei configs

This commit is contained in:
Michael Simacek 2016-04-14 12:08:48 +02:00
parent 5378c022c4
commit 8553678c1a
6 changed files with 190 additions and 2 deletions

View file

@ -28,9 +28,11 @@
owner=koschei
group=koschei
mode=0400
# remove config.cfg after split-upgrade
with_items:
- config.cfg
- config-admin.cfg
- config-backend.cfg
notify:
- restart koschei-polling
- restart koschei-resolver

View file

@ -1,6 +1,8 @@
# Config for operations that require koscheiadmin credentials.
config = {
"database_config": {
"host": "{{ koschei_pgsql_hostname }}",
"database": "koschei",
"username": "koscheiadmin",
"password": "{{ koscheiadmin_db_password }}",
},

View file

@ -0,0 +1,120 @@
# This is a config file for Koschei that can override values in default
# configuration in /usr/share/koschei/config.cfg. It is a python file expecting
# assignment to config dictionary which will be recursively merged with the
# default one.
config = {
"database_config": {
"host": "{{ koschei_pgsql_hostname }}",
"username": "koscheiuser",
"password": "{{ koscheiuser_db_password }}",
"database": "koschei"
},
"koji_config": {
"server": "http://{{ koschei_koji_hub }}/kojihub",
"topurl": "http://{{ koschei_kojipkgs }}",
"weburl": "http://{{ koschei_koji_web }}/koji",
"login_method": "ssl_login",
"login_args": {
"cert": "/etc/koschei/koschei.pem",
"ca": "/etc/koschei/fedora-ca.cert",
"serverca": "/etc/koschei/fedora-ca.cert",
},
"source_tag": "{{ koschei_koji_tag }}",
"target_tag": "{{ koschei_koji_tag }}",
"build_tag": "{{ koschei_koji_tag }}-build",
"max_builds": 40,
"build_arches": ['i386', 'x86_64', 'armhfp'],
"build_opts": {
},
"load_threshold": 0.65,
"task_priority": 30,
"repo_url": "http://{{ koschei_kojipkgs }}/repos/{build_tag}/{repo_id}/{arch}",
},
"dependency": {
"build_group": "build",
"for_arch": "x86_64",
"repo_cache_items": 10,
"keep_build_deps_for": 1,
"local": False,
"arches": ['x86_64', 'i386'],
"persist_chunk_size": 300,
"resolver_queue_size": 100,
"dependency_fetch_chunk_size": 150,
"cache_l1_capacity": 4,
"cache_l2_capacity": 128,
"cache_l1_threads": 3,
"cache_l2_threads": 1,
"cache_threads_max": 4,
{% if env == 'staging' %}
"ignore_weak_deps": True,
{% endif %}
},
"services": {
"watcher": {
{% if env == 'staging' %}
"watchdog_interval": None, # there are almost no messages in stg
{% else %}
"watchdog_interval": 600, # in seconds
{% endif %}
},
"polling": {
{% if env == 'staging' %}
"interval": 1, # in seconds
{% else %}
"interval": 20*60, # in seconds
{% endif %}
},
},
"logging": {
"loggers": {
"": {
"level": "DEBUG",
"handlers": ["stderr", "email"],
},
},
"handlers": {
"email": {
"class": "logging.handlers.SMTPHandler",
"level": "WARN",
"mailhost": "localhost",
"fromaddr": "koschei@fedoraproject.org",
"toaddrs": ['sysadmin-koschei-members@fedoraproject.org'],
"subject": "Koschei {{ env }} warning",
},
},
},
"fedmsg": {
{% if env == 'staging' %}
"topic": "org.fedoraproject.stg.buildsys",
{% else %}
"topic": "org.fedoraproject.prod.buildsys",
{% endif %}
},
"fedmsg-publisher": {
"enabled": True,
"modname": "koschei",
},
"pkgdb": {
{% if env == 'staging' %}
"pkgdb_url": 'https://admin.stg.fedoraproject.org/pkgdb/api',
"topic_re": r'\.stg\.pkgdb\.',
{% else %}
"pkgdb_url": 'https://admin.fedoraproject.org/pkgdb/api',
"topic_re": r'\.prod\.pkgdb\.',
{% endif %}
"sync_tracked": True,
"cache": {
"backend": "dogpile.cache.memcached",
"expiration_time": 300,
"arguments": {
"url": "memcached01",
"distributed_lock": True,
},
},
},
}
# Local Variables:
# mode: Python
# End:
# vi: ft=python

View file

@ -27,7 +27,7 @@
group=koschei
mode=0400
with_items:
- config.cfg
- frontend-config.cfg
notify:
- reload httpd
tags:

View file

@ -0,0 +1,65 @@
# This is a config file for Koschei that can override values in default
# configuration in /usr/share/koschei/config.cfg. It is a python file expecting
# assignment to config dictionary which will be recursively merged with the
# default one.
config = {
"database_config": {
"host": "{{ koschei_pgsql_hostname }}",
"username": "koscheiuser",
"password": "{{ koscheiuser_db_password }}",
"database": "koschei"
},
"koji_config": {
"server": "http://{{ koschei_koji_hub }}/kojihub",
"topurl": "http://{{ koschei_kojipkgs }}",
"weburl": "http://{{ koschei_koji_web }}/koji",
},
"logging": {
"loggers": {
"": {
"level": "DEBUG",
"handlers": ["stderr", "email"],
},
},
"handlers": {
"email": {
"class": "logging.handlers.SMTPHandler",
"level": "WARN",
"mailhost": "localhost",
"fromaddr": "koschei@fedoraproject.org",
"toaddrs": ['sysadmin-koschei-members@fedoraproject.org'],
"subject": "Koschei {{ env }} warning",
},
},
},
"fedmsg": {
{% if env == 'staging' %}
"topic": "org.fedoraproject.stg.buildsys",
{% else %}
"topic": "org.fedoraproject.prod.buildsys",
{% endif %}
},
"pkgdb": {
{% if env == 'staging' %}
"pkgdb_url": 'https://admin.stg.fedoraproject.org/pkgdb/api',
"topic_re": r'\.stg\.pkgdb\.',
{% else %}
"pkgdb_url": 'https://admin.fedoraproject.org/pkgdb/api',
"topic_re": r'\.prod\.pkgdb\.',
{% endif %}
"sync_tracked": True,
"cache": {
"backend": "dogpile.cache.memcached",
"expiration_time": 300,
"arguments": {
"url": "memcached01",
"distributed_lock": True,
},
},
},
}
# Local Variables:
# mode: Python
# End:
# vi: ft=python

View file

@ -1 +0,0 @@
../../backend/templates/config.cfg.j2