Fix for all possible storage cases
* Enable swift only if images and objects ceph are disabled * Enable Radosgw through YAQL * Set S3 endpoint using radosgw task Change-Id: Iead5167210c4132badb866afc25d4ef14e27f6b2 Closes-Bug: 1604879
This commit is contained in:
parent
30899cdca4
commit
f1dd09eef8
|
@ -6,7 +6,7 @@
|
|||
requires: [openstack-controller, primary-rabbitmq, rabbitmq, memcached]
|
||||
condition:
|
||||
yaql_exp: &swift_enabled >
|
||||
((not $.storage.objects_ceph or not $.storage.images_ceph) and
|
||||
((not $.storage.objects_ceph and not $.storage.images_ceph) and
|
||||
not $.storage.images_vcenter) and
|
||||
(changedAny($.network_scheme, $.network_metadata, $.swift,
|
||||
$.get('swift_master_role', 'primary-controller'),
|
||||
|
@ -52,7 +52,7 @@
|
|||
requires: [swift-proxy_storage]
|
||||
condition:
|
||||
yaql_exp: >
|
||||
((not $.storage.objects_ceph or not $.storage.images_ceph) and
|
||||
((not $.storage.objects_ceph and not $.storage.images_ceph) and
|
||||
not $.storage.images_vcenter) and
|
||||
(changedAny($.storage, $.get('swift_master_role', 'primary-controller'),
|
||||
$.get('swift_ring_min_part_hours'),('primary-controller' in $.roles)))
|
||||
|
@ -75,7 +75,7 @@
|
|||
required_for: [swift-proxy_storage]
|
||||
condition:
|
||||
yaql_exp: >
|
||||
((not $.storage.objects_ceph or not $.storage.images_ceph) and
|
||||
((not $.storage.objects_ceph and not $.storage.images_ceph) and
|
||||
not $.storage.images_vcenter) and
|
||||
(changedAny($.swift, $.network_metadata.vips,
|
||||
$.get('region', 'RegionOne'), $.public_ssl, $.get('use_ssl')))
|
||||
|
|
|
@ -55,7 +55,6 @@ class openstack_tasks::swift::proxy_storage {
|
|||
$swift_proxies_num = size(hiera('swift_proxies'))
|
||||
|
||||
# Use Swift if it isn't replaced by vCenter, Ceph for BOTH images and objects
|
||||
if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$storage_hash['images_vcenter'] {
|
||||
$master_swift_proxy_nodes = get_nodes_hash_by_roles($network_metadata, [$swift_master_role])
|
||||
$master_swift_proxy_nodes_list = values($master_swift_proxy_nodes)
|
||||
$master_swift_proxy_ip = regsubst($master_swift_proxy_nodes_list[0]['network_roles']['swift/api'], '\/\d+$', '')
|
||||
|
@ -198,6 +197,4 @@ class openstack_tasks::swift::proxy_storage {
|
|||
'realm1/cluster_name1': value => "${swift_public_protocol}://${swift_public_address}:8080/v1";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
class osnailyfacter::ceph::radosgw_keystone {
|
||||
|
||||
notice('MODULAR: ceph/radosgw_keystone.pp')
|
||||
|
||||
$storage_hash = hiera_hash('storage', {})
|
||||
|
||||
if $storage_hash['objects_ceph'] {
|
||||
$public_vip = hiera('public_vip')
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$management_vip = hiera('management_vip')
|
||||
|
@ -22,6 +23,10 @@ class osnailyfacter::ceph::radosgw_keystone {
|
|||
$internal_url = "${internal_protocol}://${internal_address}:8080/swift/v1"
|
||||
$admin_url = "${admin_protocol}://${admin_address}:8080/swift/v1"
|
||||
|
||||
$public_url_s3 = "${public_protocol}://${public_address}:8080"
|
||||
$internal_url_s3 = "${internal_protocol}://${internal_address}:8080"
|
||||
$admin_url_s3 = "${admin_protocol}://${admin_address}:8080"
|
||||
|
||||
class {'::osnailyfacter::wait_for_keystone_backends': }
|
||||
|
||||
keystone::resource::service_identity { 'radosgw':
|
||||
|
@ -34,8 +39,20 @@ class osnailyfacter::ceph::radosgw_keystone {
|
|||
public_url => $public_url,
|
||||
admin_url => $admin_url,
|
||||
internal_url => $internal_url,
|
||||
}->
|
||||
|
||||
keystone::resource::service_identity { 'radosgw_s3':
|
||||
configure_user => false,
|
||||
configure_user_role => false,
|
||||
service_type => 's3',
|
||||
service_description => 'Openstack Object-Store Service',
|
||||
service_name => 'swift_s3',
|
||||
region => $region,
|
||||
public_url => $public_url_s3,
|
||||
admin_url => $admin_url_s3,
|
||||
internal_url => $internal_url_s3,
|
||||
}
|
||||
|
||||
|
||||
Class['::osnailyfacter::wait_for_keystone_backends'] -> Keystone::Resource::Service_Identity['radosgw']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class osnailyfacter::openstack_haproxy::openstack_haproxy_radosgw {
|
|||
$external_lb = hiera('external_lb', false)
|
||||
|
||||
if !$external_lb {
|
||||
if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$storage_hash['images_vcenter'] {
|
||||
if (!$storage_hash['images_ceph'] and !$storage_hash['objects_ceph'] and !$storage_hash['images_vcenter']) {
|
||||
$use_swift = true
|
||||
} else {
|
||||
$use_swift = false
|
||||
|
|
|
@ -15,7 +15,7 @@ class osnailyfacter::openstack_haproxy::openstack_haproxy_swift {
|
|||
|
||||
$external_lb = hiera('external_lb', false)
|
||||
|
||||
if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$storage_hash['images_vcenter'] {
|
||||
if (!$storage_hash['images_ceph'] and !$storage_hash['objects_ceph'] and !$storage_hash['images_vcenter']) {
|
||||
$use_swift = true
|
||||
} else {
|
||||
$use_swift = false
|
||||
|
|
|
@ -64,14 +64,15 @@
|
|||
requires: [apache, ceph-mon, primary-ceph-mon]
|
||||
condition:
|
||||
yaql_exp: &ceph_radosgw >
|
||||
changedAny($.storage, $.keystone, $.network_metadata.vips,
|
||||
($.storage.objects_ceph and
|
||||
(changedAny($.storage, $.keystone, $.network_metadata.vips,
|
||||
$.get('external_lb'),
|
||||
$.network_metadata.nodes.values().where(
|
||||
('controller' in $.node_roles) or
|
||||
('primary-controller' in $.node_roles)),
|
||||
$.get('use_ssl'), ('primary-controller' in $.roles), $.network_scheme,
|
||||
$.get('apache_ports'), $.get('use_syslog'),
|
||||
$.get('syslog_log_facility_ceph'), $.get('syslog_log_level_ceph'))
|
||||
$.get('syslog_log_facility_ceph'), $.get('syslog_log_level_ceph'))))
|
||||
parameters:
|
||||
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/ceph/radosgw.pp
|
||||
puppet_modules: /etc/puppet/modules
|
||||
|
@ -108,8 +109,9 @@
|
|||
requires: [primary-keystone, keystone]
|
||||
condition:
|
||||
yaql_exp: >
|
||||
changedAny($.storage, $.network_metadata.vips,
|
||||
$.get('region', 'RegionOne'), $.public_ssl, $.get('use_ssl'))
|
||||
($.storage.objects_ceph and
|
||||
(changedAny($.storage, $.network_metadata.vips,
|
||||
$.get('region', 'RegionOne'), $.public_ssl, $.get('use_ssl'))))
|
||||
cross-depends:
|
||||
- name: /(primary-)?keystone/
|
||||
role: self
|
||||
|
|
Loading…
Reference in New Issue