Removing OpenSteak Project
[genesis.git] / common / puppet-opnfv / manifests / controller_networker.pp
1 #Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
2 #
3 #   Licensed under the Apache License, Version 2.0 (the "License");
4 #   you may not use this file except in compliance with the License.
5 #   You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #   Unless required by applicable law or agreed to in writing, software
10 #   distributed under the License is distributed on an "AS IS" BASIS,
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #   See the License for the specific language governing permissions and
13 #   limitations under the License.
14
15
16 class opnfv::controller_networker {
17   ###use 8081 as a default work around swift service
18   if $odl_rest_port == '' {$odl_rest_port = '8081'}
19
20   if ($odl_flag != '') and str2bool($odl_flag) { 
21      $ml2_mech_drivers = ['opendaylight']
22      $this_agent = 'opendaylight'
23      class {"opendaylight":
24        odl_rest_port => $odl_rest_port,
25        extra_features => ['odl-base-all', 'odl-aaa-authn', 'odl-restconf', 'odl-nsf-all', 'odl-adsal-northbound', 'odl-mdsal-apidocs', 'odl-ovsdb-openstack', 'odl-ovsdb-northbound', 'odl-dlux-core'],
26      }
27   }
28   else {
29     $ml2_mech_drivers = ['openvswitch','l2population'] 
30     $this_agent = 'ovs'
31   }
32   if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
33   if $admin_email == '' { fail('admin_email is empty') }
34   if $admin_password == '' { fail('admin_password is empty') }
35
36   if $public_ip == '' { fail('public_ip is empty') }
37   if $private_ip == '' { fail('private_ip is empty') }
38
39   if $odl_control_ip == '' { $odl_control_ip = $private_ip }
40
41   if $mysql_ip == '' { fail('mysql_ip is empty') }
42   if $mysql_root_password == '' { fail('mysql_root_password is empty') }
43   if $amqp_ip == '' { fail('amqp_ip is empty') }
44
45   if $memcache_ip == '' { fail('memcache_ip is empty') }
46   if $neutron_ip == '' { fail('neutron_ip is empty') }
47
48   if $keystone_admin_token == '' { fail('keystone_admin_token is empty') }
49   if $keystone_db_password == '' { fail('keystone_db_password is empty') }
50
51   if $horizon_secret_key == '' { fail('horizon_secret_key is empty') }
52   #if $trystack_db_password == '' { fail('trystack_db_password is empty') }
53
54   if $nova_user_password == '' { fail('nova_user_password is empty') }
55   if $nova_db_password == '' { fail('nova_db_password is empty') }
56
57   if $cinder_user_password == '' { fail('cinder_user_password is empty') }
58   if $cinder_db_password == '' { fail('cinder_db_password is empty') }
59
60   if $glance_user_password == '' { fail('glance_user_password is empty') }
61   if $glance_db_password == '' { fail('glance_db_password is empty') }
62
63   if $neutron_user_password == '' { fail('neutron_user_password is empty') }
64   if $neutron_db_password == '' { fail('neutron_db_password is empty') }
65   if $neutron_metadata_shared_secret == '' { fail('neutron_metadata_shared_secret is empty') }
66
67   if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') }
68   if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') }
69
70   if $heat_user_password == '' { fail('heat_user_password is empty') }
71   if $heat_db_password == '' { fail('heat_db_password is empty') }
72   if $heat_auth_encrypt_key == '' { fail('heat_auth_encrypt_key is empty') }
73
74   if $swift_user_password == '' { fail('swift_user_password is empty') }
75   if $swift_shared_secret == '' { fail('swift_shared_secret is empty') }
76   if $swift_admin_password == '' { fail('swift_admin_password is empty') }
77
78   class { "quickstack::neutron::controller_networker":
79     admin_email                   => $admin_email,
80     admin_password                => $admin_password,
81     agent_type                    => $this_agent,
82     enable_tunneling              => true,
83     ovs_tunnel_iface              => $ovs_tunnel_if,
84     ovs_tunnel_network            => '',
85     ovs_tunnel_types              => ['vxlan'],
86     ovs_l2_population             => 'True',
87     external_network_bridge       => 'br-ex',
88     tenant_network_type           => 'vxlan',
89     tunnel_id_ranges              => '1:1000',
90     controller_admin_host         => $private_ip,
91     controller_priv_host          => $private_ip,
92     controller_pub_host           => $public_ip,
93     ssl                           => false,
94     #support_profile               => $quickstack::params::support_profile,
95     #freeipa                       => $quickstack::params::freeipa,
96
97     mysql_host                    => $mysql_ip,
98     mysql_root_password           => $mysql_root_password,
99     #amqp_provider                 => $amqp_provider,
100     amqp_host                     => $amqp_ip,
101     amqp_username                 => 'guest',
102     amqp_password                 => 'guest',
103     #amqp_nssdb_password           => $quickstack::params::amqp_nssdb_password,
104
105     keystone_admin_token          => $keystone_admin_token,
106     keystone_db_password          => $keystone_db_password,
107
108     ceilometer_metering_secret    => $ceilometer_metering_secret,
109     ceilometer_user_password      => $ceilometer_user_password,
110
111     cinder_backend_gluster        => $quickstack::params::cinder_backend_gluster,
112     cinder_backend_gluster_name   => $quickstack::params::cinder_backend_gluster_name,
113     cinder_gluster_shares         => $quickstack::params::cinder_gluster_shares,
114     cinder_user_password          => $cinder_user_password,
115     cinder_db_password            => $cinder_db_password,
116
117     glance_db_password            => $glance_db_password,
118     glance_user_password          => $glance_user_password,
119
120     heat_cfn                      => true,
121     heat_cloudwatch               => true,
122     heat_db_password              => $heat_db_password,
123     heat_user_password            => $heat_user_password,
124     heat_auth_encrypt_key         => $heat_auth_encrypt_key,
125
126     horizon_secret_key            => $horizon_secret_key,
127     horizon_ca                    => $quickstack::params::horizon_ca,
128     horizon_cert                  => $quickstack::params::horizon_cert,
129     horizon_key                   => $quickstack::params::horizon_key,
130  
131     ml2_mechanism_drivers         => $ml2_mech_drivers,
132
133     #neutron                       => true,
134     neutron_metadata_proxy_secret => $neutron_metadata_shared_secret,
135     neutron_db_password           => $neutron_db_password,
136     neutron_user_password         => $neutron_user_password,
137
138     nova_db_password              => $nova_db_password,
139     nova_user_password            => $nova_user_password,
140
141     odl_controller_ip             => $odl_control_ip,
142     odl_controller_port           => $odl_rest_port,
143     swift_shared_secret           => $swift_shared_secret,
144     swift_admin_password          => $swift_admin_password,
145     swift_ringserver_ip           => '192.168.203.1',
146     swift_storage_ips             => ["192.168.203.2","192.168.203.3","192.168.203.4"],
147     swift_storage_device          => 'device1',
148   }
149
150 }