summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xci/deploy.sh16
-rw-r--r--mcp/deploy/images/.gitkeep0
-rw-r--r--mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j22
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-noha/openstack_compute_pdf.yml.j22
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-noha/openstack_gateway_pdf.yml.j22
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j24
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j22
8 files changed, 16 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 059072f14..4a787d9b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,8 +9,6 @@
**/docs_build/
**/docs_output/
**/releng/
-**/mcp/deploy/images/
-**/mcp/scripts/user-data.sh
**/mcp/scripts/virsh_net/*.xml
**/mcp/scripts/docker-compose/*.yaml
**/mcp/scripts/*.img
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 8baacfab0..103f83b9e 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -107,7 +107,9 @@ $(notify_i "Input parameters to the build script are:" 2)
Note that without the required packages, deploy will fail.
-s Deployment-scenario, this points to a short deployment scenario name, which
has to be defined in config directory (e.g. os-odl-nofeature-ha).
--S Storage dir for VM images, default is mcp/deploy/images
+-S Storage dir for VM images, default is /var/lib/opnfv/tmpdir
+ It is recommended to store the deploy artifacts on a fast disk, outside of
+ the current git repository (so clean operations won't erase it).
$(notify_i "[NOTE] sudo & virsh priviledges are needed for this script to run" 3)
@@ -116,7 +118,8 @@ Example:
$(notify_i "sudo $(basename "$0") \\
-b file:///home/jenkins/securedlab \\
-l lf -p pod2 \\
- -s os-odl-nofeature-ha" 2)
+ -s os-odl-nofeature-ha \\
+ -S /home/jenkins/tmpdir" 2)
EOF
}
@@ -130,7 +133,7 @@ EOF
CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
MCP_REPO_ROOT_PATH=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")
DEPLOY_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/scripts"; pwd)
-MCP_STORAGE_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/deploy/images"; pwd)
+MCP_STORAGE_DIR='/var/lib/opnfv/tmpdir'
URI_REGEXP='(file|https?|ftp)://.*'
BASE_CONFIG_URI="file://${MCP_REPO_ROOT_PATH}/mcp/scripts/pharos"
@@ -242,6 +245,8 @@ pushd "${DEPLOY_DIR}" > /dev/null
# scenario, etc.
# Install required packages on jump server
+sudo mkdir -p "${MCP_STORAGE_DIR}"
+sudo chown "${USER}:${USER}" "${MCP_STORAGE_DIR}"
if [ ${USE_EXISTING_PKGS} -eq 1 ]; then
notify "[NOTE] Skipping distro pkg installation" 2
else
@@ -272,10 +277,9 @@ fi
generate_ssh_key
export MAAS_SSH_KEY="$(cat "$(basename "${SSH_KEY}").pub")"
-MCP_DPDK_MODE=$([[ "$DEPLOY_SCENARIO" =~ ovs ]] && echo 1 || echo 0)
# Expand jinja2 templates based on PDF data and env vars
-export MCP_REPO_ROOT_PATH MCP_VCP MCP_DPDK_MODE MCP_STORAGE_DIR MCP_DOCKER_TAG \
- MCP_CMP_SS MCP_JUMP_ARCH=$(uname -i)
+export MCP_REPO_ROOT_PATH MCP_VCP MCP_STORAGE_DIR MCP_DOCKER_TAG MCP_CMP_SS \
+ MCP_JUMP_ARCH=$(uname -i) MCP_DEPLOY_SCENARIO="${DEPLOY_SCENARIO}"
do_templates_scenario "${MCP_STORAGE_DIR}" "${TARGET_LAB}" "${TARGET_POD}" \
"${BASE_CONFIG_URI}" "${SCENARIO_DIR}" \
"${SCENARIO_DIR}/${DEPLOY_SCENARIO}.yaml"
diff --git a/mcp/deploy/images/.gitkeep b/mcp/deploy/images/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/mcp/deploy/images/.gitkeep
+++ /dev/null
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2
index 5fa4ca486..9b78bef2c 100644
--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/config_pdf.yml.j2
@@ -60,7 +60,7 @@ parameters:
linux_system_codename: xenial
{#- No partial defaults, all or nothing. Defaults tuned for lf-pod2. #}
- {%- if 'dpdk' in conf.cluster.domain or conf.MCP_DPDK_MODE %}
+ {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
{%- if conf.idf.fuel.reclass is defined %}
{%- if conf.idf.fuel.reclass.node[i].compute_params.dpdk is defined %}
{#- Can't dump json here due to dpdk0_* below, explicitly create yaml #}
diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_compute_pdf.yml.j2
index aceb54461..20f9b3c1e 100644
--- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_compute_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_compute_pdf.yml.j2
@@ -11,7 +11,7 @@
{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
{%- set nics = { nm.cmp001.nic_mgmt: True, nm.cmp001.nic_private: True } %}
{%- set vlans = { nm.vlan_mgmt: nm.cmp001.nic_mgmt } %}
-{%- if 'dpdk' not in conf.cluster.domain and not conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' not in conf.MCP_DEPLOY_SCENARIO %}
{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
{%- do vlans.update({ vlan_private_start: nm.cmp001.nic_private }) %}
{%- endif %}
diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_gateway_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_gateway_pdf.yml.j2
index b05290480..bd62ae990 100644
--- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_gateway_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_gateway_pdf.yml.j2
@@ -11,7 +11,7 @@
{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
{%- set nics = { nm.ctl01.nic_mgmt: True, nm.ctl01.nic_private: True } %}
{%- set vlans = { nm.vlan_mgmt: nm.ctl01.nic_mgmt } %}
-{%- if 'dpdk' not in conf.cluster.domain and not conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' not in conf.MCP_DEPLOY_SCENARIO %}
{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
{%- do vlans.update({ vlan_private_start: nm.ctl01.nic_private }) %}
{%- endif %}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j2
index 1c4ee7a19..d57a4b7c1 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j2
@@ -12,7 +12,7 @@
classes:
- service.neutron.compute.single
- service.neutron.compute.opendaylight.single
-{%- if conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
- system.nova.compute.nfv.hugepages
- system.neutron.compute.nfv.dpdk
{%- endif %}
@@ -22,7 +22,7 @@ parameters:
linux:
network:
interface:
-{%- if conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
dpdk0:
name: ${_param:dpdk0_name}
pci: ${_param:dpdk0_pci}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j2
index 0a345f42c..bbd70caa5 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j2
@@ -17,7 +17,7 @@ parameters:
linux:
network:
interface:
-{%- if conf.MCP_DPDK_MODE %}
+{%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
{{ nm.cmp001.nic_private }}:
ovs_bridge: br-prv
br-prv: