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 %}
12 - system.linux.system.repo.mcp.salt
13 - system.reclass.storage.salt
14 {%- if nm.cluster.has_baremetal_nodes %}
15 - system.reclass.storage.system.infra_maas_single
17 - system.salt.master.api
18 - system.salt.master.pkg
19 - system.salt.minion.ca.salt_master
22 salt_master_environment_repository: "https://github.com/tcpcloud"
23 salt_master_environment_revision: master
24 reclass_data_repository: local
25 salt_master_base_environment: prd
26 # yamllint disable-line rule:line-length
27 salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
30 accept_policy: open_mode
37 # We support per-node (not only per-role) compute configuration via IDF
38 {%- for cmp in range(1, nm.cmp_nodes + 1) %}
39 {%- set n = '%02d' | format(cmp) %}
40 {%- set i = nm.cmp001.idx + cmp - 1 %}
42 {%- set admin = nm.net_admin_hosts | length + nm.start_ip[nm.net_admin] + loop.index %}
43 {%- set mgmt = nm.net_mgmt_hosts | length + nm.start_ip[nm.net_mgmt] + loop.index %}
44 {%- set pub = nm.net_public_hosts | length + nm.start_ip[nm.net_public] + loop.index %}
45 {%- set pri = nm.net_private_hosts | length + nm.start_ip[nm.net_private] + loop.index %}
46 openstack_compute_node{{ n }}:
47 name: cmp{{ '%03d' | format(cmp) }}
48 domain: ${_param:cluster_domain}
50 - cluster.${_param:cluster_name}.openstack.compute
52 pxe_admin_address: {{ nm.net_admin | ipnet_hostaddr(admin) }}
53 single_address: {{ nm.net_mgmt | ipnet_hostaddr(mgmt) }}
54 tenant_address: {{ nm.net_private | ipnet_hostaddr(pri) }}
55 external_address: {{ nm.net_public | ipnet_hostaddr(pub) }}
56 salt_master_host: ${_param:reclass_config_master}
57 linux_system_codename: xenial
59 {#- No partial defaults, all or nothing. Defaults tuned for lf-pod2. #}
60 {%- if 'dpdk' in conf.cluster.domain or conf.MCP_DPDK_MODE %}
61 {%- if conf.idf.fuel.reclass is defined %}
62 {%- if conf.idf.fuel.reclass.node[i].compute_params.dpdk is defined %}
63 {#- Can't dump json here due to dpdk0_* below, explicitly create yaml #}
64 {%- set _dpdk = conf.idf.fuel.reclass.node[i].compute_params.dpdk %}
65 {%- for _i in _dpdk %}
66 {{ _i }}: '"{{ _dpdk[_i] }}"'
70 compute_hugepages_size: 2M
71 compute_hugepages_count: 8192
72 compute_hugepages_mount: /mnt/hugepages_2M
73 compute_kernel_isolcpu: 2,3,10,11
74 compute_dpdk_driver: uio
75 compute_ovs_pmd_cpu_mask: '"0xc04"'
76 compute_ovs_dpdk_socket_mem: '"2048,2048"'
77 compute_ovs_dpdk_lcore_mask: '"0x8"'
78 compute_ovs_memory_channels: '"2"'
82 dpdk0_name: {{ conf.idf.fuel.network.node[i].interfaces[nm.idx_private] }}
83 dpdk0_pci: '"{{ conf.idf.fuel.network.node[i].busaddr[nm.idx_private] }}"'
85 {%- if conf.idf.fuel.reclass is defined %}
86 {%- if conf.idf.fuel.reclass.node[i].compute_params.common is defined %}
87 {%- set _common = conf.idf.fuel.reclass.node[i].compute_params.common %}
88 {%- for _i in _common %}
89 {{ _i }}: '"{{ _common[_i] }}"'
95 compute_hugepages_size: 1G
96 compute_hugepages_count: 16
97 compute_hugepages_mount: /mnt/hugepages_1G