From 29ad01ff1a3ee720b161008c1395f5ee9127ab9d Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 24 Jan 2018 21:02:40 +0100 Subject: [IDF] Add optional 'idf.installer' array There is no easy way to determine automatically if a PDF/IDF set is compatible with a specific installer adapter. Most common incompatibilities are caused by: - installer adapters hardcode more network ports than nodes have defined in PDF; - installer adapters hardcode more nodes than PDF defines; Previous attempt at handling this dynamically (cd54edf) fails for recently added PODs, so let's handle this explicitly per-pod via a new optional IDF property, 'idf.installer'. If 'idf.installer' is defined, it will be used by `check-jinja2.sh` as a filter-in list of installer adapters to check against. The default (no 'idf.installer' present) is to check all IAs. Leverage the new property for: - arm-pod5: not enough network ports on computes for Compass, Joid; - arm-pod7: same as arm-pod5; - bii-pod1: no 'storage' network defined in IDF for Daisy; - zte-pod9: 3 cluster nodes are only supported by Daisy for now; SPEC changes: - net_config (previously mandatory for IDF version '0.1') is now mandatory only if 'idf.fuel' or 'idf.daisy' is defined; Fixes: cd54edf Change-Id: I706c05519e5491ad631069d7cc090e9c8bfd3011 Signed-off-by: Alexandru Avadanii --- labs/arm/idf-pod5.yaml | 3 +++ labs/arm/idf-pod7.yaml | 3 +++ labs/bii/idf-pod1.yaml | 3 +++ labs/zte/idf-pod9.yaml | 2 ++ 4 files changed, 11 insertions(+) (limited to 'labs') 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/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: -- cgit 1.2.3-korg From 0c28815c91cfaca596875592e63ce407bbea8d90 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 28 Jan 2018 19:34:31 +0100 Subject: [fuel] Explicitly blacklist incompatible labs Previously, we used to silently refuse to construct 'pod_config' for PODs missing mandatory PDF/IDF configuration; and instead generated an empty output YAML. Retire safety checks in Fuel IA and explicitly blacklist Fuel via new 'idf.installer' where appropiate. The following PODs do not yet support Fuel due to missing 'idf.fuel': - ericsson-pod2 - huawei-pod1 - intel-pod18 - nokia-pod1 - zte-pod2 - zte-pod3 Change-Id: Ief62d62f99a79187303e3f15b83030289e5efdcb Signed-off-by: Alexandru Avadanii --- config/installers/fuel/pod_config.yml.j2 | 71 +++++++++++++------------------- labs/ericsson/idf-pod2.yaml | 12 ++++++ labs/huawei/idf-pod1.yaml | 3 +- labs/intel/idf-pod18.yaml | 12 ++++++ labs/nokia/idf-pod1.yaml | 12 ++++++ labs/zte/idf-pod2.yaml | 2 + labs/zte/idf-pod3.yaml | 2 + 7 files changed, 71 insertions(+), 43 deletions(-) create mode 100644 labs/ericsson/idf-pod2.yaml create mode 100644 labs/intel/idf-pod18.yaml create mode 100644 labs/nokia/idf-pod1.yaml (limited to 'labs') diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 index 04eff45c..b3fd9c45 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: @@ -155,4 +143,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/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 -- cgit 1.2.3-korg