Files
fm-orchestrator/config.py
Nils Philippsen a4cc011eed put kerberos config params in rida configuration
koji.read_config() filters out configuration options it doesn't know
about silently. Currently this is about the keytab, principal, ccache
options. The latter may be needed e.g. in Docker containers which
currently(?) can't use Linux kernel keyrings and need the credential
cache to be a normal file.
2016-09-22 16:06:35 +02:00

74 lines
2.3 KiB
Python

from os import path
class BaseConfiguration(object):
# Make this random (used to generate session keys)
SECRET_KEY = '74d9e9f9cd40e66fc6c4c2e9987dce48df3ce98542529fd0'
basedir = path.abspath(path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(path.join(basedir, 'rida.db'))
SQLALCHEMY_TRACK_MODIFICATIONS = True
# Where we should run when running "manage.py runssl" directly.
HOST = '127.0.0.1'
PORT = 5000
SYSTEM = 'koji'
MESSAGING = 'fedmsg'
KOJI_CONFIG = '/etc/rida/koji.conf'
KOJI_PROFILE = 'koji'
KOJI_ARCHES = ['i686', 'armv7hl', 'x86_64']
PDC_URL = 'http://modularity.fedorainfracloud.org:8080/rest_api/v1'
PDC_INSECURE = True
PDC_DEVELOP = True
SCMURLS = ["git://pkgs.stg.fedoraproject.org/modules/"]
# How often should we resort to polling, in seconds
# Set to zero to disable polling
POLLING_INTERVAL = 600
RPMS_DEFAULT_REPOSITORY = 'git://pkgs.fedoraproject.org/rpms/'
RPMS_ALLOW_REPOSITORY = False
RPMS_DEFAULT_CACHE = 'http://pkgs.fedoraproject.org/repo/pkgs/'
RPMS_ALLOW_CACHE = False
SSL_ENABLED = True
SSL_CERTIFICATE_FILE = 'server.crt'
SSL_CERTIFICATE_KEY_FILE = 'server.key'
SSL_CA_CERTIFICATE_FILE = 'cacert.pem'
PKGDB_API_URL = 'https://admin.stg.fedoraproject.org/pkgdb/api'
FAS_URL = 'https://admin.stg.fedoraproject.org/accounts'
# Available backends are: console, file, journal.
LOG_BACKEND = 'journal'
# Path to log file when LOG_BACKEND is set to "file".
LOG_FILE = 'rida.log'
# Available log levels are: debug, info, warn, error.
LOG_LEVEL = 'info'
# Settings for Kerberos
KRB_KEYTAB = None
KRB_PRINCIPAL = None
KRB_CCACHE = None
class DevConfiguration(BaseConfiguration):
LOG_BACKEND = 'console'
HOST = '0.0.0.0'
FAS_USERNAME = 'put your fas username here'
#FAS_PASSWORD = 'put your fas password here....'
#FAS_PASSWORD = os.environ('FAS_PASSWORD') # you could store it here
#FAS_PASSWORD = commands.getoutput('pass your_fas_password').strip()
class TestConfiguration(BaseConfiguration):
LOG_BACKEND = 'console'
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
DEBUG = True
class ProdConfiguration(BaseConfiguration):
FAS_USERNAME = 'TODO'
#FAS_PASSWORD = 'another password'