states: Rename openstack, add baremetal_init
[fuel.git] / mcp / reclass / classes / cluster / baremetal-mcp-ocata-ovs-dpdk-ha / infra / config_pdf.yml.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 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
9 {%- if conf.net_config is defined and conf.idf is defined -%}
10     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
11
12     {#- Determine interface index for each network (plumbing vars) -#}
13     {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
14     {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
15     {%- set idx_private = conf['net_config']['private']['interface'] -%}
16     {%- set idx_public = conf['net_config']['public']['interface'] -%}
17
18     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
19     {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
20     {%- set nic_admin = node['interfaces'][idx_admin] -%}
21     {%- set nic_mgmt = node['interfaces'][idx_mgmt] -%}
22     {%- set nic_private = node['interfaces'][idx_private] -%}
23     {%- set nic_public = node['interfaces'][idx_public] -%}
24
25     {#- PCI addresses (only for DPDK on private) -#}
26     {%- set bus_private = node['busaddr'][idx_private] -%}
27
28     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
29     {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
30     {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
31     {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
32     {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
33 {%- else -%}
34     {%- set nic_admin = 'enp6s0' -%}
35     {%- set nic_mgmt = 'enp6s0' -%}
36     {%- set nic_private = None -%}
37     {%- set nic_public = None -%}
38     {%- set vlan_admin = 'native' -%}
39     {%- set vlan_mgmt = '300' -%}
40     {%- set vlan_private = '1000' -%}
41 {%- endif -%}
42 ---
43 parameters:
44   reclass:
45     storage:
46       node:
47         openstack_compute_node01:
48           params:
49             dpdk0_name: {{ nic_private }}
50             dpdk0_pci: '"{{ bus_private }}"'
51         openstack_compute_node02:
52           params:
53             dpdk0_name: {{ nic_private }}
54             dpdk0_pci: '"{{ bus_private }}"'