aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_template.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-02-28 15:46:19 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-05-08 14:12:59 +0000
commitbb38e087e70dd00575e441e375b1be2a41d4c657 (patch)
tree1108c279361b7f741dd75dc555a7bdbcea093ea4 /mcp/scripts/lib_template.sh
parente7c8f45b680ab143e92504e73d6e7b121b379edc (diff)
[virtual] Parameterize scenarios based on PDF/IDF
NOTE: only os-nosdn-nofeature-noha is parameterized for now. - move config drive & disk creation from prepare_vms to create_vms; - make default disk size(s) configurable based on scenario defaults and vPDF; * compute nodes require 2 disks to be defined in vPDF, since the pillar reclass model assumes /dev/vdb is reserved for cinder; * if multiple disks are defined in vPDF, they are created and attached accordinly (only ctl01 and cmp nodes are parameterized in this change; only for the os-nosdn-nofeature-noha scenario); - vCPU specifications are deduced based on vPDF (sockets, cores); * threads/core is hard set to 2 since vPDF does not have a key for it; * NUMA resources are distributed evenly based on the number of sockets configured in PDF; * no less than the mininum requirement for a scenario is allocated (e.g. if PDF specifies 2 cores, but the scenario requires at least 4 cores, the larger value will be used); - RAM is deduced based on PDF (but no less than the mininum req is allocated, e.g. if PDF specifies 2GB RAM for computes, but the scenario requires at least 8GB, the larger value will be used); Change-Id: I97188aa2a1006865b8429eb6483e10c76795f7d2 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 9e5b19768d6eb9b32564240065ecba6c791cac12)
Diffstat (limited to 'mcp/scripts/lib_template.sh')
-rw-r--r--mcp/scripts/lib_template.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/mcp/scripts/lib_template.sh b/mcp/scripts/lib_template.sh
index 980827c7a..b44702235 100644
--- a/mcp/scripts/lib_template.sh
+++ b/mcp/scripts/lib_template.sh
@@ -47,9 +47,6 @@ function do_templates_scenario {
notify_e "[ERROR] IDF does not match yaml schema!"
fi
fi
- for _yaml in "${extra_yaml[@]}"; do
- awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}"
- done
if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \
-i "$(dirname "$(readlink -f "${PHAROS_IA}")")" \
-j "${PHAROS_IA}" -v > "${image_dir}/pod_config.yml"; then
@@ -63,6 +60,9 @@ function do_templates_scenario {
-i "$(dirname "$(readlink -f "${PHAROS_IA}")")"; then
notify_e '[ERROR] Could not convert j2 scenario definitions!'
fi
+ for _yaml in "${extra_yaml[@]}"; do
+ awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}"
+ done
}
# Expand reclass and virsh network templates based on PDF + IDF + others