summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/installers/fuel/net_map.j247
-rw-r--r--config/installers/fuel/pod_config.yml.j271
-rw-r--r--config/pdf/idf-pod1.schema.yaml8
-rwxr-xr-xconfig/utils/check-jinja2.sh22
-rw-r--r--labs/arm/idf-pod5.yaml3
-rw-r--r--labs/arm/idf-pod7.yaml3
-rw-r--r--labs/bii/idf-pod1.yaml3
-rw-r--r--labs/ericsson/idf-pod2.yaml12
-rw-r--r--labs/huawei/idf-pod1.yaml3
-rw-r--r--labs/intel/idf-pod18.yaml12
-rw-r--r--labs/nokia/idf-pod1.yaml12
-rw-r--r--labs/zte/idf-pod2.yaml2
-rw-r--r--labs/zte/idf-pod3.yaml2
-rw-r--r--labs/zte/idf-pod9.yaml2
14 files changed, 144 insertions, 58 deletions
diff --git a/config/installers/fuel/net_map.j2 b/config/installers/fuel/net_map.j2
new file mode 100644
index 00000000..c3ff6cb7
--- /dev/null
+++ b/config/installers/fuel/net_map.j2
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2018 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
+##############################################################################
+{#- NOTE: All same role (e.g. compute) roles will share the same mapping #}
+
+{#- Until we support per-node configuration, we only collect data for the
+ first node in each role. Currently, there's no role mapping in PDF/IDF,
+ so we default to controller = first node in PDF, compute = 4th #}
+
+{#- ctl maps to MCP kvm on baremetal, ctl + gtw etc. on virtual #}
+{%- set ctl01 = {'idx': 0} %}
+{%- set cmp001 = {'idx': 3} %}
+
+{#- net_config v1.0 only supports global network-to-interface-index mapping,
+ which is incovenient for PODs with different computes (e.g. less NICs).
+ This can be worked around by tweaking the NIC definition order in PDF.
+ The same observation applies to vlan tags, at least for now. #}
+
+{#- Determine interface index for each network (plumbing vars) #}
+{%- set idx_mcp = 0 %} {#- mcpcontrol network is hard set on first interface #}
+{%- set idx_admin = conf.idf.net_config.admin.interface %}
+{%- set idx_mgmt = conf.idf.net_config.mgmt.interface %}
+{%- set idx_private = conf.idf.net_config.private.interface %}
+{%- set idx_public = conf.idf.net_config.public.interface %}
+
+{#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) #}
+{%- set vlan_admin = conf.idf.net_config.admin.vlan %}
+{%- set vlan_mgmt = conf.idf.net_config.mgmt.vlan %}
+{%- set vlan_private = conf.idf.net_config.private.vlan %}
+{%- set vlan_public = conf.idf.net_config.public.vlan %}
+
+{#- Physical interface OS name for each network (e.g. em1, enp1s0f1) #}
+{%- for role in [ctl01, cmp001] %}
+ {%- set node = conf.idf.fuel.network.node[role.idx] %}
+ {%- set _ = role.update({
+ 'nic_mcp': node.interfaces[idx_mcp],
+ 'nic_admin': node.interfaces[idx_admin],
+ 'nic_mgmt': node.interfaces[idx_mgmt],
+ 'nic_private': node.interfaces[idx_private],
+ 'nic_public': node.interfaces[idx_public],
+ 'bus_private': node.busaddr[idx_private]}) %}
+ {#- PCI addresses are only used on computes for DPDK on private net #}
+{%- endfor %}
diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2
index ba6f78ad..65336a5b 100644
--- a/config/installers/fuel/pod_config.yml.j2
+++ b/config/installers/fuel/pod_config.yml.j2
@@ -5,48 +5,36 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
----
-{%- if conf.idf is defined and conf.idf.fuel is defined %}
- {%- if conf.idf.net_config is defined -%}
- {%- set net_admin = conf.idf.net_config.admin.network -%}
- {%- set net_mgmt = conf.idf.net_config.mgmt.network -%}
- {%- set net_private = conf.idf.net_config.private.network -%}
- {%- set net_public = conf.idf.net_config.public.network -%}
- {%- set net_public_mask = conf.idf.net_config.public.mask -%}
- {%- set vlan_mgmt = conf.idf.net_config.mgmt.vlan -%}
- {%- set vlan_private = conf.idf.net_config.private.vlan -%}
- {%- if conf.idf.net_config.public.dns is defined -%}
- {%- set dns_public = conf.idf.net_config.public.dns -%}
- {%- endif -%}
- {%- set pxe_interface = conf.idf.net_config.admin.interface -%}
- {%- if conf.idf.net_config.public.gateway is defined -%}
- {%- set net_public_gw = conf.idf.net_config.public.gateway -%}
- {%- endif -%}
- {%- if conf.idf.fuel.network.public_pool is defined -%}
- {%- set net_public_pool_start = conf.idf.fuel.network.public_pool.start_ip -%}
- {%- set net_public_pool_end = conf.idf.fuel.network.public_pool.end_ip -%}
- {%- endif -%}
- {%- else -%}
- {%- set net_admin = '192.168.11.0' -%}
- {%- set net_mgmt = '172.16.10.0' -%}
- {%- set net_private = '10.1.0.0' -%}
- {%- set net_public = '172.30.10.0' -%}
- {%- set net_public_mask = '24' -%}
- {%- set vlan_mgmt = '300' -%}
- {%- set vlan_private = '1000' -%}
- {%- set pxe_interface = 0 -%}
- {%- endif -%}
+{%- set net_admin = conf.idf.net_config.admin.network %}
+{%- set net_mgmt = conf.idf.net_config.mgmt.network %}
+{%- set net_private = conf.idf.net_config.private.network %}
+{%- set net_public = conf.idf.net_config.public.network %}
+{%- set net_public_mask = conf.idf.net_config.public.mask %}
+{%- set vlan_mgmt = conf.idf.net_config.mgmt.vlan %}
+{%- set vlan_private = conf.idf.net_config.private.vlan %}
+{%- if conf.idf.net_config.public.dns is defined %}
+ {%- set dns_public = conf.idf.net_config.public.dns %}
+{%- endif %}
+{%- set pxe_interface = conf.idf.net_config.admin.interface %}
+{%- if conf.idf.net_config.public.gateway is defined %}
+ {%- set net_public_gw = conf.idf.net_config.public.gateway %}
+{%- endif %}
+{%- if conf.idf.fuel.network.public_pool is defined %}
+ {%- set net_public_pool_start = conf.idf.fuel.network.public_pool.start_ip %}
+ {%- set net_public_pool_end = conf.idf.fuel.network.public_pool.end_ip %}
+{%- endif %}
- {%- if dns_public is not defined -%}
- {%- set dns_public = [ '8.8.8.8', '8.8.4.4' ] -%}
- {%- endif -%}
- {%- if net_public_gw is not defined -%}
- {%- set net_public_gw = net_public | ipaddr_index('1') -%}
- {%- endif -%}
- {%- if net_public_pool_start is not defined or net_public_pool_end is not defined -%}
- {%- set net_public_pool_start = net_public | ipaddr_index('80') -%}
- {%- set net_public_pool_end = net_public | ipaddr_index('100') -%}
- {%- endif %}
+{%- if dns_public is not defined %}
+ {%- set dns_public = [ '8.8.8.8', '8.8.4.4' ] %}
+{%- endif %}
+{%- if net_public_gw is not defined %}
+ {%- set net_public_gw = net_public | ipaddr_index('1') %}
+{%- endif %}
+{%- if net_public_pool_start is not defined or net_public_pool_end is not defined %}
+ {%- set net_public_pool_start = net_public | ipaddr_index('80') %}
+ {%- set net_public_pool_end = net_public | ipaddr_index('100') %}
+{%- endif %}
+---
parameters:
_param:
@@ -161,4 +149,3 @@ parameters:
opnfv_maas_node05_power_user: {{ conf.nodes.4.remote_management.user }}
opnfv_maas_node05_power_password: {{ conf.nodes.4.remote_management.pass }}
opnfv_maas_node05_interface_mac: '{{ conf.nodes.4.interfaces[pxe_interface].mac_address }}'
-{%- endif -%}
diff --git a/config/pdf/idf-pod1.schema.yaml b/config/pdf/idf-pod1.schema.yaml
index 78e22042..ad680da5 100644
--- a/config/pdf/idf-pod1.schema.yaml
+++ b/config/pdf/idf-pod1.schema.yaml
@@ -81,6 +81,11 @@ properties:
version:
type: 'number'
enum: [0.1]
+ installer:
+ type: 'array'
+ items:
+ type: 'string'
+ enum: ['apex', 'compass4nfv', 'daisy', 'fuel', 'joid']
net_config:
type: 'object'
fuel:
@@ -106,6 +111,9 @@ properties:
$ref: '#/definitions/daisy/v0.1'
compass:
$ref: '#/definitions/compass/v0.1'
+ fuel:
+ required: ['net_config']
+ daisy:
required: ['net_config']
# Do not allow any properties not defined here. This lets us catch typos.
diff --git a/config/utils/check-jinja2.sh b/config/utils/check-jinja2.sh
index b7fa5912..16e52130 100755
--- a/config/utils/check-jinja2.sh
+++ b/config/utils/check-jinja2.sh
@@ -35,27 +35,19 @@ done
# shellcheck disable=SC2086
while IFS= read -r lab_config; do
SUMMARY+="\n${lab_config#labs/};"
- lab_nodes=$(grep -ce 'node:' "${lab_config}")
- lab_tmacs=$(grep -ce 'mac_address:' "${lab_config}")
- ((lab_amacs=lab_tmacs/lab_nodes)); ((lab_nodes-=1))
+ idf_config="$(dirname "${lab_config}")/idf-$(basename "${lab_config}")"
+ idf_installer=$(grep 'installer:' "${idf_config}" 2>/dev/null || echo)
echo "###################### ${lab_config} ######################"
for adapter in ${INSTALLER_ADAPTERS}; do
pdf_inst=0
pdf_inst_pass=0
pdf_yaml_pass=0
- ia_nodes=$(grep -hPo 'nodes\W+\K\d+' -R "${adapter}" | tail -1)
- ia_rmacs=$(grep -hPo 'interfaces\W+\K\d+' -R "${adapter}" | sort | tail -1)
- ((ia_nodes+=1)); ((ia_rmacs+=1))
- if [[ ${ia_nodes} -gt ${lab_nodes} ]]; then
+ installer_name=$(basename "${adapter}")
+ if [ -n "${idf_installer}" ] && echo "${idf_installer}" | \
+ grep -vq "${installer_name}"; then
SUMMARY+='-;'
- echo -n "[GENERATE] [SKIP] $(basename "${adapter}") requires at least"
- echo -e " ${ia_nodes} nodes, but found only ${lab_nodes}, skipping.\n"
- continue
- fi
- if [[ ${ia_rmacs} -ge ${lab_amacs} ]]; then
- SUMMARY+='-;'
- echo -n "[GENERATE] [SKIP] $(basename "${adapter}") requires at least"
- echo -e " ${ia_rmacs} nics, but found ~ ${lab_amacs}, skipping.\n"
+ echo -n "[GENERATE] [SKIP] idf.installer defined and "
+ echo -e "${installer_name} not listed, skipping.\n"
continue
fi
while IFS= read -r jinja_template; do
diff --git a/labs/arm/idf-pod5.yaml b/labs/arm/idf-pod5.yaml
index c8035228..4e33135b 100644
--- a/labs/arm/idf-pod5.yaml
+++ b/labs/arm/idf-pod5.yaml
@@ -10,6 +10,9 @@
idf:
version: 0.1
+ # NOTE: Compass & Joid are not supported on this POD since they require at
+ # least 3 network ports on all nodes.
+ installer: ['apex', 'daisy', 'fuel']
net_config:
oob:
ip-range: 10.0.8.3-10.0.8.10
diff --git a/labs/arm/idf-pod7.yaml b/labs/arm/idf-pod7.yaml
index 6b41363d..2c2a9466 100644
--- a/labs/arm/idf-pod7.yaml
+++ b/labs/arm/idf-pod7.yaml
@@ -10,6 +10,9 @@
idf:
version: 0.1
+ # NOTE: Compass & Joid are not supported on this POD since they require at
+ # least 3 network ports on all nodes.
+ installer: ['apex', 'daisy', 'fuel']
net_config:
oob:
ip-range: 10.0.16.2-10.0.16.6
diff --git a/labs/bii/idf-pod1.yaml b/labs/bii/idf-pod1.yaml
index 187f42ce..d6944795 100644
--- a/labs/bii/idf-pod1.yaml
+++ b/labs/bii/idf-pod1.yaml
@@ -10,6 +10,9 @@
idf:
version: 0.1
+ # NOTE: Temporarily disable Daisy check, since it requires 'storage' network
+ # to be defined in 'idf.net_config' below.
+ installer: ['apex', 'compass4nfv', 'fuel', 'joid']
net_config:
oob: # IPMI management network
interface: 0
diff --git a/labs/ericsson/idf-pod2.yaml b/labs/ericsson/idf-pod2.yaml
new file mode 100644
index 00000000..01f87faa
--- /dev/null
+++ b/labs/ericsson/idf-pod2.yaml
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2018 Ericsson AB, 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
+##############################################################################
+---
+idf:
+ version: 0.1
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
diff --git a/labs/huawei/idf-pod1.yaml b/labs/huawei/idf-pod1.yaml
index 44fb4a06..7e2cd721 100644
--- a/labs/huawei/idf-pod1.yaml
+++ b/labs/huawei/idf-pod1.yaml
@@ -11,7 +11,8 @@
idf:
version: 0.1
- # netconfig
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
net_config:
mgmt:
interface: 1
diff --git a/labs/intel/idf-pod18.yaml b/labs/intel/idf-pod18.yaml
new file mode 100644
index 00000000..bd8c49ec
--- /dev/null
+++ b/labs/intel/idf-pod18.yaml
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2018 Intel Corporation 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
+##############################################################################
+---
+idf:
+ version: 0.1
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
diff --git a/labs/nokia/idf-pod1.yaml b/labs/nokia/idf-pod1.yaml
new file mode 100644
index 00000000..83aba95b
--- /dev/null
+++ b/labs/nokia/idf-pod1.yaml
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2018 Nokia, 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
+##############################################################################
+---
+idf:
+ version: 0.1
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
diff --git a/labs/zte/idf-pod2.yaml b/labs/zte/idf-pod2.yaml
index dbe14b9e..960151d0 100644
--- a/labs/zte/idf-pod2.yaml
+++ b/labs/zte/idf-pod2.yaml
@@ -10,6 +10,8 @@
idf:
version: 0.1
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
net_config:
oob:
interface: 0
diff --git a/labs/zte/idf-pod3.yaml b/labs/zte/idf-pod3.yaml
index e5e19f4c..702e2565 100644
--- a/labs/zte/idf-pod3.yaml
+++ b/labs/zte/idf-pod3.yaml
@@ -10,6 +10,8 @@
idf:
version: 0.1
+ # NOTE: Fuel checking is disabled until 'idf.fuel' is defined below
+ installer: ['apex', 'compass4nfv', 'daisy', 'joid']
net_config:
oob:
interface: 0
diff --git a/labs/zte/idf-pod9.yaml b/labs/zte/idf-pod9.yaml
index 61a225dc..1cdd5d88 100644
--- a/labs/zte/idf-pod9.yaml
+++ b/labs/zte/idf-pod9.yaml
@@ -10,6 +10,8 @@
idf:
version: 0.1
+ # NOTE: For now, only Daisy supports 3-node clusters
+ installer: ['daisy']
net_config:
# NOTE: Network names are likely to change after the PDF spec is updated
oob: