General Fixes
* Point at consilidated rock * Add telemetry charms to functional test bundle * Disable aodh-wsgi in api container
This commit is contained in:
parent
d160bc68d0
commit
1a2e4ea4bc
@ -34,23 +34,23 @@ resources:
|
||||
aodh-api-image:
|
||||
type: oci-image
|
||||
description: OCI image for OpenStack aodh
|
||||
upstream-source: kolla/ubuntu-binary-aodh-notifier:yoga
|
||||
upstream-source: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-evaluator-image:
|
||||
type: oci-image
|
||||
description: OCI image for OpenStack aodh
|
||||
upstream-source: kolla/ubuntu-binary-aodh-evaluator:yoga
|
||||
upstream-source: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-notifier-image:
|
||||
type: oci-image
|
||||
description: OCI image for OpenStack aodh
|
||||
upstream-source: kolla/ubuntu-binary-aodh-notifier:yoga
|
||||
upstream-source: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-listener-image:
|
||||
type: oci-image
|
||||
description: OCI image for OpenStack aodh
|
||||
upstream-source: kolla/ubuntu-binary-aodh-listener:yoga
|
||||
upstream-source: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-expirer-image:
|
||||
type: oci-image
|
||||
description: OCI image for OpenStack aodh
|
||||
upstream-source: kolla/ubuntu-binary-aodh-expirer:yoga
|
||||
upstream-source: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
|
||||
requires:
|
||||
database:
|
||||
|
@ -7,6 +7,7 @@ This charm provide Aodh services as part of an OpenStack deployment
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
import ops.pebble
|
||||
import ops_sunbeam.charm as sunbeam_charm
|
||||
import ops_sunbeam.container_handlers as sunbeam_chandlers
|
||||
import ops_sunbeam.core as sunbeam_core
|
||||
@ -22,6 +23,19 @@ AODH_LISTENER_CONTAINER = "aodh-listener"
|
||||
AODH_EXPIRER_CONTAINER = "aodh-expirer"
|
||||
|
||||
|
||||
class AODHWSGIPebbleHandler(sunbeam_chandlers.WSGIPebbleHandler):
|
||||
"""Pebble handler for AODH api service."""
|
||||
|
||||
def init_service(self, context) -> None:
|
||||
"""Initialise the container."""
|
||||
try:
|
||||
self.execute(["a2dissite", "aodh-api"], exception_on_error=True)
|
||||
except ops.pebble.ExecError:
|
||||
logger.exception("Failed to disable aodh-api site in apache")
|
||||
|
||||
super().init_service(context)
|
||||
|
||||
|
||||
class AODHEvaluatorPebbleHandler(sunbeam_chandlers.ServicePebbleHandler):
|
||||
"""Pebble handler for AODH Evaluator."""
|
||||
|
||||
@ -230,7 +244,7 @@ class AodhOperatorCharm(sunbeam_charm.OSBaseOperatorAPICharm):
|
||||
# else:
|
||||
# enable_expirer = False
|
||||
pebble_handlers = [
|
||||
sunbeam_chandlers.WSGIPebbleHandler(
|
||||
AODHWSGIPebbleHandler(
|
||||
self,
|
||||
AODH_WSGI_CONTAINER,
|
||||
self.service_name,
|
||||
|
@ -40,17 +40,26 @@ applications:
|
||||
storage:
|
||||
fernet-keys: 5M
|
||||
credential-keys: 5M
|
||||
|
||||
gnocchi:
|
||||
charm: gnocchi-k8s
|
||||
channel: edge
|
||||
scale: 1
|
||||
trust: true
|
||||
ceilometer:
|
||||
charm: ceilometer-k8s
|
||||
channel: edge
|
||||
scale: 1
|
||||
trust: true
|
||||
aodh:
|
||||
charm: ../../aodh-k8s.charm
|
||||
scale: 1
|
||||
trust: true
|
||||
resources:
|
||||
aodh-api-image: kolla/ubuntu-binary-aodh-notifier:yoga
|
||||
aodh-evaluator-image: kolla/ubuntu-binary-aodh-evaluator:yoga
|
||||
aodh-notifier-image: kolla/ubuntu-binary-aodh-notifier:yoga
|
||||
aodh-listener-image: kolla/ubuntu-binary-aodh-listener:yoga
|
||||
aodh-expirer-image: kolla/ubuntu-binary-aodh-expirer:yoga
|
||||
aodh-api-image: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-evaluator-image: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-notifier-image: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-listener-image: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
aodh-expirer-image: ghcr.io/openstack-snaps/aodh-consolidated:2023.1
|
||||
|
||||
relations:
|
||||
- - traefik:ingress
|
||||
@ -72,3 +81,17 @@ relations:
|
||||
- - traefik-public:ingress
|
||||
- aodh:ingress-public
|
||||
|
||||
- - mysql:database
|
||||
- gnocchi:database
|
||||
- - traefik:ingress
|
||||
- gnocchi:ingress-internal
|
||||
- - traefik-public:ingress
|
||||
- gnocchi:ingress-public
|
||||
- - keystone:identity-service
|
||||
- gnocchi:identity-service
|
||||
|
||||
- - rabbitmq:amqp
|
||||
- ceilometer:amqp
|
||||
- - keystone:identity-credentials
|
||||
- ceilometer:identity-credentials
|
||||
|
||||
|
@ -89,7 +89,11 @@ class TestAodhOperatorCharm(test_utils.CharmTestCase):
|
||||
self.harness.set_leader()
|
||||
test_utils.set_all_pebbles_ready(self.harness)
|
||||
|
||||
app_setup_cmds = [["a2ensite", "wsgi-aodh-api"], ["aodh-dbsync"]]
|
||||
app_setup_cmds = [
|
||||
["a2ensite", "wsgi-aodh-api"],
|
||||
["aodh-dbsync"],
|
||||
["a2dissite", "aodh-api"],
|
||||
]
|
||||
for cmd in app_setup_cmds:
|
||||
self.assertIn(cmd, self.container_calls.execute["aodh-api"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user