Merge "[dpdk] Get back to shared memory model"
[fuel.git] / mcp / config / scenario / os-nosdn-nofeature-noha.yaml.j2
1 ##############################################################################
2 # Copyright (c) 2017 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 ---
10 cluster:
11   domain: mcp-ovs-noha.local
12   states:
13     - openstack_noha
14     - neutron_gateway
15     - networks
16 virtual:
17   nodes:
18     control:
19       - ctl01
20       - gtw01
21     compute:
22       - cmp001
23       - cmp002
24   ctl01:
25     disks: {{ conf.nodes[nm.ctl01.idx].disks | map(attribute='disk_capacity') | join(';') }}
26     vcpus: 4
27     ram: 14336
28   gtw01:
29     ram: 2048
30 {%- if nm.cmp001.idx < conf.nodes | length %}
31   {%- set cmp_node = conf.nodes[nm.cmp001.idx].node %}
32   {%- set cmp_ram = ([16384, ('%.0f' | format((cmp_node.memory | storage_size_num | float) * 1024 / 1000000000) | int)] | sort)[-1] %}
33   {%- set cmp_sockets = ([2, cmp_node.cpus | int] | sort)[-1] %}
34   {%- set cmp_threads = 2 %}
35   {%- set cmp_cores = ([2, ('%.0f' | format((cmp_node.cores | float) / cmp_threads)) | int] | sort)[-1] %}
36   {%- for cmpi in range(1, 3) %}
37   cmp00{{ cmpi }}:
38     disks: {{ conf.nodes[nm.cmp001.idx].disks | map(attribute='disk_capacity') | join(';') }}
39     vcpus: {{ cmp_sockets * cmp_cores * cmp_threads }}
40     ram: {{ cmp_ram }}
41     cpu_topology:
42       sockets: {{ cmp_sockets }}
43       cores: {{ cmp_cores }}
44       threads: {{ cmp_threads }}
45     numa:
46     {%- for ci in range(0, cmp_sockets) %}
47       cell{{ ci }}:
48         memory: {{ '%.0f' | format((cmp_ram | float) * 1024 / cmp_sockets) }}
49         cpus: {{ cmp_cores * cmp_threads * (ci | int) }}-{{ cmp_cores * cmp_threads * (ci | int + 1) - 1 }}
50     {%- endfor %}
51   {%- endfor %}
52 {%- endif %}