From 8befe4fb09becbad024b52017d8f57604be77ab0 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Wed, 1 Nov 2017 15:54:54 +0800 Subject: [PATCH] Add customization for wsgi process display name Change-Id: I952b51508d5ec6ad6d0aab7e19df14f4dcd96ba3 Closes-Bug: #1626550 --- manifests/wsgi/apache.pp | 6 ++++++ manifests/wsgi/apache_api.pp | 6 ++++++ manifests/wsgi/apache_api_cfn.pp | 6 ++++++ manifests/wsgi/apache_api_cloudwatch.pp | 6 ++++++ .../add_wsgi_process_display_name-1359813a235ef934.yaml | 4 ++++ spec/classes/heat_wsgi_apache_api_cfn_spec.rb | 1 + spec/classes/heat_wsgi_apache_api_cloudwatch_spec.rb | 1 + spec/classes/heat_wsgi_apache_api_spec.rb | 1 + 8 files changed, 31 insertions(+) create mode 100644 releasenotes/notes/add_wsgi_process_display_name-1359813a235ef934.yaml diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index fb7671bf..4581d563 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -89,6 +89,10 @@ # { python-path => '/my/python/virtualenv' } # Defaults to {} # +# [*wsgi_process_display_name*] +# (optional) Name of the WSGI process display-name. +# Defaults to undef +# # == Dependencies # # requires Class['apache'] & Class['heat'] @@ -120,6 +124,7 @@ define heat::wsgi::apache ( $access_log_format = false, $error_log_file = undef, $custom_wsgi_process_options = {}, + $wsgi_process_display_name = undef, ) { if $title !~ /^api(|_cfn|_cloudwatch)$/ { fail('The valid options are api, api_cfn, api_cloudwatch') @@ -151,6 +156,7 @@ define heat::wsgi::apache ( user => 'heat', workers => $workers, wsgi_daemon_process => "heat_${title}", + wsgi_process_display_name => $wsgi_process_display_name, wsgi_process_group => "heat_${title}", wsgi_script_dir => $::heat::params::heat_wsgi_script_path, wsgi_script_file => "heat_${title}", diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index 00850920..b27cac20 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -81,6 +81,10 @@ # { python-path => '/my/python/virtualenv' } # Defaults to {} # +# [*wsgi_process_display_name*] +# (optional) Name of the WSGI process display-name. +# Defaults to undef +# # == Dependencies # # requires Class['apache'] & Class['heat'] @@ -111,6 +115,7 @@ class heat::wsgi::apache_api ( $access_log_format = false, $error_log_file = undef, $custom_wsgi_process_options = {}, + $wsgi_process_display_name = undef, ) { heat::wsgi::apache { 'api': port => $port, @@ -132,5 +137,6 @@ class heat::wsgi::apache_api ( access_log_file => $access_log_file, access_log_format => $access_log_format, error_log_file => $error_log_file, + wsgi_process_display_name => $wsgi_process_display_name, } } diff --git a/manifests/wsgi/apache_api_cfn.pp b/manifests/wsgi/apache_api_cfn.pp index a21f1818..4f8786d4 100644 --- a/manifests/wsgi/apache_api_cfn.pp +++ b/manifests/wsgi/apache_api_cfn.pp @@ -81,6 +81,10 @@ # { python-path => '/my/python/virtualenv' } # Defaults to {} # +# [*wsgi_process_display_name*] +# (optional) Name of the WSGI process display-name. +# Defaults to undef +# # == Dependencies # # requires Class['apache'] & Class['heat'] @@ -111,6 +115,7 @@ class heat::wsgi::apache_api_cfn ( $access_log_format = false, $error_log_file = undef, $custom_wsgi_process_options = {}, + $wsgi_process_display_name = undef, ) { # See custom fragment below @@ -150,5 +155,6 @@ class heat::wsgi::apache_api_cfn ( access_log_file => $access_log_file, access_log_format => $access_log_format, error_log_file => $error_log_file, + wsgi_process_display_name => $wsgi_process_display_name, } } diff --git a/manifests/wsgi/apache_api_cloudwatch.pp b/manifests/wsgi/apache_api_cloudwatch.pp index c6a2847e..d382f4f9 100644 --- a/manifests/wsgi/apache_api_cloudwatch.pp +++ b/manifests/wsgi/apache_api_cloudwatch.pp @@ -81,6 +81,10 @@ # { python-path => '/my/python/virtualenv' } # Defaults to {} # +# [*wsgi_process_display_name*] +# (optional) Name of the WSGI process display-name. +# Defaults to undef +# # == Dependencies # # requires Class['apache'] & Class['heat'] @@ -111,6 +115,7 @@ class heat::wsgi::apache_api_cloudwatch ( $access_log_format = false, $error_log_file = undef, $custom_wsgi_process_options = {}, + $wsgi_process_display_name = undef, ) { heat::wsgi::apache { 'api_cloudwatch': port => $port, @@ -132,5 +137,6 @@ class heat::wsgi::apache_api_cloudwatch ( access_log_file => $access_log_file, access_log_format => $access_log_format, error_log_file => $error_log_file, + wsgi_process_display_name => $wsgi_process_display_name, } } diff --git a/releasenotes/notes/add_wsgi_process_display_name-1359813a235ef934.yaml b/releasenotes/notes/add_wsgi_process_display_name-1359813a235ef934.yaml new file mode 100644 index 00000000..9738d3d8 --- /dev/null +++ b/releasenotes/notes/add_wsgi_process_display_name-1359813a235ef934.yaml @@ -0,0 +1,4 @@ +--- +features: + - Add wsgi_process_display_name option to add customization + for wsgi process display name. diff --git a/spec/classes/heat_wsgi_apache_api_cfn_spec.rb b/spec/classes/heat_wsgi_apache_api_cfn_spec.rb index 16a33375..4f0cc36b 100644 --- a/spec/classes/heat_wsgi_apache_api_cfn_spec.rb +++ b/spec/classes/heat_wsgi_apache_api_cfn_spec.rb @@ -18,6 +18,7 @@ describe 'heat::wsgi::apache_api_cfn' do :ssl_ca => nil, :ssl_crl_path => nil, :ssl_certs_dir => nil, + :wsgi_process_display_name => nil, :threads => 1, :priority => 10, :custom_wsgi_process_options => {}, diff --git a/spec/classes/heat_wsgi_apache_api_cloudwatch_spec.rb b/spec/classes/heat_wsgi_apache_api_cloudwatch_spec.rb index c32f46d6..93dfd86a 100644 --- a/spec/classes/heat_wsgi_apache_api_cloudwatch_spec.rb +++ b/spec/classes/heat_wsgi_apache_api_cloudwatch_spec.rb @@ -18,6 +18,7 @@ describe 'heat::wsgi::apache_api_cloudwatch' do :ssl_ca => nil, :ssl_crl_path => nil, :ssl_certs_dir => nil, + :wsgi_process_display_name => nil, :threads => 1, :priority => 10, :custom_wsgi_process_options => {}, ) diff --git a/spec/classes/heat_wsgi_apache_api_spec.rb b/spec/classes/heat_wsgi_apache_api_spec.rb index 096cea47..3ddc89e6 100644 --- a/spec/classes/heat_wsgi_apache_api_spec.rb +++ b/spec/classes/heat_wsgi_apache_api_spec.rb @@ -18,6 +18,7 @@ describe 'heat::wsgi::apache_api' do :ssl_ca => nil, :ssl_crl_path => nil, :ssl_certs_dir => nil, + :wsgi_process_display_name => nil, :threads => 1, :priority => 10, :custom_wsgi_process_options => {},