summaryrefslogtreecommitdiffstats
path: root/roles/koschei/backend/templates/config-backend.cfg.j2
blob: 716340200fae1477ae8783821aafd1102cbed889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# 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": "https://{{ koschei_koji_hub }}/kojihub",
        "weburl": "https://{{ koschei_koji_web }}/koji",
        "topurl": "https://{{ koschei_kojipkgs }}",
        "login_method": "krb_login",
        "login_args": {
            "keytab": "/etc/krb5.koschei_{{ inventory_hostname }}.keytab",
            "principal": "koschei/{{ inventory_hostname }}@{{ ipa_realm }}",
        },
        "session_opts": {
            "krb_rdns": False,
        },
        {% if env == 'staging' %}
        "max_builds": 16,
        "build_arches": ['i386', 'x86_64', 'armhfp', 'aarch64', 'ppc64', 'ppc64le'],
        "load_threshold": 1,
        {% else %}
        "max_builds": 60,
        "build_arches": ['i386', 'x86_64', 'armhfp', 'aarch64', 'ppc64', 'ppc64le'],
        "load_threshold": 0.65,
        {% endif %}
        "task_priority": 30,
    },
    "dependency": {
        "build_group": "build",
        "for_arch": "x86_64",
        "repo_cache_items": 10,
        "arches": ['x86_64', 'i386'],
        "persist_chunk_size": 300,
        "resolver_queue_size": 100,
        "dependency_fetch_chunk_size": 150,
        "dependency_cache_capacity": 50000,
        "cache_l2_capacity": 80,
        "ignore_weak_deps": True,
    },
    "services": {
        "polling": {
            {% if env == 'staging' %}
            "interval": 1, # in seconds
            {% else %}
            "interval": 20*60, # in seconds
            {% endif %}
        },
        "build_resolver": {
            "memory_limit": 1024**2,  # kilobytes
        },
        "repo_resolver": {
            "memory_limit": 1024**2,  # kilobytes
        },
    },
    "priorities": {
        "calculation_interval": 3600,  # seconds
    },
    "logging": {
        "loggers": {
            "": {
                "handlers": ["stderr", "email"],
            },
            "fedmsg": {
                "level": "ERROR",
            },
        },
        "handlers": {
            "email": {
                "class": "logging.handlers.SMTPHandler",
                "level": "WARN",
                "mailhost": "localhost",
                "fromaddr": "koschei@fedoraproject.org",
                "toaddrs": ['sysadmin-koschei-members@fedoraproject.org'],
                "subject": "Koschei backend {{ env }} warning",
            },
        },
    },
    "plugins": ['pkgdb', 'fedmsg'],
    "fedmsg": {
        {% if env == 'staging' %}
        "topic": "org.fedoraproject.stg.buildsys",
        {% else %}
        "topic": "org.fedoraproject.prod.buildsys",
        {% endif %}
    },
    "fedmsg-publisher": {
        "enabled": True,
        "modname": "koschei",
    },
    "caching": {
        "rpm_requires": {
            "backend": "dogpile.cache.memcached",
            "expiration_time": None,
            "arguments": {
                "url": "memcached01",
                "distributed_lock": True,
            },
        },
        "plugin": {
            "pkgdb": {
                "users": {
                    "backend": "dogpile.cache.memcached",
                    "expiration_time": 300,
                    "arguments": {
                        "url": "memcached01",
                        "distributed_lock": True,
                    },
                },
            },
        },
    },
    "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,
    },
}

# Local Variables:
# mode: Python
# End:
# vi: ft=python