Create config for frontend or backend seperately

1. init_web_config: create Config object for frontend, load
   configuration from `web_config.py`.
2. init_backend_config: create Config for backend, load configuration
   from `backend_config.py`.

And two new classes inherit from `Config` in config.py:

1. WebConfig: representing the orchestrator frontend web configuration
2. BackendConfig: representing the orchestrator backend workers
                  configuration

Before calling init_{web,backend}_config, check sys.argv, if
"fedmsg-hub*", "celery" or "build_module_locally" is present, it's
running as backend.
This commit is contained in:
Qixiang Wan
2019-11-13 18:44:18 +08:00
committed by mprahl
parent f8079308b1
commit 81d9554af3
10 changed files with 245 additions and 192 deletions

View File

@@ -67,7 +67,8 @@ setup(
"/etc/module-build-service/",
[
"conf/cacert.pem",
"conf/config.py",
"conf/web_config.py",
"conf/backend_config.py",
"conf/koji.conf",
"conf/mock.cfg",
"conf/yum.conf",