0ad368611bff8f58c485331e76457379ee308d8d
[fuel.git] / mcp / reclass / classes / cluster / mcp-odl-noha / openstack / compute.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 {%- import 'net_macros.j2' as ma with context %}
10 {%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
11 ---
12 classes:
13   - service.neutron.compute.single
14   - service.neutron.compute.opendaylight.single
15 {%- if conf.MCP_DPDK_MODE %}
16   - system.nova.compute.nfv.hugepages
17   - system.neutron.compute.nfv.dpdk
18 {%- endif %}
19   - cluster.mcp-common-noha.openstack_compute
20   - cluster.mcp-odl-noha
21 parameters:
22   linux:
23     network:
24       interface:
25 {%- if conf.MCP_DPDK_MODE %}
26         dpdk0:
27           name: ${_param:dpdk0_name}
28           pci: ${_param:dpdk0_pci}
29           driver: ${_param:dpdk0_driver}
30           enabled: true
31           bridge: br-prv
32           type: dpdk_ovs_port
33           n_rxq: ${_param:dpdk0_n_rxq}
34         br-prv:
35           enabled: true
36           type: dpdk_ovs_bridge
37           proto: static
38           address: ${_param:tenant_address}
39           netmask: ${_param:opnfv_net_private_mask}
40         {{ nm.cmp001.nic_private }}:
41           type: dpdk  # Not a meaningful type, just match 'dpdk' for filtering
42         {{ nm.cmp001.nic_public }}:
43           enabled: true
44           type: eth
45           mtu: ${_param:interface_mtu}
46           proto: manual
47         br-floating:
48           enabled: true
49           type: ovs_bridge
50         float-to-ex:
51           enabled: true
52           type: ovs_port
53           mtu: ${_param:interface_mtu}
54           bridge: br-floating
55         br-ex:
56           enabled: true
57           type: bridge
58           address: ${_param:external_address}
59           netmask: ${_param:opnfv_net_public_mask}
60           use_interfaces:
61             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
62           use_ovs_ports:
63             - float-to-ex
64           gateway: ${_param:opnfv_net_public_gw}
65           name_servers: {{ nm.dns_public }}
66 {%- else %}
67         br-mesh:
68           enabled: true
69           type: bridge
70           proto: static
71           address: ${_param:tenant_address}
72           netmask: ${_param:opnfv_net_private_mask}
73           use_interfaces:
74             - {{ ma.interface_str(nm.cmp001.nic_private, vlan_private_start) }}
75         ovs_port_{{ nm.cmp001.nic_public }}:
76           enabled: true
77           name: {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
78           mtu: ${_param:interface_mtu}
79           proto: manual
80           ovs_port_type: OVSPort
81           type: ovs_port
82           ovs_bridge: br-floating
83           bridge: br-floating
84         br-floating:
85           enabled: true
86           type: ovs_bridge
87           proto: static
88           address: ${_param:external_address}
89           netmask: ${_param:opnfv_net_public_mask}
90           use_interfaces:
91             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
92           gateway: ${_param:opnfv_net_public_gw}
93           name_servers: {{ nm.dns_public }}
94           noifupdown: true
95 {%- endif %}