[Ironic] Add haproxy service for RadosGW on baremetal network
Enable RadosGW support in Ironic. Added RadosGW haproxy service listen on baremetal VIP Added noop tests Change-Id: I2678b198e16a1f5c80c24f303794e89da16d1de0 Implements: blueprint fuel-integrate-ironic (partially)
This commit is contained in:
parent
ea3e9ffd22
commit
07c9cd1044
|
@ -29,6 +29,7 @@ class openstack::ha::radosgw (
|
|||
$public_virtual_ip,
|
||||
$server_names,
|
||||
$public_ssl = false,
|
||||
$baremetal_virtual_ip = undef,
|
||||
) {
|
||||
|
||||
# defaults for any haproxy_service within this class
|
||||
|
@ -49,4 +50,12 @@ class openstack::ha::radosgw (
|
|||
'option' => ['httplog', 'httpchk GET /'],
|
||||
},
|
||||
}
|
||||
|
||||
if $baremetal_virtual_ip {
|
||||
openstack::ha::haproxy_service { 'radosgw-baremetal':
|
||||
order => '135',
|
||||
public_virtual_ip => false,
|
||||
internal_virtual_ip => $baremetal_virtual_ip,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ notice('MODULAR: openstack-haproxy-radosgw.pp')
|
|||
$network_metadata = hiera_hash('network_metadata')
|
||||
$storage_hash = hiera_hash('storage', {})
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
|
||||
$ironic_hash = hiera_hash('ironic', {})
|
||||
|
||||
if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$storage_hash['images_vcenter'] {
|
||||
$use_swift = true
|
||||
|
@ -23,12 +23,17 @@ if $use_radosgw {
|
|||
$public_virtual_ip = hiera('public_vip')
|
||||
$internal_virtual_ip = hiera('management_vip')
|
||||
|
||||
if $ironic_hash['enabled'] {
|
||||
$baremetal_virtual_ip = $network_metadata['vips']['baremetal']['ipaddr']
|
||||
}
|
||||
|
||||
# configure radosgw ha proxy
|
||||
class { '::openstack::ha::radosgw':
|
||||
internal_virtual_ip => $internal_virtual_ip,
|
||||
ipaddresses => $ipaddresses,
|
||||
public_virtual_ip => $public_virtual_ip,
|
||||
server_names => $server_names,
|
||||
public_ssl => $public_ssl_hash['services'],
|
||||
internal_virtual_ip => $internal_virtual_ip,
|
||||
ipaddresses => $ipaddresses,
|
||||
public_virtual_ip => $public_virtual_ip,
|
||||
server_names => $server_names,
|
||||
public_ssl => $public_ssl_hash['services'],
|
||||
baremetal_virtual_ip => $baremetal_virtual_ip,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,29 @@ require 'shared-examples'
|
|||
manifest = 'openstack-haproxy/openstack-haproxy-radosgw.pp'
|
||||
|
||||
describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
images_ceph = Noop.hiera_structure 'storage/images_ceph'
|
||||
objects_ceph = Noop.hiera_structure 'storage/objects_ceph'
|
||||
if images_ceph and objects_ceph
|
||||
ironic_enabled = Noop.hiera_structure 'ironic/enabled'
|
||||
if ironic_enabled
|
||||
baremetal_virtual_ip = Noop.hiera_structure 'network_metadata/vips/baremetal/ipaddr'
|
||||
|
||||
it 'should declare ::openstack::ha::radosgw class with baremetal_virtual_ip' do
|
||||
should contain_class('openstack::ha::radosgw').with(
|
||||
'baremetal_virtual_ip' => baremetal_virtual_ip,
|
||||
)
|
||||
end
|
||||
it 'should declare openstack::ha::haproxy_service with name radosgw-baremetal' do
|
||||
should contain_openstack__ha__haproxy_service('radosgw-baremetal').with(
|
||||
'order' => '135',
|
||||
'public_virtual_ip' => false,
|
||||
'internal_virtual_ip' => baremetal_virtual_ip
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end # end of shared_examples
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue