Puppet Class: openstack::common::neutron

Defined in:
manifests/common/neutron.pp

Overview

Common class for neutron installation Private, and should not be used on its own Sets up configuration common to all neutron nodes. Flags install individual services as needed This follows the suggest deployment from the neutron Administrator Guide.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'manifests/common/neutron.pp', line 6

class openstack::common::neutron {
  $controller_management_address = hiera('openstack::controller::address::management')

  $data_network = hiera('openstack::network::data')
  $data_address = ip_for_network($data_network)

  # neutron auth depends upon a keystone configuration
  include ::openstack::common::keystone

  class { '::neutron':
    rabbit_host           => $controller_management_address,
    core_plugin           => 'neutron.plugins.ml2.plugin.Ml2Plugin',
    allow_overlapping_ips => true,
    rabbit_user           => hiera('openstack::rabbitmq::user'),
    rabbit_password       => hiera('openstack::rabbitmq::password'),
    debug                 => hiera('openstack::debug'),
    verbose               => hiera('openstack::verbose'),
    service_plugins       => ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin',
                              'neutron.services.loadbalancer.plugin.LoadBalancerPlugin',
                              'neutron.services.vpn.plugin.VPNDriverPlugin',
                              'neutron.services.firewall.fwaas_plugin.FirewallPlugin',
                              'neutron.services.metering.metering_plugin.MeteringPlugin'],
  }

  class { '::neutron::keystone::auth':
    password         => hiera('openstack::neutron::password'),
    public_address   => hiera('openstack::controller::address::api'),
    admin_address    => hiera('openstack::controller::address::management'),
    internal_address => hiera('openstack::controller::address::management'),
    region           => hiera('openstack::region'),
  }

  class { '::neutron::server':
    auth_host           => hiera('openstack::controller::address::management'),
    auth_password       => hiera('openstack::neutron::password'),
    database_connection => $::openstack::resources::connectors::neutron,
    enabled             => $::openstack::profile::base::is_controller,
    sync_db             => $::openstack::profile::base::is_controller,
    mysql_module        => '2.2',
  }

  class { '::neutron::server::notifications':
    nova_url            => "http://${controller_management_address}:8774/v2/",
    nova_admin_auth_url => "http://${controller_management_address}:35357/v2.0/",
    nova_admin_password => hiera('openstack::nova::password'),
    nova_region_name    => hiera('openstack::region'),
  }

  if $::osfamily == 'redhat' {
    package { 'iproute':
        ensure => latest,
        before => Class['::neutron']
    }
  }
}