Fix endpoint ref in heat.conf
Change: I9ea0e1e61c23026bf24926b264e289ff80314ac2 missed a few lines in the heat.conf file. Added spec test for these. Change-Id: I50e697692dd835e6f985afae74868307a90f8e37 Closes-Bug: #1313814
This commit is contained in:
parent
79015202cc
commit
4fbf210d74
|
@ -1,6 +1,8 @@
|
|||
# CHANGELOG for cookbook-openstack-orchestration
|
||||
|
||||
This file is used to list changes made in each version of cookbook-openstack-orchestration
|
||||
## 9.1.2
|
||||
* Fix endpoint ref in heat conf
|
||||
|
||||
## 9.1.1
|
||||
* Revert bug 1279577 Create api-cfn identity registrations bug 1309123
|
||||
|
|
|
@ -4,7 +4,7 @@ maintainer 'IBM, Inc.'
|
|||
license 'Apache 2.0'
|
||||
description 'Installs and configures the Heat Service'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '9.1.1'
|
||||
version '9.1.2'
|
||||
recipe 'openstack-orchestration::api', 'Start and configure the Heat API service'
|
||||
recipe 'openstack-orchestration::api-cfn', 'Start and configure the Heat API CloudFormation service'
|
||||
recipe 'openstack-orchestration::api-cloudwatch', 'Start and configure the Heat API CloudWatch service'
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
# encoding: UTF-8
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-orchestration::common' do
|
||||
before { orchestration_stubs }
|
||||
before do
|
||||
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
@chef_run.converge 'openstack-orchestration::common'
|
||||
end
|
||||
|
||||
it 'installs python-keystone' do
|
||||
expect(@chef_run).to upgrade_package 'python-keystone'
|
||||
end
|
||||
|
||||
it 'installs the openstack-heat package' do
|
||||
expect(@chef_run).to upgrade_package 'heat-common'
|
||||
end
|
||||
|
||||
it 'installs mysql python packages by default' do
|
||||
expect(@chef_run).to upgrade_package 'python-mysqldb'
|
||||
end
|
||||
|
||||
it 'installs postgresql python packages if explicitly told' do
|
||||
chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
|
||||
node = chef_run.node
|
||||
node.set['openstack']['db']['orchestration']['service_type'] = 'postgresql'
|
||||
chef_run.converge 'openstack-orchestration::common'
|
||||
|
||||
expect(chef_run).to upgrade_package 'python-psycopg2'
|
||||
expect(chef_run).not_to upgrade_package 'MySQL-python'
|
||||
expect(chef_run).not_to upgrade_package 'python-ibm-db'
|
||||
expect(chef_run).not_to upgrade_package 'python-ibm-db-sa'
|
||||
end
|
||||
|
||||
describe '/etc/heat' do
|
||||
before do
|
||||
@dir = @chef_run.directory '/etc/heat'
|
||||
end
|
||||
|
||||
it 'has proper owner' do
|
||||
expect(@dir.owner).to eq('heat')
|
||||
end
|
||||
|
||||
it 'has proper modes' do
|
||||
expect(sprintf('%o', @dir.mode)).to eq '700'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe '/etc/heat/environment.d' do
|
||||
before do
|
||||
@dir = @chef_run.directory '/etc/heat/environment.d'
|
||||
end
|
||||
|
||||
it 'has proper owner' do
|
||||
expect(@dir.owner).to eq('heat')
|
||||
end
|
||||
|
||||
it 'has proper modes' do
|
||||
expect(sprintf('%o', @dir.mode)).to eq '700'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe '/var/cache/heat' do
|
||||
before do
|
||||
@dir = @chef_run.directory '/var/cache/heat'
|
||||
end
|
||||
|
||||
it 'has proper owner' do
|
||||
expect(@dir.owner).to eq('heat')
|
||||
end
|
||||
|
||||
it 'has proper modes' do
|
||||
expect(sprintf('%o', @dir.mode)).to eq '700'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'heat.conf' do
|
||||
before do
|
||||
@template = @chef_run.template '/etc/heat/heat.conf'
|
||||
end
|
||||
it 'has proper owner' do
|
||||
expect(@template.owner).to eq('heat')
|
||||
expect(@template.group).to eq('heat')
|
||||
end
|
||||
|
||||
it 'has proper modes' do
|
||||
expect(sprintf('%o', @template.mode)).to eq '644'
|
||||
end
|
||||
|
||||
# TODO: (MRV) Add rest of conf items
|
||||
[
|
||||
%r{^heat_metadata_server_url=http://127.0.0.1:8000$},
|
||||
%r{^heat_waitcondition_server_url=http://127.0.0.1:8000/waitcondition$},
|
||||
%r{^heat_watch_server_url=http://127.0.0.1:8003$}
|
||||
].each do |content|
|
||||
it "has a #{content.source[1...-1]} line" do
|
||||
expect(@chef_run).to render_file(@template.name).with_content(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'default.yaml' do
|
||||
before do
|
||||
@template = @chef_run.template '/etc/heat/environment.d/default.yaml'
|
||||
end
|
||||
|
||||
it 'has proper owner' do
|
||||
expect(@template.owner).to eq('heat')
|
||||
expect(@template.group).to eq('heat')
|
||||
end
|
||||
|
||||
it 'has proper modes' do
|
||||
expect(sprintf('%o', @template.mode)).to eq '644'
|
||||
end
|
||||
end
|
||||
|
||||
it 'runs db migrations' do
|
||||
cmd = 'heat-manage db_sync'
|
||||
expect(@chef_run).to run_execute(cmd)
|
||||
end
|
||||
end
|
|
@ -87,13 +87,13 @@ sql_connection=<%= @sql_connection %>
|
|||
#periodic_interval=60
|
||||
|
||||
# URL of the Heat metadata server. (string value)
|
||||
heat_metadata_server_url=http://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %>
|
||||
heat_metadata_server_url=http://<%= @heat_api_cfn_bind.host %>:<%= @heat_api_cfn_bind.port %>
|
||||
|
||||
# URL of the Heat waitcondition server. (string value)
|
||||
heat_waitcondition_server_url=http://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %><%= @heat_api_cfn_endpoint.path %>/waitcondition
|
||||
heat_waitcondition_server_url=http://<%= @heat_api_cfn_bind.host %>:<%= @heat_api_cfn_bind.port %><%= @heat_api_cfn_bind.path %>/waitcondition
|
||||
|
||||
# URL of the Heat CloudWatch server. (string value)
|
||||
heat_watch_server_url=http://<%= @heat_api_cloudwatch_endpoint.host %>:<%= @heat_api_cloudwatch_endpoint.port %>
|
||||
heat_watch_server_url=http://<%= @heat_api_cloudwatch_bind.host %>:<%= @heat_api_cloudwatch_bind.port %>
|
||||
|
||||
# Instance connection to CFN/CW API via https. (string value)
|
||||
#instance_connection_is_secure=0
|
||||
|
|
Loading…
Reference in New Issue