Skip to content

Commit

Permalink
Partial-Bug: #1595577 - Allow Server Manager to configure webui cert,…
Browse files Browse the repository at this point in the history
… key paths

Added new config to config.global.js:

config.server_options = {};
config.server_options.key_file = ‘/etc/contrail/webui_ssl/cs-key.pem’;
config.server_options.cert_file = ‘/etc/contrail/webui_ssl/cs-cert.pem’;

Patch 2:
removing old params support - not necessary
Patch 3:
Typo in param name
Patch 4:
CI failure due to ASCII text

Change-Id: Ia476c0e909ea8df74331253ce198ecb19924e236
  • Loading branch information
nitishkrishna committed Jul 26, 2016
1 parent ac861b3 commit b8b0987
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions contrail/environment/modules/contrail/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@
$sriov_enable = false,
$keystone_mysql_service_password = undef,
$external_openstack_ip = undef,
$webui_key_file_path = '/etc/contrail/webui_ssl/cs-key.pem',
$webui_cert_file_path = '/etc/contrail/webui_ssl/cs-cert.pem',
) {
class { '::contrail::params':
# Common Parameters
Expand Down Expand Up @@ -894,6 +896,9 @@
storage_pool_config => hiera(contrail::storage::pool_config, hiera(contrail::params::pool_config, $storage_pool_config)),
storage_compute_name_list => hiera(contrail::storage-compute::storage-compute_name_list, $storage_compute_name_list),
storage_master_name_list => hiera(contrail::storage-master::storage-master_name_list, $storage_master_name_list),
#Webui Parameters
webui_key_file_path => hiera(contrail::webui::key_file_path, $webui_key_file_path),
webui_cert_file_path => hiera(contrail::webui::cert_file_path, $webui_cert_file_path),
# tsn Parameters
tsn_ip_list => hiera(contrail::tsn::tsn_ip_list, hiera(contrail::params::tsn_ip_list, $tsn_ip_list)),
tsn_name_list => hiera(contrail::tsn::tsn_name_list, hiera(contrail::params::tsn_name_list, $tsn_name_list)),
Expand Down
10 changes: 10 additions & 0 deletions contrail/environment/modules/contrail/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@
# Neutron IP to use for Nova when using an external openstack
# (optional) - Defaults to undef
#
# [*webui_key_file_path*]
# Path for Webui SSL Key File
# (optional) - Defaults to '/etc/contrail/webui_ssl/cs-key.pem'
#
# [*webui_cert_file_path*]
# Path for Webui SSL Cert File
# (optional) - Defaults to '/etc/contrail/webui_ssl/cs-cert.pem'
#
class contrail::params (
$host_ip,
$uuid,
Expand Down Expand Up @@ -735,6 +743,8 @@
$openstack_controller_address_management,
$openstack_controller_address_api,
$external_openstack_ip,
$webui_key_file_path,
$webui_cert_file_path,
) {
if (($contrail_internal_vip != '') or
($internal_vip != '') or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
$config_ip_to_use = $::contrail::params::config_ip_to_use,
$collector_ip_to_use = $::contrail::params::collector_ip_to_use,
$keystone_ip_to_use = $::contrail::params::keystone_ip_to_use,
$openstack_ip_to_use = $::contrail::params::openstack_ip_to_use
$openstack_ip_to_use = $::contrail::params::openstack_ip_to_use,
$webui_key_file_path = $::contrail::params::webui_key_file_path,
$webui_cert_file_path = $::contrail::params::webui_cert_file_path,
) {

if ($is_storage_master) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,6 @@ config.getDomainsFromApiServer = false;

// Export this as a module.
module.exports = config;

config.server_options = {};
config.server_options.key_file = '<%= @webui_key_file_path %>';
config.server_options.cert_file = '<%= @webui_cert_file_path %>';

0 comments on commit b8b0987

Please sign in to comment.