Configure WSGI worker processes dynamically
Use WSGI worker process configuration in Apache templates inline with other OpenStack Charms. Additionally: * fixes typos in functional tests; * removes zesty-ocata (zesty is EoL); * fixes tox.ini to run xenial-ocata as Panko is only available in Ocata; * fixes src/test-requirements.txt to use a github url instead of lp; * adds a repo link now that Panko is in OpenStack repos. Change-Id: If24ad0ee3e7cc7282186e8a80c8c2174ab4daa02 Closes-Bug: 1748432
This commit is contained in:
parent
3ed4d0d8a9
commit
86175f8b05
|
@ -1,4 +1,5 @@
|
|||
includes: ['layer:openstack-api', 'interface:panko']
|
||||
repo: 'https://github.com/openstack/charm-panko'
|
||||
options:
|
||||
basic:
|
||||
use_venv: True
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Listen {{ options.service_listen_info.panko_api.public_port }}
|
||||
|
||||
<VirtualHost *:{{ options.service_listen_info.panko_api.public_port }}>
|
||||
WSGIDaemonProcess panko-api processes=2 threads=10 user=panko display-name=%{GROUP}
|
||||
WSGIDaemonProcess panko-api processes={{ options.wsgi_worker_context.processes }} threads=10 user=panko display-name=%{GROUP}
|
||||
WSGIProcessGroup panko-api
|
||||
WSGIScriptAlias / /usr/lib/python2.7/dist-packages/panko/api/app.wsgi
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Listen {{ options.service_listen_info.panko_api.public_port }}
|
||||
|
||||
<VirtualHost *:{{ options.service_listen_info.panko_api.public_port }}>
|
||||
WSGIDaemonProcess panko-api processes=2 threads=10 user=panko display-name=%{GROUP}
|
||||
WSGIDaemonProcess panko-api processes={{ options.wsgi_worker_context.processes }} threads=10 user=panko display-name=%{GROUP}
|
||||
WSGIProcessGroup panko-api
|
||||
WSGIScriptAlias / /usr/lib/python2.7/dist-packages/panko/api/app.wsgi
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# charm-proof
|
||||
charm-tools>=2.0.0
|
||||
# amulet deployment helpers
|
||||
bzr+lp:charm-helpers#egg=charmhelpers
|
||||
git+https://github.com/juju/charm-helpers#egg=charmhelpers
|
||||
# BEGIN: Amulet OpenStack Charm Helper Requirements
|
||||
# Liberty client lower constraints
|
||||
amulet>=1.14.3,<2.0
|
||||
|
@ -17,4 +17,4 @@ python-openstackclient>=1.7.0,<2.0
|
|||
python-swiftclient>=2.6.0,<3.0
|
||||
pika>=0.10.0,<1.0
|
||||
distro-info
|
||||
# END: Amulet OpenStack Charm Helper Requirements
|
||||
# END: Amulet OpenStack Charm Helper Requirements
|
||||
|
|
|
@ -40,7 +40,7 @@ class PankoCharmDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
self._deploy()
|
||||
|
||||
u.log.info('Waiting on extended status checks...')
|
||||
exclude_services = ['mysql', 'mongodb']
|
||||
exclude_services = ['percona-cluster', 'mongodb']
|
||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||
|
||||
self._initialize_tests()
|
||||
|
@ -54,7 +54,7 @@ class PankoCharmDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
"""
|
||||
this_service = {'name': 'panko'}
|
||||
other_services = [
|
||||
{'name': 'mysql'},
|
||||
{'name': 'percona-cluster'},
|
||||
{'name': 'mongodb'},
|
||||
{'name': 'ceilometer'},
|
||||
{'name': 'keystone'},
|
||||
|
@ -66,11 +66,11 @@ class PankoCharmDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
def _add_relations(self):
|
||||
"""Add all of the relations for the services."""
|
||||
relations = {
|
||||
'keystone:shared-db': 'mysql:shared-db',
|
||||
'keystone:shared-db': 'percona-cluster:shared-db',
|
||||
'panko:identity-service': 'keystone:identity-service',
|
||||
'panko:shared-db': 'mysql:shared-db',
|
||||
'panko:shared-db': 'percona-cluster:shared-db',
|
||||
'ceilometer:identity-service': 'keystone:identity-service',
|
||||
'ceilometer:shared-db': 'monogdb:database',
|
||||
'ceilometer:shared-db': 'mongodb:database',
|
||||
'ceilometer:amqp': 'rabbitmq-server:amqp',
|
||||
}
|
||||
super(PankoCharmDeployment, self)._add_relations(relations)
|
||||
|
@ -89,7 +89,7 @@ class PankoCharmDeployment(amulet_deployment.OpenStackAmuletDeployment):
|
|||
"""Perform final initialization before tests get run."""
|
||||
# Access the sentries for inspecting service units
|
||||
self.panko_sentry = self.d.sentry['panko'][0]
|
||||
self.mysql_sentry = self.d.sentry['mysql'][0]
|
||||
self.pxc_sentry = self.d.sentry['percona-cluster'][0]
|
||||
self.keystone_sentry = self.d.sentry['keystone'][0]
|
||||
self.panko_svcs = ['haproxy', 'apache2']
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic Panko Charm deployment on zesty-ocata."""
|
||||
|
||||
from basic_deployment import PankoCharmDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = PankoCharmDeployment(series='zesty')
|
||||
deployment.run_tests()
|
|
@ -35,7 +35,7 @@ commands =
|
|||
# Run a specific test as an Amulet smoke test (expected to always pass)
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy
|
||||
bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-ocata --no-destroy
|
||||
|
||||
[testenv:func27-dfs]
|
||||
# Run all deploy-from-source tests which are +x (may not always pass!)
|
||||
|
@ -50,4 +50,4 @@ commands =
|
|||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
commands = {posargs}
|
||||
|
|
Loading…
Reference in New Issue