summaryrefslogtreecommitdiffstats
path: root/mcp/config/scenario/os-nosdn-nofeature-noha.yaml.j2
blob: a1f0ddaa6b6d461127214c327b041fcbf3d8fbcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
##############################################################################
# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
{%- import 'net_map.j2' as nm with context %}
---
cluster:
  domain: mcp-ovs-noha.local
  states:
    - openstack_noha
    - neutron_gateway
    - networks
virtual:
  nodes:
    control:
      - ctl01
      - gtw01
    compute:
      - cmp001
      - cmp002
  ctl01:
    disks: {{ conf.nodes[nm.ctl01.idx].disks | map(attribute='disk_capacity') | join(';') }}
    vcpus: 4
    ram: 14336
  gtw01:
    ram: 2048
{%- if nm.cmp001.idx < conf.nodes | length %}
  {%- set cmp_node = conf.nodes[nm.cmp001.idx].node %}
  {%- set cmp_ram = ([16384, ('%.0f' | format((cmp_node.memory | storage_size_num | float) * 1024 / 1000000000) | int)] | sort)[-1] %}
  {%- set cmp_sockets = ([2, cmp_node.cpus | int] | sort)[-1] %}
  {%- set cmp_threads = 2 %}
  {%- set cmp_cores = ([2, ('%.0f' | format((cmp_node.cores | float) / cmp_threads)) | int] | sort)[-1] %}
  {%- for cmpi in range(1, 3) %}
  cmp00{{ cmpi }}:
    disks: {{ conf.nodes[nm.cmp001.idx].disks | map(attribute='disk_capacity') | join(';') }}
    vcpus: {{ cmp_sockets * cmp_cores * cmp_threads }}
    ram: {{ cmp_ram }}
    cpu_topology:
      sockets: {{ cmp_sockets }}
      cores: {{ cmp_cores }}
      threads: {{ cmp_threads }}
    numa:
    {%- for ci in range(0, cmp_sockets) %}
      cell{{ ci }}:
        memory: {{ '%.0f' | format((cmp_ram | float) * 1024 / cmp_sockets) }}
        cpus: {{ cmp_cores * cmp_threads * (ci | int) }}-{{ cmp_cores * cmp_threads * (ci | int + 1) - 1 }}
    {%- endfor %}
  {%- endfor %}
{%- endif %}