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