Fix celery config for MBS

This commit is contained in:
Brendan Reilly 2021-02-17 15:38:56 -05:00 committed by kevin
parent 46c4f7925b
commit 055cdb614f
3 changed files with 14 additions and 7 deletions

View file

@ -41,7 +41,7 @@ csi_relationship: |
NOTE - this system has a KRB service principal with elevated koji privileges.
mbs_broker_url: "amqps://mbs{{ env_suffix }}@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fmbs"
mbs_broker_url: "amqps://mbs-private-queue{{ env_suffix }}@rabbitmq{{ env_suffix }}.fedoraproject.org//mbs-private-queue"
mbs_num_workers: 3
mbs_systemd_wait_for_rabbitmq: true
mbs_frontend: false

View file

@ -48,7 +48,7 @@ csi_relationship: |
NOTE - this system has a KRB service principal with elevated koji privileges.
mbs_broker_url: "amqps://mbs{{ env_suffix }}@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fmbs"
mbs_broker_url: "amqps://mbs-private-queue{{ env_suffix }}@rabbitmq{{ env_suffix }}.fedoraproject.org//mbs-private-queue"
mbs_num_workers: 3
mbs_systemd_wait_for_rabbitmq: true
mbs_frontend: false

View file

@ -1,4 +1,5 @@
from os import path
import ssl
# FIXME: workaround for this moment till confdir, dbdir (installdir etc.) are
# declared properly somewhere/somehow
@ -20,13 +21,19 @@ class BaseConfiguration(object):
PORT = 5000
CELERY_BROKER_URL = '{{ mbs_broker_url }}'
CELERY_CONFIG = {
'certfile': "/etc/module-build-service/mbs-private-queue{{env_suffix}}.crt",
'keyfile': "/etc/module-build-service/mbs-private-queue{{env_suffix}}.key",
'ca_certs': "/etc/module-build-service/ca.crt",
'broker_login_method': "EXTERNAL",
CELERY_BROKER_TRANSPORT_OPTIONS = {
"ssl":
{
'certfile': "/etc/module-build-service/mbs-private-queue{{env_suffix}}.crt",
'keyfile': "/etc/module-build-service/mbs-private-queue{{env_suffix}}.key",
'ca_certs': "/etc/module-build-service/ca.crt",
'cert_reqs': ssl.CERT_REQUIRED,
'ssl_version': ssl.PROTOCOL_TLSv1_2,
},
}
CELERY_BROKER_LOGIN_METHOD = "EXTERNAL"
# Global network-related values, in seconds
NET_TIMEOUT = 120
NET_RETRY_INTERVAL = 30