[lab-config] Use Pharos submodule by default 69/50869/4
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sat, 20 Jan 2018 20:41:05 +0000 (21:41 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 24 Jan 2018 16:36:05 +0000 (17:36 +0100)
- switch from securedlab to pharos as lab-config structure;
- accomodate the move net_config from PDF to IDF in j2 templates;

Change-Id: Ib04e4fb384568a6efd9e78a080857b663521ae88
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh
mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch [deleted file]
mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch [deleted file]
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm_pdf.yml.j2
mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute_pdf.yml.j2
mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/compute_pdf.yml.j2
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/infra/config_pdf.yml.j2
mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2
mcp/scripts/pharos

index 501a36c..5805f49 100755 (executable)
@@ -35,7 +35,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 $(notify "$(basename "$0"): Deploy the Fuel@OPNFV MCP stack" 3)
 
 $(notify "USAGE:" 2)
-  $(basename "$0") -b base-uri -l lab-name -p pod-name -s deploy-scenario \\
+  $(basename "$0") -l lab-name -p pod-name -s deploy-scenario \\
+    [-b Lab Config Base URI] \\
     [-B PXE Bridge [-B Mgmt Bridge [-B Internal Bridge [-B Public Bridge]]]] \\
     [-S storage-dir] [-L /path/to/log/file.tar.gz] \\
     [-f[f]] [-F] [-e | -E[E]] [-d] [-D]
@@ -67,9 +68,14 @@ and provides a fairly simple mechanism to execute a deployment.
 $(notify "Input parameters to the build script are:" 2)
 -b Base URI to the configuration directory (needs to be provided in URI style,
    it can be a local resource: file:// or a remote resource http(s)://).
-   A POD Descriptor File (PDF) should be available at:
+   A POD Descriptor File (PDF) and its Installer Descriptor File (IDF)
+   companion should be available at:
    <base-uri>/labs/<lab-name>/<pod-name>.yaml
-   The default is './mcp/config'.
+   <base-uri>/labs/<lab-name>/idf-<pod-name>.yaml
+   An example config is provided inside current repo in
+   <./mcp/config>.
+   The default is using the git submodule tracking 'OPNFV Pharos' in
+   <./mcp/scripts/pharos>.
 -B Bridges to be used by deploy script. It can be specified several times,
    or as a comma separated list of bridges, or both: -B br1 -B br2,br3
    First occurence sets PXE Brige, next Mgmt, then Internal and Public.
@@ -143,7 +149,7 @@ RECLASS_CLUSTER_DIR=$(cd "${REPO_ROOT_PATH}/mcp/reclass/classes/cluster"; pwd)
 DEPLOY_TYPE='baremetal'
 OPNFV_BRIDGES=('pxebr' 'mgmt' 'internal' 'public')
 URI_REGEXP='(file|https?|ftp)://.*'
-BASE_CONFIG_URI="file://${REPO_ROOT_PATH}/mcp/config"
+BASE_CONFIG_URI="file://${REPO_ROOT_PATH}/mcp/scripts/pharos"
 
 # Customize deploy workflow
 DRY_RUN=${DRY_RUN:-0}
diff --git a/mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch b/mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch
deleted file mode 100644 (file)
index 27467dd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 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
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Sat, 16 Dec 2017 21:14:35 +0100
-Subject: [PATCH] Update MaaS PXE config
-
-- reduce DHCP range to silence a dummy MaaS warning about address exhaustion;
-- define PXE/admin address for Salt Master node;
-- drop obsolete opnfv_infra_maas_pxe_address;
-
-JIRA: FUEL-316
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- config/installers/fuel/pod_config.yml.j2 | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2
-index 28c6188..f380535 100644
---- a/config/installers/fuel/pod_config.yml.j2
-+++ b/config/installers/fuel/pod_config.yml.j2
-@@ -40,6 +40,7 @@ parameters:
- {%- endif %}
-
-     opnfv_infra_config_address: {{ net_mgmt | ipaddr_index('100') }}
-+    opnfv_infra_config_pxe_address: {{ net_admin | ipaddr_index('2') }}
-     opnfv_infra_maas_node01_address: {{ net_mgmt | ipaddr_index('3') }}
-     opnfv_infra_maas_node01_deploy_address: {{ net_admin | ipaddr_index('3') }}
-     opnfv_infra_kvm_address: {{ net_mgmt | ipaddr_index('140') }}
-@@ -48,9 +49,8 @@ parameters:
-     opnfv_infra_kvm_node03_address: {{ net_mgmt | ipaddr_index('143') }}
-
-     opnfv_infra_maas_pxe_network_address: {{ net_admin }}
--    opnfv_infra_maas_pxe_address: {{ net_admin | ipaddr_index('3') }}
--    opnfv_infra_maas_pxe_start_address: {{ net_admin | ipaddr_index('5') }}
--    opnfv_infra_maas_pxe_end_address: {{ net_admin | ipaddr_index('250') }}
-+    opnfv_infra_maas_pxe_start_address: {{ net_admin | ipaddr_index('4') }}
-+    opnfv_infra_maas_pxe_end_address: {{ net_admin | ipaddr_index('100') }}
-
-     opnfv_openstack_gateway_node01_address: {{ net_mgmt | ipaddr_index('124') }}
-     opnfv_openstack_gateway_node02_address: {{ net_mgmt | ipaddr_index('125') }}
diff --git a/mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch b/mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch
deleted file mode 100644 (file)
index 346d750..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 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
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Mon, 1 Jan 2018 17:06:59 +0100
-Subject: [PATCH] Add proxy node management network VIP
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- config/installers/fuel/pod_config.yml.j2 | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2
-index f380535..2d0cdee 100644
---- a/config/installers/fuel/pod_config.yml.j2
-+++ b/config/installers/fuel/pod_config.yml.j2
-@@ -61,6 +61,7 @@ parameters:
-     opnfv_openstack_proxy_address: {{ net_public | ipaddr_index('103') }}
-     opnfv_openstack_proxy_node01_address: {{ net_public | ipaddr_index('104') }}
-     opnfv_openstack_proxy_node02_address: {{ net_public | ipaddr_index('105') }}
-+    opnfv_openstack_proxy_control_address: {{ net_mgmt | ipaddr_index('103') }}
-     opnfv_openstack_proxy_node01_control_address: {{ net_mgmt | ipaddr_index('104') }}
-     opnfv_openstack_proxy_node02_control_address: {{ net_mgmt | ipaddr_index('105') }}
-     opnfv_openstack_control_address: {{ net_mgmt | ipaddr_index('10') }}
index b7f6b7c..42c3fcb 100644 (file)
@@ -6,14 +6,14 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.net_config is defined and conf.idf is defined -%}
+{%- if conf.idf is defined and conf.idf.net_config is defined -%}
     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
 
     {#- Determine interface index for each network (plumbing vars) -#}
-    {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
-    {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
-    {%- set idx_private = conf['net_config']['private']['interface'] -%}
-    {%- set idx_public = conf['net_config']['public']['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'] -%}
 
     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
     {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
     {%- set bus_private = node['busaddr'][idx_private] -%}
 
     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
-    {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
-    {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
-    {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
-    {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
+    {%- 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'] -%}
 {%- else -%}
     {%- set nic_admin = 'enp6s0' -%}
     {%- set nic_mgmt = 'enp6s0' -%}
index bf2b66e..6485fef 100644 (file)
@@ -6,14 +6,14 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.net_config is defined and conf.idf is defined -%}
+{%- if conf.idf is defined and conf.idf.net_config is defined -%}
     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
 
     {#- Determine interface index for each network (plumbing vars) -#}
-    {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
-    {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
-    {%- set idx_private = conf['net_config']['private']['interface'] -%}
-    {%- set idx_public = conf['net_config']['public']['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'] -%}
 
     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
     {%- set iface_names = conf['idf']['fuel']['network']['node'][3]['interfaces'] -%}
     {%- set nic_public = iface_names[idx_public] -%}
 
     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
-    {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
-    {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
-    {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
-    {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
+    {%- 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'] -%}
 {%- else -%}
     {%- set nic_admin = 'enp6s0' -%}
     {%- set nic_mgmt = 'enp6s0' -%}
index 7809bd8..21ab8e9 100644 (file)
@@ -6,14 +6,14 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.net_config is defined and conf.idf is defined -%}
+{%- if conf.idf is defined and conf.idf.net_config is defined -%}
     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
 
     {#- Determine interface index for each network (plumbing vars) -#}
-    {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
-    {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
-    {%- set idx_private = conf['net_config']['private']['interface'] -%}
-    {%- set idx_public = conf['net_config']['public']['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'] -%}
 
     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
     {%- set node = conf['idf']['fuel']['network']['node'][1] -%}
     {%- set bus_private = node['busaddr'][idx_private] -%}
 
     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
-    {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
-    {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
-    {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
-    {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
+    {%- 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'] -%}
 {%- else -%}
     {%- set nic_admin = 'enp6s0' -%}
     {%- set nic_mgmt = 'enp6s0' -%}
index 5511ed7..08e8ab7 100644 (file)
@@ -6,14 +6,14 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.net_config is defined and conf.idf is defined -%}
+{%- if conf.idf is defined and conf.idf.net_config is defined -%}
     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
 
     {#- Determine interface index for each network (plumbing vars) -#}
-    {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
-    {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
-    {%- set idx_private = conf['net_config']['private']['interface'] -%}
-    {%- set idx_public = conf['net_config']['public']['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'] -%}
 
     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
     {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
     {%- set bus_private = node['busaddr'][idx_private] -%}
 
     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
-    {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
-    {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
-    {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
-    {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
+    {%- 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'] -%}
 {%- else -%}
     {%- set nic_admin = 'enp6s0' -%}
     {%- set nic_mgmt = 'enp6s0' -%}
index 7acb4b4..88e3117 100644 (file)
@@ -6,14 +6,14 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
-{%- if conf.net_config is defined and conf.idf is defined -%}
+{%- if conf.idf is defined and conf.idf.net_config is defined -%}
     {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#}
 
     {#- Determine interface index for each network (plumbing vars) -#}
-    {%- set idx_admin = conf['net_config']['admin']['interface'] -%}
-    {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%}
-    {%- set idx_private = conf['net_config']['private']['interface'] -%}
-    {%- set idx_public = conf['net_config']['public']['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'] -%}
 
     {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#}
     {%- set node = conf['idf']['fuel']['network']['node'][0] -%}
     {%- set bus_private = node['busaddr'][idx_private] -%}
 
     {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#}
-    {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%}
-    {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%}
-    {%- set vlan_private = conf['net_config']['private']['vlan'] -%}
-    {%- set vlan_public = conf['net_config']['public']['vlan'] -%}
+    {%- 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'] -%}
 {%- else -%}
     {%- set nic_admin = 'enp6s0' -%}
     {%- set nic_mgmt = 'enp6s0' -%}
index 89d7cb9..c1fab72 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 89d7cb905bf6f286648638f5865884ac5e332e59
+Subproject commit c1fab72890ba215217d706401ba13328a8e179cd