Use adaptive process spawning

Plus, synch the barbican devstack lib with upstream repo

Change-Id: I3a8bf5fefa93e54981880200903b61b27989fb84
This commit is contained in:
okozachenko 2020-08-26 16:05:37 +03:00
parent c80065e710
commit 597ad49051
3 changed files with 13 additions and 2 deletions

View File

@ -87,7 +87,7 @@ def deploy(name, namespace, new, **_):
"""
utils.create_or_update('operator/namespace.yml.j2')
utils.create_or_update('operator/uwsgidefaultconfig.yml.j2')
utils.deploy_uwsgi_config()
config = utils.to_dict(new['data']['operator-config.yaml'])

View File

@ -7,7 +7,10 @@ data:
uwsgi.ini: |-
[uwsgi]
enable-threads = true
workers = %(%k * 1)
workers = %(%k / 4)
cheaper = 2
cheaper-step = 1
cheaper-initial = 2
exit-on-reload = true
die-on-term = true
lazy-apps = true

View File

@ -295,3 +295,11 @@ def deploy_memcached(name, **_):
it's meant to be here to be consumed/called by the serices.
"""
create_or_update('operator/memcached.yml.j2', name=name)
def deploy_uwsgi_config():
"""Deploy a default configmap for uwsgi apps
This function deploys a default configmap for uwsgi apps."""
create_or_update('operator/uwsgidefaultconfig.yml.j2')