[fdio] Bump compute RAM defaults for virtual PODs
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-noha / openstack_compute_pdf.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 {#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
9 {%- import 'net_map.j2' as nm with context %}
10 {%- import 'net_macros.j2' as ma with context %}
11 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
12 {%- set nics = { nm.cmp001.nic_mgmt: True, nm.cmp001.nic_private: True } %}
13 {%- set vlans = { nm.vlan_mgmt: nm.cmp001.nic_mgmt } %}
14 {%- if '-ovs-' not in conf.MCP_DEPLOY_SCENARIO and '-fdio-' not in conf.MCP_DEPLOY_SCENARIO %}
15 {%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
16 {%- do vlans.update({ vlan_private_start: nm.cmp001.nic_private }) %}
17 {%- endif %}
18 ---
19 parameters:
20   _param:
21     # Should later be determined via PDF/IDF, AArch64 has ESP on /dev/sda1
22 {%- if nm.cmp001.idx < conf.nodes | length %}
23 {%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %}
24     ~cinder_lvm_devices: ['/dev/vdb']
25 {%- elif conf.nodes[nm.cmp001.idx].node.arch == 'aarch64' or
26          conf.nodes[nm.cmp001.idx].disks.0.disk_capacity | storage_size_num | float > 2000000000000 %}
27     ~cinder_lvm_devices: ['/dev/sda2']
28 {%- else %}
29     ~cinder_lvm_devices: ['/dev/sda1']
30 {%- endif %}
31 {%- endif %}
32   linux:
33     network:
34 {%- if '-fdio-' not in conf.MCP_DEPLOY_SCENARIO %}
35       ovs_nowait: true
36       bridge: openvswitch
37 {%- else %}
38       dpdk:
39         enabled: true
40         driver: "${_param:compute_dpdk_driver}"
41       vpp:
42         enabled: true
43         decimal_interface_names: true
44         # Reuse ovs-dpdk socket mem configuration from IDF
45         dpdk_socket_mem: ${_param:compute_ovs_dpdk_socket_mem}
46         main_core: ${linux:system:kernel:isolcpu}
47         gid: 'neutron'
48 {%- endif %}
49       interface:
50         pxe_admin_int:
51           enabled: true
52           name: ${_param:pxe_admin_interface}
53           proto: static
54           type: eth
55           address: ${_param:pxe_admin_address}
56           netmask: ${_param:opnfv_net_admin_mask}
57           mtu: ${_param:interface_mtu}
58           noifupdown: true
59
60 {#- prevent duplicates for tagged mgmt on the same physical interface as PXE/admin #}
61 {%- if nm.cmp001.nic_admin in nics %}
62   {%- do nics.pop(nm.cmp001.nic_admin) %}
63 {%- endif %}
64
65 {{ ma.linux_network_interfaces_nic(nics) }}
66
67 {{ ma.linux_network_interfaces_vlan(vlans) }}
68
69         br-mgmt:
70           enabled: true
71           type: bridge
72           proto: static
73           address: ${_param:single_address}
74           netmask: ${_param:opnfv_net_mgmt_mask}
75           use_interfaces:
76             - {{ ma.interface_str(nm.cmp001.nic_mgmt, nm.vlan_mgmt) }}