Make ability for override primary-controller, controller and compute

node roles by Hiera for corresponded conditions.

Closes-bug: #1554796

Co-Authored-By: Sergey Vasilenko <svasilenko@mirantis.com>
Change-Id: I6a6c25333b26b03552364e8d5742b769ecc05d80
This commit is contained in:
Sergey Vasilenko 2016-03-08 17:41:46 -06:00 committed by Sergey Vasilenko
parent c5deadeac6
commit ddc3bf33f5
3 changed files with 14 additions and 6 deletions

View File

@ -3,8 +3,11 @@ notice('MODULAR: openstack-network/agents/l3.pp')
$use_neutron = hiera('use_neutron', false)
$neutron_advanced_config = hiera_hash('neutron_advanced_configuration', { })
$dvr = pick($neutron_advanced_config['neutron_dvr'], false)
$controller = roles_include(['controller', 'primary-controller'])
$compute = roles_include('compute')
$neutron_controller_roles = hiera('neutron_controller_roles', ['controller', 'primary-controller'])
$neutron_compute_roles = hiera('neutron_compute_nodes', ['compute'])
$controller = roles_include($neutron_controller_roles)
$compute = roles_include($neutron_compute_roles)
if $use_neutron and ($controller or ($dvr and $compute)) {
# override neutron options

View File

@ -1,7 +1,6 @@
notice('MODULAR: openstack-network/plugins/ml2.pp')
$use_neutron = hiera('use_neutron', false)
$compute = roles_include('compute')
if $use_neutron {
# override neutron options
@ -18,7 +17,10 @@ if $use_neutron {
include ::neutron::params
$node_name = hiera('node_name')
$primary_controller = roles_include(['primary-controller'])
$neutron_primary_controller_roles = hiera('neutron_primary_controller_roles', ['primary-controller'])
$neutron_compute_roles = hiera('neutron_compute_nodes', ['compute'])
$primary_controller = roles_include($neutron_primary_controller_roles)
$compute = roles_include($neutron_compute_roles)
$neutron_config = hiera_hash('neutron_config')
$neutron_server_enable = pick($neutron_config['neutron_server_enable'], true)

View File

@ -1,7 +1,6 @@
notice('MODULAR: openstack-network/server-config.pp')
$use_neutron = hiera('use_neutron', false)
$compute = roles_include('compute')
if $use_neutron {
# override neutron options
@ -29,9 +28,13 @@ if $use_neutron {
$service_endpoint = hiera('service_endpoint', $management_vip)
$nova_endpoint = hiera('nova_endpoint', $management_vip)
$nova_hash = hiera_hash('nova', { })
$primary_controller = roles_include(['primary-controller'])
$pci_vendor_devs = $neutron_config['supported_pci_vendor_devs']
$neutron_primary_controller_roles = hiera('neutron_primary_controller_roles', ['primary-controller'])
$neutron_compute_roles = hiera('neutron_compute_nodes', ['compute'])
$primary_controller = roles_include($neutron_primary_controller_roles)
$compute = roles_include($neutron_compute_roles)
$db_type = 'mysql'
$db_password = $neutron_config['database']['passwd']
$db_user = try_get_value($neutron_config, 'database/user', 'neutron')