fe8e476496f43dc6160199b6fe3f3b25cf54c232
[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   nova:
23     compute:
24       vif_plugging_is_fatal: false
25       vif_plugging_timeout: 60
26   neutron:
27     compute:
28       opendaylight:
29         ovsdb_server_iface: ptcp:6640:127.0.0.1
30   linux:
31     network:
32       ovs_nowait: false
33       interface:
34 {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
35         dpdk0:
36           name: ${_param:dpdk0_name}
37           pci: ${_param:dpdk0_pci}
38           driver: ${_param:dpdk0_driver}
39           enabled: true
40           bridge: br-prv
41           type: dpdk_ovs_port
42           n_rxq: ${_param:dpdk0_n_rxq}
43           mtu: ${_param:interface_mtu}
44         br-prv:
45           enabled: true
46           type: dpdk_ovs_bridge
47           proto: static
48           address: ${_param:tenant_address}
49           netmask: ${_param:opnfv_net_private_mask}
50         {{ nm.cmp001.nic_private }}:
51           type: dpdk  # Not a meaningful type, just match 'dpdk' for filtering
52         {{ nm.cmp001.nic_public }}:
53           enabled: true
54           type: eth
55           mtu: ${_param:interface_mtu}
56           proto: manual
57         br-floating:
58           enabled: true
59           type: ovs_bridge
60           datapath_type: netdev
61           use_interfaces:
62             - float-to-ex
63         float-to-ex:
64           enabled: true
65           type: ovs_port
66           mtu: ${_param:interface_mtu}
67           bridge: br-floating
68           ovs_bridge: br-floating
69           noifupdown: true
70         br-ex:
71           enabled: true
72           type: bridge
73           address: ${_param:external_address}
74           netmask: ${_param:opnfv_net_public_mask}
75           use_interfaces:
76             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
77           use_ovs_ports:
78             - float-to-ex
79           gateway: ${_param:opnfv_net_public_gw}
80           name_servers: {{ nm.dns_public }}
81           noifupdown: true
82 {%- else %}
83         br-mesh:
84           enabled: true
85           type: bridge
86           proto: static
87           address: ${_param:tenant_address}
88           netmask: ${_param:opnfv_net_private_mask}
89           use_interfaces:
90             - {{ ma.interface_str(nm.cmp001.nic_private, vlan_private_start) }}
91         {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}:
92           enabled: true
93           mtu: ${_param:interface_mtu}
94           proto: manual
95           ovs_port_type: OVSPort
96           type: ovs_port
97           ovs_bridge: br-floating
98           bridge: br-floating
99         br-floating:
100           enabled: true
101           type: ovs_bridge
102           proto: static
103           address: ${_param:external_address}
104           netmask: ${_param:opnfv_net_public_mask}
105           use_interfaces:
106             - {{ ma.interface_str(nm.cmp001.nic_public, nm.vlan_public) }}
107           gateway: ${_param:opnfv_net_public_gw}
108           name_servers: {{ nm.dns_public }}
109           noifupdown: true
110 {%- endif %}
111     system:
112       file:
113         /var/tmp/odl_hostconfig.patch:
114           contents: |
115             420c420
116             <                 if datapath_types.find(datapath_type) >= 0)
117             ---
118             >                 if datapath_type in datapath_types)
119             460c460
120             <         return subprocess.check_output(command_line).strip()  # nosec
121             ---
122             >         return subprocess.check_output(command_line).strip().decode()  # nosec