diff options
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 7 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 56 |
2 files changed, 24 insertions, 39 deletions
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index c9c87848..58834039 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -33,6 +33,13 @@ file { ['/etc/libvirt/qemu/networks/autostart/default.xml', ensure => absent, before => Service['libvirt'] } +# in case libvirt has been already running before the Puppet run, make +# sure the default network is destroyed +exec { 'libvirt-default-net-destroy': + command => '/usr/bin/virsh net-destroy default', + onlyif => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"', + before => Service['libvirt'], +} include ::nova include ::nova::compute diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 1c88bae3..08f06a98 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -26,7 +26,10 @@ if !str2bool(hiera('enable_package_install', 'false')) { if hiera('step') >= 1 { - include ::tripleo::loadbalancer + $controller_node_ips = split(downcase(hiera('controller_node_ips')), ',') + class { '::tripleo::loadbalancer' : + controller_hosts => $controller_node_ips, + } } @@ -106,17 +109,11 @@ if hiera('step') >= 2 { allowed_hosts => $allowed_hosts, } - if $::osfamily == 'RedHat' { - $rabbit_provider = 'yum' - } else { - $rabbit_provider = undef - } - Class['rabbitmq'] -> Rabbitmq_vhost <| |> Class['rabbitmq'] -> Rabbitmq_user <| |> Class['rabbitmq'] -> Rabbitmq_user_permissions <| |> - $rabbit_nodes = split(downcase(hiera('rabbit_nodes', $::hostname)), ',') + $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',') if count($rabbit_nodes) > 1 { $rabbit_cluster = true } @@ -124,35 +121,23 @@ if hiera('step') >= 2 { $rabbit_cluster = false } class { 'rabbitmq': - package_provider => $rabbit_provider, config_cluster => $rabbit_cluster, cluster_nodes => $rabbit_nodes, node_ip_address => hiera('controller_host'), } - - rabbitmq_vhost { '/': - provider => 'rabbitmqctl', + if $rabbit_cluster { + rabbitmq_policy { 'ha-all@/': + pattern => '^(?!amq\.).*', + definition => { + 'ha-mode' => 'all', + 'ha-sync-mode' => 'automatic', + }, + } } - rabbitmq_user { ['nova','glance','neutron','cinder','ceilometer','heat']: - admin => true, - password => hiera('rabbit_password'), + rabbitmq_vhost { '/': provider => 'rabbitmqctl', } - rabbitmq_user_permissions {[ - 'nova@/', - 'glance@/', - 'neutron@/', - 'cinder@/', - 'ceilometer@/', - 'heat@/', - ]: - configure_permission => '.*', - write_permission => '.*', - read_permission => '.*', - provider => 'rabbitmqctl', - } - # pre-install swift here so we can build rings include ::swift @@ -210,7 +195,6 @@ if hiera('step') >= 3 { include ::glance::backend::swift class { 'nova': - rabbit_hosts => [hiera('controller_virtual_ip')], glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]), } @@ -222,10 +206,7 @@ if hiera('step') >= 3 { include ::nova::vncproxy include ::nova::scheduler - class {'neutron': - rabbit_hosts => [hiera('controller_virtual_ip')], - } - + include ::neutron include ::neutron::server include ::neutron::agents::dhcp include ::neutron::agents::l3 @@ -258,10 +239,7 @@ if hiera('step') >= 3 { Service['neutron-server'] -> Service['neutron-ovs-agent-service'] Service['neutron-server'] -> Service['neutron-metadata'] - class {'cinder': - rabbit_hosts => [hiera('controller_virtual_ip')], - } - + include ::cinder include ::cinder::api include ::cinder::glance include ::cinder::scheduler @@ -307,7 +285,7 @@ if hiera('step') >= 3 { } } - $cinder_enabled_backends = concat(any2array($cinder_iscsi_backend), $cinder_rbd_backend) + $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend]) class { '::cinder::backends' : enabled_backends => $cinder_enabled_backends, } |