1 #Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 class opnfv::controller_networker {
17 ###use 8081 as a default work around swift service
18 if $odl_rest_port == '' {$odl_rest_port = '8081'}
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'],
29 $ml2_mech_drivers = ['openvswitch','l2population']
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') }
36 if $public_ip == '' { fail('public_ip is empty') }
37 if $private_ip == '' { fail('private_ip is empty') }
39 if $odl_control_ip == '' { $odl_control_ip = $private_ip }
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') }
45 if $memcache_ip == '' { fail('memcache_ip is empty') }
46 if $neutron_ip == '' { fail('neutron_ip is empty') }
48 if $keystone_admin_token == '' { fail('keystone_admin_token is empty') }
49 if $keystone_db_password == '' { fail('keystone_db_password is empty') }
51 if $horizon_secret_key == '' { fail('horizon_secret_key is empty') }
52 #if $trystack_db_password == '' { fail('trystack_db_password is empty') }
54 if $nova_user_password == '' { fail('nova_user_password is empty') }
55 if $nova_db_password == '' { fail('nova_db_password is empty') }
57 if $cinder_user_password == '' { fail('cinder_user_password is empty') }
58 if $cinder_db_password == '' { fail('cinder_db_password is empty') }
60 if $glance_user_password == '' { fail('glance_user_password is empty') }
61 if $glance_db_password == '' { fail('glance_db_password is empty') }
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') }
67 if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') }
68 if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') }
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') }
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') }
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,
94 #support_profile => $quickstack::params::support_profile,
95 #freeipa => $quickstack::params::freeipa,
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,
105 keystone_admin_token => $keystone_admin_token,
106 keystone_db_password => $keystone_db_password,
108 ceilometer_metering_secret => $ceilometer_metering_secret,
109 ceilometer_user_password => $ceilometer_user_password,
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,
117 glance_db_password => $glance_db_password,
118 glance_user_password => $glance_user_password,
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,
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,
131 ml2_mechanism_drivers => $ml2_mech_drivers,
134 neutron_metadata_proxy_secret => $neutron_metadata_shared_secret,
135 neutron_db_password => $neutron_db_password,
136 neutron_user_password => $neutron_user_password,
138 nova_db_password => $nova_db_password,
139 nova_user_password => $nova_user_password,
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',