diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-09-16 03:22:38 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-10-03 18:41:20 +0200 |
commit | 8ec927497b7ee0fd3b7346e957878173b080ef6a (patch) | |
tree | 2f2daf184b59ba934e95986e1dddbc27932eb96d /mcp/reclass/classes | |
parent | 0c00f813d709fd1b65e5dd52abcf16fd81b3d0e1 (diff) |
Identify jump host bridges based on IDF / PDF nets
- minor refactor of runtime templates parsing to allow var expansion;
- parse <pod_config.yml> into shell vars, match dynamically networks
from PDF to IP addresses on bridges of current jumphost;
- keep old '-B' parameter in <ci/deploy.sh>, use it for providing
fallback values in case there's no bridge name specified via IDF
and no IP on the jumphost for one or more of the PDF networks;
- re-enable dry-run to ease testing of the above;
- add sample 'idf-pod1.yaml' to <mcp/config/labs/local>;
The new behavior will try to determine the jump host bridge names:
1. Based on IDF mapping, if available
2. Based on PDF network matching with IP addrs on jumphost;
3. Fallback to values passed via '-B';
4. Fallback to default values hardcoded in the deploy script;
Later, we will drop MaaS network env vars in favor of PDF vars,
once the PDF template is generating them.
Change-Id: If9cd65d310c02965b2e2bfa06a0d7e0f97f1dd48
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/reclass/classes')
4 files changed, 18 insertions, 17 deletions
diff --git a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/runtime.yml.template b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/runtime.yml.template index b07ae13bd..1488da271 100644 --- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/runtime.yml.template +++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/runtime.yml.template @@ -1,9 +1,10 @@ parameters: _param: reclass_config_master: ${SALT_MASTER} - opnfv_maas_mcp_address: ${MAAS_IP} - opnfv_maas_pxe_network: ${MAAS_PXE_NETWORK} - opnfv_maas_pxe_address: ${MAAS_PXE_NETWORK_ROOTSTR}.3 - opnfv_maas_pxe_iprange_start: ${MAAS_PXE_NETWORK_ROOTSTR}.5 - opnfv_maas_pxe_iprange_end: ${MAAS_PXE_NETWORK_ROOTSTR}.250 + + # These should be moved to pod_config.yml and read based on PDF admin net + opnfv_maas_pxe_network_address: ${MAAS_PXE_NETWORK} + opnfv_maas_pxe_address: ${MAAS_PXE_NETWORK%.*}.3 + opnfv_maas_pxe_start_address: ${MAAS_PXE_NETWORK%.*}.5 + opnfv_maas_pxe_end_address: ${MAAS_PXE_NETWORK%.*}.250 diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml index 737d6cb6a..2e39588f4 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/maas.yml @@ -33,12 +33,12 @@ parameters: default_min_hwe_kernel: 'hwe-16.04' subnets: opnfv_maas_pxe: - name: ${_param:opnfv_maas_pxe_network}/24 - cidr: ${_param:opnfv_maas_pxe_network}/24 + name: ${_param:opnfv_maas_pxe_network_address}/24 + cidr: ${_param:opnfv_maas_pxe_network_address}/24 gateway_ip: ${_param:single_address} iprange: - start: ${_param:opnfv_maas_pxe_iprange_start} - end: ${_param:opnfv_maas_pxe_iprange_end} + start: ${_param:opnfv_maas_pxe_start_address} + end: ${_param:opnfv_maas_pxe_end_address} type: dynamic vlans: untagged: diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/infra/maas.yml index 00ee552a3..db48750d0 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/infra/maas.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/infra/maas.yml @@ -33,12 +33,12 @@ parameters: default_min_hwe_kernel: 'hwe-16.04' subnets: opnfv_maas_pxe: - name: ${_param:opnfv_maas_pxe_network}/24 - cidr: ${_param:opnfv_maas_pxe_network}/24 + name: ${_param:opnfv_maas_pxe_network_address}/24 + cidr: ${_param:opnfv_maas_pxe_network_address}/24 gateway_ip: ${_param:single_address} iprange: - start: ${_param:opnfv_maas_pxe_iprange_start} - end: ${_param:opnfv_maas_pxe_iprange_end} + start: ${_param:opnfv_maas_pxe_start_address} + end: ${_param:opnfv_maas_pxe_end_address} type: dynamic vlans: untagged: diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml index cebc779b1..c0a487417 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/maas.yml @@ -33,12 +33,12 @@ parameters: default_min_hwe_kernel: 'hwe-16.04' subnets: opnfv_maas_pxe: - name: ${_param:opnfv_maas_pxe_network}/24 - cidr: ${_param:opnfv_maas_pxe_network}/24 + name: ${_param:opnfv_maas_pxe_network_address}/24 + cidr: ${_param:opnfv_maas_pxe_network_address}/24 gateway_ip: ${_param:single_address} iprange: - start: ${_param:opnfv_maas_pxe_iprange_start} - end: ${_param:opnfv_maas_pxe_iprange_end} + start: ${_param:opnfv_maas_pxe_start_address} + end: ${_param:opnfv_maas_pxe_end_address} type: dynamic vlans: untagged: |