bring Heat APis multi workkers

This commit is contained in:
Emilien Macchi 2014-05-06 06:49:24 +02:00
parent db4a12cb90
commit fbb89154a1
2 changed files with 17 additions and 8 deletions

View File

@ -21,23 +21,27 @@ class cloud::orchestration::api(
$ks_heat_cfn_internal_port = 8000, $ks_heat_cfn_internal_port = 8000,
$ks_heat_cloudwatch_internal_port = 8003, $ks_heat_cloudwatch_internal_port = 8003,
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
$workers = $::processorcount,
) { ) {
include 'cloud::orchestration' include 'cloud::orchestration'
class { 'heat::api': class { 'heat::api':
bind_host => $api_eth, bind_host => $api_eth,
bind_port => $ks_heat_internal_port bind_port => $ks_heat_internal_port,
workers => $workers
} }
class { 'heat::api_cfn': class { 'heat::api_cfn':
bind_host => $api_eth, bind_host => $api_eth,
bind_port => $ks_heat_cfn_internal_port bind_port => $ks_heat_cfn_internal_port,
workers => $workers
} }
class { 'heat::api_cloudwatch': class { 'heat::api_cloudwatch':
bind_host => $api_eth, bind_host => $api_eth,
bind_port => $ks_heat_cloudwatch_internal_port bind_port => $ks_heat_cloudwatch_internal_port,
workers => $workers
} }
@@haproxy::balancermember{"${::fqdn}-heat_api": @@haproxy::balancermember{"${::fqdn}-heat_api":

View File

@ -73,15 +73,18 @@ describe 'cloud::orchestration::api' do
it 'configure heat api' do it 'configure heat api' do
should contain_class('heat::api').with( should contain_class('heat::api').with(
:bind_host => '10.0.0.1', :bind_host => '10.0.0.1',
:bind_port => '8004' :bind_port => '8004',
:workers => '8'
) )
should contain_class('heat::api_cfn').with( should contain_class('heat::api_cfn').with(
:bind_host => '10.0.0.1', :bind_host => '10.0.0.1',
:bind_port => '8000' :bind_port => '8000',
:workers => '8'
) )
should contain_class('heat::api_cloudwatch').with( should contain_class('heat::api_cloudwatch').with(
:bind_host => '10.0.0.1', :bind_host => '10.0.0.1',
:bind_port => '8003' :bind_port => '8003',
:workers => '8'
) )
end end
@ -98,7 +101,8 @@ describe 'cloud::orchestration::api' do
context 'on Debian platforms' do context 'on Debian platforms' do
let :facts do let :facts do
{ :osfamily => 'Debian' } { :osfamily => 'Debian',
:processorcount => '8' }
end end
it_configures 'openstack orchestration api' it_configures 'openstack orchestration api'
@ -106,7 +110,8 @@ describe 'cloud::orchestration::api' do
context 'on RedHat platforms' do context 'on RedHat platforms' do
let :facts do let :facts do
{ :osfamily => 'RedHat' } { :osfamily => 'RedHat',
:processorcount => '8' }
end end
it_configures 'openstack orchestration api' it_configures 'openstack orchestration api'