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 %}
11 domain: mcp-ovs-noha.local
25 disks: {{ conf.nodes[nm.ctl01.idx].disks | map(attribute='disk_capacity') | join(';') }}
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) %}
38 disks: {{ conf.nodes[nm.cmp001.idx].disks | map(attribute='disk_capacity') | join(';') }}
39 vcpus: {{ cmp_sockets * cmp_cores * cmp_threads }}
42 sockets: {{ cmp_sockets }}
43 cores: {{ cmp_cores }}
44 threads: {{ cmp_threads }}
46 {%- for ci in range(0, cmp_sockets) %}
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 }}