From 5fe55a5ad4e4fa6d9f664c5523f8e3974688aece Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 10 Aug 2023 00:39:17 +0900 Subject: [PATCH] Magnum: Use httpd + mod_wsgi to run api service httpd + mod_wsgi is now widely used to deploy api services. This updates the deployment pattern of Magnum api service to follow that standard. Change-Id: Id6cf3384fc3f667142be61b2ba9ec0a27c1a218d --- manifests/magnum.pp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/manifests/magnum.pp b/manifests/magnum.pp index 682983a10..87220bc45 100644 --- a/manifests/magnum.pp +++ b/manifests/magnum.pp @@ -20,15 +20,10 @@ class openstack_integration::magnum ( if $::openstack_integration::config::ssl { openstack_integration::ssl_key { 'magnum': + notify => Service['httpd'], require => Package['magnum-common'], } - $key_file = "/etc/magnum/ssl/private/${facts['networking']['fqdn']}.pem" - $crt_file = $::openstack_integration::params::cert_path - File[$key_file] ~> Service<| tag == 'magnum-service' |> - Exec['update-ca-certificates'] ~> Service<| tag == 'magnum-service' |> - } else { - $key_file = undef - $crt_file = undef + Exec['update-ca-certificates'] ~> Service['httpd'] } class { 'magnum::keystone::auth': @@ -102,10 +97,15 @@ class openstack_integration::magnum ( } class { 'magnum::api': - host => $::openstack_integration::config::host, - enabled_ssl => $::openstack_integration::config::ssl, - ssl_cert_file => $crt_file, - ssl_key_file => $key_file + host => $::openstack_integration::config::host, + service_name => 'httpd', + } + class { 'magnum::wsgi::apache': + bind_host => $::openstack_integration::config::host, + ssl => $::openstack_integration::config::ssl, + ssl_key => "/etc/magnum/ssl/private/${facts['networking']['fqdn']}.pem", + ssl_cert => $::openstack_integration::params::cert_path, + workers => 2, } class { 'magnum::conductor':