summaryrefslogtreecommitdiffstats
path: root/common/puppet-opnfv/manifests/compute.pp
blob: fdef9c71de0eff8f4661965a7c132ddb752494e8 (plain)
1
2
3
4
5
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

class opnfv::compute {
  if ($odl_flag != '') and str2bool($odl_flag) { 
     $ml2_mech_drivers = ['opendaylight']
     $this_agent = 'opendaylight'
  }
  else {
    $ml2_mech_drivers = ['openvswitch','l2population'] 
    $this_agent = 'ovs'
  }

  if $ovs_tunnel_if == '' { fail('ovs_tunnel_if is empty') }
  if $private_ip == '' { fail('private_ip is empty') }
  if $odl_control_ip == '' { $odl_control_ip = $private_ip }

  if $mysql_ip == '' { fail('mysql_ip is empty') }
  if $amqp_ip == '' { fail('mysql_ip is empty') }

  if $admin_password == '' { fail('admin_password is empty') }

  if $nova_user_password == '' { fail('nova_user_password is empty') }
  if $nova_db_password == '' { fail('nova_db_password is empty') }

  if $neutron_user_password == '' { fail('nova_user_password is empty') }
  if $neutron_db_password == '' { fail('nova_db_password is empty') }

  if $ceilometer_user_password == '' { fail('ceilometer_user_password is empty') }
  if $ceilometer_metering_secret == '' { fail('ceilometer_user_password is empty') }

  class { "quickstack::neutron::compute":
    auth_host                    => $private_ip,
    glance_host                  => $private_ip,
    libvirt_images_rbd_pool      => 'volumes',
    libvirt_images_rbd_ceph_conf => '/etc/ceph/ceph.conf',
    libvirt_inject_password      => 'false',
    libvirt_inject_key           => 'false',
    libvirt_images_type          => 'rbd',
    nova_host                    => $private_ip,
    nova_db_password              => $nova_db_password,
    nova_user_password            => $nova_user_password,
    private_network              => '',
    private_iface                => '',
    private_ip                   => '',
    rbd_user                     => 'volumes',
    rbd_secret_uuid              => '',
    network_device_mtu           => $quickstack::params::network_device_mtu,

    admin_password                => $admin_password,
    ssl                           => false,

    mysql_host                    => $mysql_ip,
    mysql_ca                     => $quickstack::params::mysql_ca,
    amqp_host                     => $amqp_ip,
    amqp_username                 => 'guest',
    amqp_password                 => 'guest',
    #amqp_nssdb_password           => $quickstack::params::amqp_nssdb_password,

    ceilometer                    => 'true',
    ceilometer_metering_secret    => $ceilometer_metering_secret,
    ceilometer_user_password      => $ceilometer_user_password,

    cinder_backend_gluster        => $quickstack::params::cinder_backend_gluster,

    agent_type                   => $this_agent,
    enable_tunneling             => true,

    ml2_mechanism_drivers        => $ml2_mech_drivers,
    odl_controller_ip            => $odl_control_ip,

    neutron_db_password          => $neutron_db_password,
    neutron_user_password        => $neutron_user_password,
    neutron_host                 => $private_ip,

    #ovs_bridge_mappings          = $quickstack::params::ovs_bridge_mappings,
    #ovs_bridge_uplinks           = $quickstack::params::ovs_bridge_uplinks,
    #ovs_vlan_ranges              = $quickstack::params::ovs_vlan_ranges,
    ovs_tunnel_iface             => $ovs_tunnel_if,
    ovs_tunnel_network           => '',
    ovs_l2_population            => 'True',

    tenant_network_type          => 'vxlan',
    tunnel_id_ranges             => '1:1000',
    #ovs_vxlan_udp_port           = $quickstack::params::ovs_vxlan_udp_port,
    ovs_tunnel_types             => ['vxlan'],

    verbose                      => $quickstack::params::verbose,
    security_group_api           => 'neutron',

  }
}