969c9347f2523aa286db0af44992d3961c989d24
[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 '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
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       ovs_nowait: false
25       interface:
26 {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
27         dpdk0:
28           name: ${_param:dpdk0_name}
29           pci: ${_param:dpdk0_pci}
30           driver: ${_param:dpdk0_driver}
31           enabled: true
32           bridge: br-prv
33           type: dpdk_ovs_port
34           n_rxq: ${_param:dpdk0_n_rxq}
35           mtu: ${_param:interface_mtu}
36         br-prv:
37           enabled: true
38           type: dpdk_ovs_bridge
39           proto: static
40           address: ${_param:tenant_address}
41           netmask: ${_param:opnfv_net_private_mask}
42         {{ nm.cmp001.nic_private }}:
43           type: dpdk  # Not a meaningful type, just match 'dpdk' for filtering
44         {{ nm.cmp001.nic_public }}:
45           enabled: true
46           type: eth
47           mtu: ${_param:interface_mtu}
48           proto: manual
49         br-floating:
50           enabled: true
51           type: ovs_bridge
52           datapath_type: netdev
53           use_interfaces:
54             - float-to-ex
55         float-to-ex:
56           enabled: true
57           type: ovs_port
58           mtu: ${_param:interface_mtu}
59           bridge: br-floating
60           ovs_bridge: br-floating
61           noifupdown: true
62         br-ex:
63           enabled: true
64           type: bridge
65           address: ${_param:external_address}
66           netmask: ${_param:opnfv_net_public_mask}
67           use_interfaces:
68             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
69           use_ovs_ports:
70             - float-to-ex
71           gateway: ${_param:opnfv_net_public_gw}
72           name_servers: {{ nm.dns_public }}
73           noifupdown: true
74 {%- else %}
75         br-mesh:
76           enabled: true
77           type: bridge
78           proto: static
79           address: ${_param:tenant_address}
80           netmask: ${_param:opnfv_net_private_mask}
81           use_interfaces:
82             - {{ ma.interface_str(nm.cmp001.nic_private, vlan_private_start) }}
83         {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}:
84           enabled: true
85           mtu: ${_param:interface_mtu}
86           proto: manual
87           ovs_port_type: OVSPort
88           type: ovs_port
89           ovs_bridge: br-floating
90           bridge: br-floating
91         br-floating:
92           enabled: true
93           type: ovs_bridge
94           proto: static
95           address: ${_param:external_address}
96           netmask: ${_param:opnfv_net_public_mask}
97           use_interfaces:
98             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
99           gateway: ${_param:opnfv_net_public_gw}
100           name_servers: {{ nm.dns_public }}
101           noifupdown: true
102 {%- endif %}