7522e5ef2aa87ddaaf93d5868d2c14f339d03de8
[mirror/dsa-puppet.git] / 3rdparty / modules / neutron / examples / neutron.pp
1 ### Cloud Controller:
2
3 # General Neutron stuff
4 # Configures everything in neutron.conf
5 class { 'neutron':
6   verbose               => true,
7   allow_overlapping_ips => true,
8   rabbit_password       => 'password',
9   rabbit_user           => 'guest',
10   rabbit_host           => 'localhost',
11   service_plugins       => ['metering']
12 }
13
14 # The API server talks to keystone for authorisation
15 class { 'neutron::server':
16   keystone_password => 'password',
17   connection        => 'mysql://neutron:password@192.168.1.1/neutron',
18 }
19
20 # Configure nova notifications system
21 class { 'neutron::server::notifications':
22   nova_admin_tenant_name     => 'admin',
23   nova_admin_password        => 'secrete',
24 }
25
26 # Various agents
27 class { 'neutron::agents::dhcp': }
28 class { 'neutron::agents::l3': }
29 class { 'neutron::agents::lbaas': }
30 class { 'neutron::agents::vpnaas': }
31 class { 'neutron::agents::metering': }
32
33 # This plugin configures Neutron for OVS on the server
34 # Agent
35 class { 'neutron::agents::ovs':
36   local_ip         => '192.168.1.1',
37   enable_tunneling => true,
38 }
39
40 # Plugin
41 class { 'neutron::plugins::ovs':
42   tenant_network_type => 'gre',
43 }
44
45 # ml2 plugin with vxlan as ml2 driver and ovs as mechanism driver
46 class { 'neutron::plugins::ml2':
47   type_drivers          => ['vxlan'],
48   tenant_network_types  => ['vxlan'],
49   vxlan_group           => '239.1.1.1',
50   mechanism_drivers     => ['openvswitch'],
51   vni_ranges            => ['0:300']
52 }
53
54 ### Compute Nodes:
55 # Generally, any machine with a neutron element running on it talks
56 # over Rabbit and needs to know if overlapping IPs (namespaces) are in use
57 class { 'neutron':
58   allow_overlapping_ips => true,
59   rabbit_password       => 'password',
60   rabbit_user           => 'guest',
61   rabbit_host           => 'localhost',
62 }
63
64 # The agent/plugin combo also needs installed on clients
65 # Agent
66 class { 'neutron::agents::ovs':
67   local_ip         => '192.168.1.11',
68   enable_tunneling => true,
69 }
70
71 # Plugin
72 class { 'neutron::plugins::ovs':
73   tenant_network_type => 'gre',
74 }