diff --git a/src/layer.yaml b/src/layer.yaml index 8183f23..466cf5b 100644 --- a/src/layer.yaml +++ b/src/layer.yaml @@ -1,4 +1,5 @@ includes: ['layer:openstack-api', 'interface:panko'] +repo: 'https://github.com/openstack/charm-panko' options: basic: use_venv: True diff --git a/src/templates/ocata/panko-api.conf b/src/templates/ocata/panko-api.conf index fd0dd89..328f022 100644 --- a/src/templates/ocata/panko-api.conf +++ b/src/templates/ocata/panko-api.conf @@ -7,7 +7,7 @@ Listen {{ 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} diff --git a/src/templates/panko-api.conf b/src/templates/panko-api.conf index fd0dd89..328f022 100644 --- a/src/templates/panko-api.conf +++ b/src/templates/panko-api.conf @@ -7,7 +7,7 @@ Listen {{ 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} diff --git a/src/test-requirements.txt b/src/test-requirements.txt index 7d907c4..cb4b5bb 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -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 \ No newline at end of file +# END: Amulet OpenStack Charm Helper Requirements diff --git a/src/tests/basic_deployment.py b/src/tests/basic_deployment.py index 7d82b32..aba3966 100644 --- a/src/tests/basic_deployment.py +++ b/src/tests/basic_deployment.py @@ -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'] diff --git a/src/tests/gate-basic-zesty-ocata b/src/tests/gate-basic-zesty-ocata deleted file mode 100755 index 74afd84..0000000 --- a/src/tests/gate-basic-zesty-ocata +++ /dev/null @@ -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() diff --git a/src/tox.ini b/src/tox.ini index 879671c..bb794e7 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -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} \ No newline at end of file +commands = {posargs}