Remove hard-coded API ports to use params instead

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-01-08 11:48:08 +01:00
parent 46b81795fd
commit 4c1bbf6ea8
6 changed files with 32 additions and 18 deletions

View File

@ -21,6 +21,10 @@ class privatecloud::compute::controller(
$ks_nova_password = $os_params::ks_nova_password, $ks_nova_password = $os_params::ks_nova_password,
$neutron_metadata_proxy_shared_secret = $os_params::neutron_metadata_proxy_shared_secret, $neutron_metadata_proxy_shared_secret = $os_params::neutron_metadata_proxy_shared_secret,
$api_eth = $os_params::api_eth, $api_eth = $os_params::api_eth,
$spice_port = $os_params::spice_port,
$ks_nova_public_port = $os_params::ks_nova_public_port,
$ks_ec2_public_port = $os_params::ks_ec2_public_port,
$ks_metadata_public_port = $os_params::ks_metadata_public_port
){ ){
include 'privatecloud::compute' include 'privatecloud::compute'
@ -48,7 +52,7 @@ class privatecloud::compute::controller(
listening_service => 'ec2_api_cluster', listening_service => 'ec2_api_cluster',
server_names => $::hostname, server_names => $::hostname,
ipaddresses => $api_eth, ipaddresses => $api_eth,
ports => '8773', ports => $ks_ec2_public_port,
options => 'check inter 2000 rise 2 fall 5' options => 'check inter 2000 rise 2 fall 5'
} }
@ -56,7 +60,7 @@ class privatecloud::compute::controller(
listening_service => 'nova_api_cluster', listening_service => 'nova_api_cluster',
server_names => $::hostname, server_names => $::hostname,
ipaddresses => $api_eth, ipaddresses => $api_eth,
ports => '8774', ports => $ks_nova_public_port,
options => 'check inter 2000 rise 2 fall 5' options => 'check inter 2000 rise 2 fall 5'
} }
@ -64,7 +68,7 @@ class privatecloud::compute::controller(
listening_service => 'metadata_api_cluster', listening_service => 'metadata_api_cluster',
server_names => $::hostname, server_names => $::hostname,
ipaddresses => $api_eth, ipaddresses => $api_eth,
ports => '8775', ports => $ks_metadata_public_port,
options => 'check inter 2000 rise 2 fall 5' options => 'check inter 2000 rise 2 fall 5'
} }
@ -72,7 +76,7 @@ class privatecloud::compute::controller(
listening_service => 'spice_cluster', listening_service => 'spice_cluster',
server_names => $::hostname, server_names => $::hostname,
ipaddresses => $api_eth, ipaddresses => $api_eth,
ports => '6082', ports => $spice_port,
options => 'check inter 2000 rise 2 fall 5' options => 'check inter 2000 rise 2 fall 5'
} }

View File

@ -301,6 +301,7 @@ class privatecloud::identity (
$ks_nova_password = $os_params::ks_nova_password, $ks_nova_password = $os_params::ks_nova_password,
$ks_nova_public_host = $os_params::ks_nova_public_host, $ks_nova_public_host = $os_params::ks_nova_public_host,
$ks_nova_public_proto = $os_params::ks_nova_public_proto, $ks_nova_public_proto = $os_params::ks_nova_public_proto,
$ks_nova_public_port = $os_params::ks_nova_public_port,
$ks_swift_dispersion_password = $os_params::ks_swift_dispersion_password, $ks_swift_dispersion_password = $os_params::ks_swift_dispersion_password,
$ks_swift_internal_host = $os_params::ks_swift_internal_host, $ks_swift_internal_host = $os_params::ks_swift_internal_host,
$ks_swift_internal_port = $os_params::ks_swift_internal_port, $ks_swift_internal_port = $os_params::ks_swift_internal_port,
@ -321,7 +322,7 @@ class privatecloud::identity (
class { 'keystone': class { 'keystone':
enabled => false, enabled => false,
admin_token => $ks_admin_token, admin_token => $ks_admin_token,
compute_port => '8774', compute_port => $ks_nova_public_port,
debug => $debug, debug => $debug,
idle_timeout => 60, idle_timeout => 60,
log_facility => 'LOG_LOCAL0', log_facility => 'LOG_LOCAL0',

View File

@ -22,6 +22,8 @@ class privatecloud::orchestration::engine(
$ks_heat_public_host = $os_params::ks_heat_public_host, $ks_heat_public_host = $os_params::ks_heat_public_host,
$ks_heat_public_proto = $os_params::ks_heat_public_proto, $ks_heat_public_proto = $os_params::ks_heat_public_proto,
$ks_heat_password = $os_params::ks_heat_password, $ks_heat_password = $os_params::ks_heat_password,
$ks_heat_cfn_public_port = $os_params::ks_heat_cfn_public_port,
$ks_heat_cloudwatch_public_port = $os_params::ks_heat_cloudwatch_public_port,
$auth_encryption_key = $os_params::heat_auth_encryption_key $auth_encryption_key = $os_params::heat_auth_encryption_key
) { ) {
@ -30,9 +32,9 @@ class privatecloud::orchestration::engine(
class { 'heat::engine': class { 'heat::engine':
enabled => $enabled, enabled => $enabled,
auth_encryption_key => $auth_encryption_key, auth_encryption_key => $auth_encryption_key,
heat_metadata_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:8000", heat_metadata_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:${ks_heat_cfn_public_port}",
heat_waitcondition_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:8000/v1/waitcondition", heat_waitcondition_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:${ks_heat_cfn_public_port}/v1/waitcondition",
heat_watch_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:8003" heat_watch_server_url => "${ks_heat_public_proto}://${ks_heat_public_host}:${ks_heat_cloudwatch_public_port}"
} }
} }

View File

@ -39,6 +39,10 @@ describe 'privatecloud::compute::controller' do
{ :ks_keystone_internal_host => '10.0.0.1', { :ks_keystone_internal_host => '10.0.0.1',
:ks_nova_password => 'secrete', :ks_nova_password => 'secrete',
:api_eth => '10.0.0.1', :api_eth => '10.0.0.1',
:spice_port => '6082',
:ks_ec2_public_port => '8773',
:ks_nova_public_port => '8774',
:ks_metadata_public_port => '8775',
:neutron_metadata_proxy_shared_secret => 'secrete' } :neutron_metadata_proxy_shared_secret => 'secrete' }
end end

View File

@ -71,6 +71,7 @@ describe 'privatecloud::identity' do
:ks_nova_password => 'secrete', :ks_nova_password => 'secrete',
:ks_nova_public_host => '10.0.0.1', :ks_nova_public_host => '10.0.0.1',
:ks_nova_public_proto => 'http', :ks_nova_public_proto => 'http',
:ks_nova_public_port => '8774',
:ks_swift_dispersion_password => 'secrete', :ks_swift_dispersion_password => 'secrete',
:ks_swift_internal_host => '10.0.0.1', :ks_swift_internal_host => '10.0.0.1',
:ks_swift_internal_port => '8080', :ks_swift_internal_port => '8080',

View File

@ -47,6 +47,8 @@ describe 'privatecloud::orchestration::engine' do
:auth_encryption_key => 'secrete', :auth_encryption_key => 'secrete',
:ks_heat_public_host => '10.0.0.1', :ks_heat_public_host => '10.0.0.1',
:ks_heat_public_proto => 'http', :ks_heat_public_proto => 'http',
:ks_heat_cfn_public_port => '8000',
:ks_heat_cloudwatch_public_port => '8003',
:ks_heat_password => 'secrete' } :ks_heat_password => 'secrete' }
end end