Add worker config support
Allow the various workers to be configured as attributes. The engine one is based upon cpu, so default is nil just like in Compute. The others default to zero, so used that. Change-Id: Id7382ceeb4daeb6136e4b10546eed26901fbc3eb Closes-Bug: #1452734
This commit is contained in:
parent
c0e89882e5
commit
ffe3f30c05
|
@ -60,6 +60,10 @@ Attributes for the Heat service are in the ['openstack']['orchestration'] namesp
|
|||
* `openstack['orchestration']['rabbit_server_chef_role']` - The name of the Chef role that knows about the message queue server
|
||||
* `openstack['orchestration']['user']` - User heat runs as
|
||||
* `openstack['orchestration']['group']` - Group heat runs as
|
||||
* `openstack['orchestration']['num_engine_workers']` - Number of heat-engine processes to fork and run.
|
||||
* `openstack['orchestration']['api']['workers']` - Number of workers for Heat api service.
|
||||
* `openstack['orchestration']['api_cfn']['workers']` - Number of workers for Heat api cfn service.
|
||||
* `openstack['orchestration']['api_cloudwatch']['workers']` - Number of workers for Heat api cloudwatch service.
|
||||
* `openstack['orchestration']['db']['username']` - Username for heat database access
|
||||
* `openstack['orchestration']['api']['adminURL']` - Used when registering heat endpoint with keystone
|
||||
* `openstack['orchestration']['api']['internalURL']` - Used when registering heat endpoint with keystone
|
||||
|
|
|
@ -30,6 +30,15 @@ default['openstack']['orchestration']['log_dir'] = '/var/log/heat'
|
|||
# This is the name of the Chef role that will install the Keystone Service API
|
||||
default['openstack']['orchestration']['identity_service_chef_role'] = 'os-identity'
|
||||
|
||||
# Number of heat-engine processes to fork and run.
|
||||
default['openstack']['orchestration']['num_engine_workers'] = nil
|
||||
# Number of workers for Heat api service.
|
||||
default['openstack']['orchestration']['api']['workers'] = 0
|
||||
# Number of workers for Heat api cfn service.
|
||||
default['openstack']['orchestration']['api_cfn']['workers'] = 0
|
||||
# Number of workers for Heat api cloudwatch service.
|
||||
default['openstack']['orchestration']['api_cloudwatch']['workers'] = 0
|
||||
|
||||
# Gets set in the Heat Endpoint when registering with Keystone
|
||||
default['openstack']['orchestration']['region'] = node['openstack']['region']
|
||||
|
||||
|
|
|
@ -133,6 +133,27 @@ shared_examples 'expects to create heat conf' do
|
|||
)
|
||||
end
|
||||
|
||||
describe 'workers' do
|
||||
it 'has default worker values' do
|
||||
[
|
||||
'heat_api',
|
||||
'heat_api_cfn',
|
||||
'heat_api_cloudwatch'
|
||||
].each do |section|
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content(section, /^workers=0$/)
|
||||
end
|
||||
end
|
||||
|
||||
it 'has engine workers not set by default' do
|
||||
expect(chef_run).not_to render_config_file(file.name).with_section_content('DEFAULT', /^num_engine_workers=/)
|
||||
end
|
||||
|
||||
it 'allows engine workers override' do
|
||||
node.set['openstack']['orchestration']['num_engine_workers'] = 5
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^num_engine_workers=5$/)
|
||||
end
|
||||
end
|
||||
|
||||
it 'uses default values for these attributes and they are not set' do
|
||||
expect(chef_run).not_to render_file(file.name).with_content(
|
||||
/^memcached_servers=/)
|
||||
|
|
|
@ -201,8 +201,9 @@ stack_domain_admin_password=<%= @stack_domain_admin_password %>
|
|||
|
||||
# Number of heat-engine processes to fork and run. (integer
|
||||
# value)
|
||||
#num_engine_workers=1
|
||||
|
||||
<% if node['openstack']['orchestration']['num_engine_workers'] -%>
|
||||
num_engine_workers=<%= node['openstack']['orchestration']['num_engine_workers'] %>
|
||||
<% end -%>
|
||||
|
||||
#
|
||||
# Options defined in heat.common.crypt
|
||||
|
@ -1000,7 +1001,7 @@ bind_port=<%= @heat_api_bind.port %>
|
|||
#key_file=<None>
|
||||
|
||||
# Number of workers for Heat service. (integer value)
|
||||
#workers=0
|
||||
workers=<%= node['openstack']['orchestration']['api']['workers'] %>
|
||||
|
||||
# Maximum line size of message headers to be accepted.
|
||||
# max_header_line may need to be increased when using large
|
||||
|
@ -1035,7 +1036,7 @@ bind_port=<%= @heat_api_cfn_bind.port %>
|
|||
#key_file=<None>
|
||||
|
||||
# Number of workers for Heat service. (integer value)
|
||||
#workers=0
|
||||
workers=<%= node['openstack']['orchestration']['api_cfn']['workers'] %>
|
||||
|
||||
# Maximum line size of message headers to be accepted.
|
||||
# max_header_line may need to be increased when using large
|
||||
|
@ -1070,7 +1071,7 @@ bind_port=<%= @heat_api_cloudwatch_bind.port %>
|
|||
#key_file=<None>
|
||||
|
||||
# Number of workers for Heat service. (integer value)
|
||||
#workers=0
|
||||
workers=<%= node['openstack']['orchestration']['api_cloudwatch']['workers'] %>
|
||||
|
||||
# Maximum line size of message headers to be accepted.
|
||||
# max_header_line may need to be increased when using large
|
||||
|
|
Loading…
Reference in New Issue