From 7115e28f928666dc611afe96fce4e97a7aa21d86 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 21 Feb 2023 15:08:32 +0900 Subject: [PATCH] Trove: Use httpd+mod_wsgi to run trove-api Currently httpd + mod_wsgi is globally used to run api services instead of standalone eventlet service. This ensures we use this method to deploy trove-api. Depends-on: https://review.opendev.org/c/openstack/puppet-trove/+/874531 Change-Id: I35dd3acb487618eb8ad0dd7710b02f5a4d98b672 --- manifests/trove.pp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/manifests/trove.pp b/manifests/trove.pp index 6e851a532..c64bf5fae 100644 --- a/manifests/trove.pp +++ b/manifests/trove.pp @@ -10,15 +10,10 @@ class openstack_integration::trove { if $::openstack_integration::config::ssl { openstack_integration::ssl_key { 'trove': + notify => Service['httpd'], require => Package['trove'], } - $key_file = "/etc/trove/ssl/private/${::fqdn}.pem" - $crt_file = $::openstack_integration::params::cert_path - File[$key_file] ~> Service<| tag == 'trove-service' |> - Exec['update-ca-certificates'] ~> Service<| tag == 'trove-service' |> - } else { - $key_file = undef - $crt_file = undef + Exec['update-ca-certificates'] ~> Service['httpd'] } class { 'trove::logging': @@ -68,11 +63,17 @@ class openstack_integration::trove { password => 'a_big_secret', auth_url => $::openstack_integration::config::keystone_auth_uri, } - class { 'trove::api': + include apache + class { 'trove::wsgi::apache': bind_host => $::openstack_integration::config::host, + ssl => $::openstack_integration::config::ssl, + ssl_key => "/etc/trove/ssl/private/${::fqdn}.pem", + ssl_cert => $::openstack_integration::params::cert_path, workers => 2, - cert_file => $crt_file, - key_file => $key_file, + } + class { 'trove::api': + bind_host => $::openstack_integration::config::host, + service_name => 'httpd', } class { 'trove::client': } class { 'trove::conductor':