diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-10-04 20:27:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-10-04 20:27:47 +0000 |
commit | 61b418dd534fe09e2550248d6d909a2399a18d27 (patch) | |
tree | 4e7a6517b57cdaa29bbf5877360e5d1f0e1ff87d /mcp | |
parent | a05f8d2682f2449d7d10e52038c56a0af6357def (diff) | |
parent | 8ec927497b7ee0fd3b7346e957878173b080ef6a (diff) |
Merge "Identify jump host bridges based on IDF / PDF nets"
Diffstat (limited to 'mcp')
10 files changed, 61 insertions, 27 deletions
diff --git a/mcp/config/labs/local/idf-pod1.yaml b/mcp/config/labs/local/idf-pod1.yaml new file mode 100644 index 000000000..7932f8896 --- /dev/null +++ b/mcp/config/labs/local/idf-pod1.yaml @@ -0,0 +1,12 @@ +--- +### LF POD 2 installer descriptor file ### + +idf: + version: 0.1 + fuel: + jumphost: + bridges: + admin: 'pxebr' + mgmt: 'br-ctl' + private: '' + public: '' diff --git a/mcp/patches/pharos/0001-Add-IDF-mappings-to-installer-adapter.patch b/mcp/patches/pharos/0001-Add-IDF-mappings-to-installer-adapter.patch new file mode 100644 index 000000000..59a0e975a --- /dev/null +++ b/mcp/patches/pharos/0001-Add-IDF-mappings-to-installer-adapter.patch @@ -0,0 +1,27 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +Date: Tue, 3 Oct 2017 02:41:41 +0200 +Subject: [PATCH] Add IDF mappings to installer adapter + +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +--- + config/installers/fuel/pod_config.yml.j2 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 +index 99434f9..676ead3 100644 +--- a/config/installers/fuel/pod_config.yml.j2 ++++ b/config/installers/fuel/pod_config.yml.j2 +@@ -26,6 +26,13 @@ + parameters: + _param: + ++{%- if conf.idf is defined %} ++ opnfv_jump_bridge_admin: {{ conf['idf']['fuel']['jumphost']['bridges']['admin'] }} ++ opnfv_jump_bridge_mgmt: {{ conf['idf']['fuel']['jumphost']['bridges']['mgmt'] }} ++ opnfv_jump_bridge_private: {{ conf['idf']['fuel']['jumphost']['bridges']['private'] }} ++ opnfv_jump_bridge_public: {{ conf['idf']['fuel']['jumphost']['bridges']['public'] }} ++{%- endif %} ++ + opnfv_infra_config_address: {{ net_mgmt | ipaddr_index('100') }} + opnfv_infra_maas_node01_address: {{ net_mgmt | ipaddr_index('3') }} + opnfv_infra_maas_node01_deploy_address: {{ net_admin | ipaddr_index('3') }} 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: diff --git a/mcp/salt-formulas/maas/pxe_route.sls b/mcp/salt-formulas/maas/pxe_route.sls index 9c22b2a76..e6e9a7801 100644 --- a/mcp/salt-formulas/maas/pxe_route.sls +++ b/mcp/salt-formulas/maas/pxe_route.sls @@ -3,6 +3,6 @@ routes: - name: {{ salt['pillar.get']('_param:opnfv_fn_vm_primary_interface') }} - routes: - name: maas_mcp_to_pxe_network - ipaddr: {{ salt['pillar.get']('_param:opnfv_maas_pxe_network') }} + ipaddr: {{ salt['pillar.get']('_param:opnfv_maas_pxe_network_address') }} netmask: 255.255.255.0 gateway: {{ salt['pillar.get']('_param:opnfv_maas_mcp_address') }} diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index dc4d9dc2f..fcc5d76ac 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -103,13 +103,7 @@ create_vms() { vnode_networks[2]="${vnode_networks[0]}" fi for net in "${vnode_networks[@]:1}"; do - net_type="bridge" - # in case of custom network, host should already have the bridge in place - if [ -f "net_${net}.xml" ] && \ - [ ! -d "/sys/class/net/${net}/bridge" ]; then - net_type="network" - fi - net_args="${net_args} --network ${net_type}=${net},model=virtio" + net_args="${net_args} --network bridge=${net},model=virtio" done # shellcheck disable=SC2086 diff --git a/mcp/scripts/net_mcpcontrol.xml.template b/mcp/scripts/net_mcpcontrol.xml.template index 722a66aa9..ab58851e8 100644 --- a/mcp/scripts/net_mcpcontrol.xml.template +++ b/mcp/scripts/net_mcpcontrol.xml.template @@ -2,9 +2,9 @@ <name>mcpcontrol</name> <bridge name="mcpcontrol"/> <forward mode="nat"/> - <ip address="${MCP_CTRL_NETWORK_ROOTSTR}.1" netmask="255.255.255.0"> + <ip address="${SALT_MASTER%.*}.1" netmask="255.255.255.0"> <dhcp> - <range start="${MCP_CTRL_NETWORK_ROOTSTR}.2" end="${MCP_CTRL_NETWORK_ROOTSTR}.254"/> + <range start="${SALT_MASTER%.*}.2" end="${SALT_MASTER%.*}.254"/> </dhcp> </ip> </network> diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos -Subproject 908dab58edbbe8f22db14a9261693a54e9b2d8f +Subproject 2c4fac2e41aaca9dd679b200ffc968eeb448b39 |