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