summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-11-28 08:26:49 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-28 08:26:49 +0000
commit0cd4332f168052af8887d794b16efa7ba661d509 (patch)
tree59f4ee6144d789eb7203ae62f63dab52602c30be /ci
parent255742b98efd4ff499a6abc6eb491059fc268d43 (diff)
parent6ead32f737f39e3d82e1484a9d31f07ed2daeadb (diff)
Merge "Add pre-{install,purge} support for base image"
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index b13e18e7e..427850fda 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -15,6 +15,7 @@
do_exit () {
local RC=$?
clean
+ cleanup_mounts
if [ ${RC} -eq 0 ]; then
notify "\n[OK] MCP: Openstack installation finished succesfully!\n\n" 2
else
@@ -158,6 +159,7 @@ NO_DEPLOY_ENVIRONMENT=${NO_DEPLOY_ENVIRONMENT:-0}
ERASE_ENV=${ERASE_ENV:-0}
source "${DEPLOY_DIR}/globals.sh"
+source "${DEPLOY_DIR}/lib.sh"
#
# END of variables to customize
@@ -340,7 +342,6 @@ fi
# Get required infra deployment data
set +x
-source lib.sh
eval "$(parse_yaml "${SCENARIO_DIR}/defaults-$(uname -i).yaml")"
eval "$(parse_yaml "${SCENARIO_DIR}/${DEPLOY_TYPE}/${DEPLOY_SCENARIO}.yaml")"
eval "$(parse_yaml "${LOCAL_PDF_RECLASS}")"
@@ -358,6 +359,23 @@ for node in "${virtual_nodes[@]}"; do
done
virtual_nodes_data=${virtual_nodes_data%|}
+# Serialize repos, packages to (pre-)install/remove for:
+# - foundation node VM base image (virtual: all VMs, baremetal: cfg01|mas01)
+# - virtualized control plane VM base image (only when VCP is used)
+base_image_flavors=common
+if [[ "${cluster_states[*]}" =~ virtual_control ]]; then
+ base_image_flavors+=" control"
+fi
+for sc in ${base_image_flavors}; do
+ for va in apt_keys apt_repos pkg_install pkg_remove; do
+ key=virtual_${sc}_${va}
+ eval "${key}=\${${key}[@]// /|}"
+ eval "${key}=\${${key}// /,}"
+ virtual_repos_pkgs+="${!key}^"
+ done
+done
+virtual_repos_pkgs=${virtual_repos_pkgs%^}
+
# Expand reclass and virsh network templates
for tp in "${RECLASS_CLUSTER_DIR}/all-mcp-ocata-common/opnfv/"*.template \
net_*.template; do
@@ -413,7 +431,8 @@ elif [ ${USE_EXISTING_INFRA} -gt 0 ]; then
check_connection
else
generate_ssh_key
- prepare_vms "${base_image}" "${STORAGE_DIR}" "${virtual_nodes[@]}"
+ prepare_vms "${base_image}" "${STORAGE_DIR}" "${virtual_repos_pkgs}" \
+ "${virtual_nodes[@]}"
create_networks "${OPNFV_BRIDGES[@]}"
create_vms "${STORAGE_DIR}" "${virtual_nodes_data}" "${OPNFV_BRIDGES[@]}"
update_mcpcontrol_network