From a56d95bd98c5aadd1b675515262dbfa9cecbb8f0 Mon Sep 17 00:00:00 2001 From: Nikita Koshikov Date: Fri, 5 Jun 2015 10:51:53 -0500 Subject: [PATCH] Possibility to detach haproxy from controllers - Added possibility to use custom_mysql_setup_class for database - Added possibility to overwrite controllers role with haproxy_nodes Partial blueprint: detach-components-from-controllers Change-Id: Ic76a6d7b7211e03dd5447a71b3c51ad5bb074dbe Co-Authored-By: Nikita Koshikov --- .../puppet/openstack/manifests/ha/haproxy.pp | 2 +- .../openstack-haproxy/openstack-haproxy.pp | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/deployment/puppet/openstack/manifests/ha/haproxy.pp b/deployment/puppet/openstack/manifests/ha/haproxy.pp index f5a41a55bd..ea3b619aae 100644 --- a/deployment/puppet/openstack/manifests/ha/haproxy.pp +++ b/deployment/puppet/openstack/manifests/ha/haproxy.pp @@ -66,7 +66,7 @@ class openstack::ha::haproxy ( } } - if $custom_mysql_setup_class == 'galera' or $custom_mysql_setup_class == 'percona' { + if ($custom_mysql_setup_class in ['galera', 'percona', 'percona_packages']) { class { 'openstack::ha::mysqld': is_primary_controller => $is_primary_controller, server_names => hiera_array('mysqld_names', $controllers_server_names), diff --git a/deployment/puppet/osnailyfacter/modular/openstack-haproxy/openstack-haproxy.pp b/deployment/puppet/osnailyfacter/modular/openstack-haproxy/openstack-haproxy.pp index 43ec7fe3ff..f2fa8a7914 100644 --- a/deployment/puppet/osnailyfacter/modular/openstack-haproxy/openstack-haproxy.pp +++ b/deployment/puppet/osnailyfacter/modular/openstack-haproxy/openstack-haproxy.pp @@ -1,11 +1,12 @@ notice('MODULAR: openstack-haproxy.pp') $use_neutron = hiera('use_neutron', false) -$ceilometer_hash = hiera('ceilometer',{}) -$sahara_hash = hiera('sahara', {}) -$murano_hash = hiera('murano', {}) -$storage_hash = hiera('storage', {}) +$ceilometer_hash = hiera_hash('ceilometer',{}) +$sahara_hash = hiera_hash('sahara', {}) +$murano_hash = hiera_hash('murano', {}) +$storage_hash = hiera_hash('storage', {}) $controllers = hiera('controllers') +$haproxy_nodes = hiera('haproxy_nodes', $controllers) if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$storage_hash['images_vcenter'] { $use_swift = true @@ -14,19 +15,19 @@ if !($storage_hash['images_ceph'] and $storage_hash['objects_ceph']) and !$stora } if ($use_swift) { - $swift_proxies = $controllers + $swift_proxies = hiera('swift_proxies', $haproxy_nodes) } elsif ($storage_hash['objects_ceph']) { - $rgw_servers = $controllers + $rgw_servers = hiera('rgw_servers', $controllers) } class { '::openstack::ha::haproxy': - controllers => $controllers, + controllers => $haproxy_nodes, public_virtual_ip => hiera('public_vip'), internal_virtual_ip => hiera('management_vip'), horizon_use_ssl => hiera('horizon_use_ssl', false), neutron => $use_neutron, queue_provider => 'rabbitmq', - custom_mysql_setup_class => 'galera', + custom_mysql_setup_class => hiera('custom_mysql_setup_class','galera'), swift_proxies => $swift_proxies, rgw_servers => $rgw_servers, ceilometer => $ceilometer_hash['enabled'],