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 {
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']
24 $ml2_mech_drivers = ['openvswitch','l2population']
28 if $admin_email == '' { fail('admin_email is empty') }
29 if $admin_password == '' { fail('admin_password is empty') }
31 if $public_ip == '' { fail('public_ip is empty') }
32 if $private_ip == '' { fail('private_ip is empty') }
34 if $odl_control_ip == '' { fail('odl_controL_ip is empty, should be the IP of your network node private interface') }
36 if $mysql_ip == '' { fail('mysql_ip is empty') }
37 if $mysql_root_password == '' { fail('mysql_root_password is empty') }
38 if $amqp_ip == '' { fail('amqp_ip is empty') }
40 if $memcache_ip == '' { fail('memcache_ip is empty') }
41 if $neutron_ip == '' { fail('neutron_ip is empty') }
43 if $keystone_admin_token == '' { fail('keystone_admin_token is empty') }
44 if $keystone_db_password == '' { fail('keystone_db_password is empty') }
46 if $horizon_secret_key == '' { fail('horizon_secret_key is empty') }
47 #if $trystack_db_password == '' { fail('trystack_db_password is empty') }
49 if $nova_user_password == '' { fail('nova_user_password is empty') }
50 if $nova_db_password == '' { fail('nova_db_password is empty') }
52 if $cinder_user_password == '' { fail('cinder_user_password is empty') }
53 if $cinder_db_password == '' { fail('cinder_db_password is empty') }
55 if $glance_user_password == '' { fail('glance_user_password is empty') }
56 if $glance_db_password == '' { fail('glance_db_password is empty') }
58 if $neutron_user_password == '' { fail('neutron_user_password is empty') }
59 if $neutron_db_password == '' { fail('neutron_db_password is empty') }
60 if $neutron_metadata_shared_secret == '' { fail('neutron_metadata_shared_secret is empty') }
62 if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') }
63 if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') }
65 if $heat_user_password == '' { fail('heat_user_password is empty') }
66 if $heat_db_password == '' { fail('heat_db_password is empty') }
67 if $heat_auth_encrypt_key == '' { fail('heat_auth_encrypt_key is empty') }
69 if $swift_user_password == '' { fail('swift_user_password is empty') }
70 if $swift_shared_secret == '' { fail('swift_shared_secret is empty') }
71 if $swift_admin_password == '' { fail('swift_admin_password is empty') }
73 class { "quickstack::neutron::controller":
74 admin_email => $admin_email,
75 admin_password => $admin_password,
76 controller_admin_host => $private_ip,
77 controller_priv_host => $private_ip,
78 controller_pub_host => $public_ip,
80 #support_profile => $quickstack::params::support_profile,
81 #freeipa => $quickstack::params::freeipa,
83 mysql_host => $mysql_ip,
84 mysql_root_password => $mysql_root_password,
85 #amqp_provider => $amqp_provider,
86 amqp_host => $amqp_ip,
87 amqp_username => 'guest',
88 amqp_password => 'guest',
89 #amqp_nssdb_password => $quickstack::params::amqp_nssdb_password,
91 keystone_admin_token => $keystone_admin_token,
92 keystone_db_password => $keystone_db_password,
94 ceilometer_metering_secret => $ceilometer_metering_secret,
95 ceilometer_user_password => $ceilometer_user_password,
97 cinder_backend_gluster => $quickstack::params::cinder_backend_gluster,
98 cinder_backend_gluster_name => $quickstack::params::cinder_backend_gluster_name,
99 cinder_gluster_shares => $quickstack::params::cinder_gluster_shares,
100 cinder_user_password => $cinder_user_password,
101 cinder_db_password => $cinder_db_password,
103 glance_db_password => $glance_db_password,
104 glance_user_password => $glance_user_password,
107 heat_cloudwatch => true,
108 heat_db_password => $heat_db_password,
109 heat_user_password => $heat_user_password,
110 heat_auth_encrypt_key => $heat_auth_encrypt_key,
112 horizon_secret_key => $horizon_secret_key,
113 horizon_ca => $quickstack::params::horizon_ca,
114 horizon_cert => $quickstack::params::horizon_cert,
115 horizon_key => $quickstack::params::horizon_key,
117 ml2_mechanism_drivers => $ml2_mech_drivers,
119 neutron_metadata_proxy_secret => $neutron_metadata_shared_secret,
120 neutron_db_password => $neutron_db_password,
121 neutron_user_password => $neutron_user_password,
123 nova_db_password => $nova_db_password,
124 nova_user_password => $nova_user_password,
125 odl_controller_ip => $odl_control_ip,
126 odl_controller_port => $odl_rest_port,
128 swift_shared_secret => $swift_shared_secret,
129 swift_admin_password => $swift_admin_password,
130 swift_ringserver_ip => '192.168.203.1',
131 swift_storage_ips => ["192.168.203.2","192.168.203.3","192.168.203.4"],
132 swift_storage_device => 'device1',