diff --git a/manifests/orchestration/api.pp b/manifests/orchestration/api.pp index 3a2a8718..a1f0c988 100644 --- a/manifests/orchestration/api.pp +++ b/manifests/orchestration/api.pp @@ -21,23 +21,27 @@ class cloud::orchestration::api( $ks_heat_cfn_internal_port = 8000, $ks_heat_cloudwatch_internal_port = 8003, $api_eth = '127.0.0.1', + $workers = $::processorcount, ) { include 'cloud::orchestration' class { 'heat::api': bind_host => $api_eth, - bind_port => $ks_heat_internal_port + bind_port => $ks_heat_internal_port, + workers => $workers } class { 'heat::api_cfn': bind_host => $api_eth, - bind_port => $ks_heat_cfn_internal_port + bind_port => $ks_heat_cfn_internal_port, + workers => $workers } class { 'heat::api_cloudwatch': 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": diff --git a/spec/classes/cloud_orchestration_api_spec.rb b/spec/classes/cloud_orchestration_api_spec.rb index 093eb1a6..f4c332b8 100644 --- a/spec/classes/cloud_orchestration_api_spec.rb +++ b/spec/classes/cloud_orchestration_api_spec.rb @@ -73,15 +73,18 @@ describe 'cloud::orchestration::api' do it 'configure heat api' do should contain_class('heat::api').with( :bind_host => '10.0.0.1', - :bind_port => '8004' + :bind_port => '8004', + :workers => '8' ) should contain_class('heat::api_cfn').with( :bind_host => '10.0.0.1', - :bind_port => '8000' + :bind_port => '8000', + :workers => '8' ) should contain_class('heat::api_cloudwatch').with( :bind_host => '10.0.0.1', - :bind_port => '8003' + :bind_port => '8003', + :workers => '8' ) end @@ -98,7 +101,8 @@ describe 'cloud::orchestration::api' do context 'on Debian platforms' do let :facts do - { :osfamily => 'Debian' } + { :osfamily => 'Debian', + :processorcount => '8' } end it_configures 'openstack orchestration api' @@ -106,7 +110,8 @@ describe 'cloud::orchestration::api' do context 'on RedHat platforms' do let :facts do - { :osfamily => 'RedHat' } + { :osfamily => 'RedHat', + :processorcount => '8' } end it_configures 'openstack orchestration api'