summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-11 06:59:03 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-11 17:05:28 +0200
commitb666bc50b2b8b1bb8cde5cdab280f0409bde4958 (patch)
treebcf7e8085096b65c2e5fa5ffc18ecbe7fae7b97f /mcp/scripts/lib.sh
parentd33f39782f945cae306ce44eead411ff9301a813 (diff)
[cleanup] FN VMs: Fold user-data templates
While at it, retire obsolete MAAS_IP global variable and let mas01 VM get a DHCP address from virsh-managed mcpcontrol network. Change-Id: Ifd85dbcab10894a5d0d675d37f0c35f09776d9b4 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh14
1 files changed, 1 insertions, 13 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 9b1e32c04..34229df08 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -287,13 +287,8 @@ function prepare_vms {
# Create config ISO and resize OS disk image for each foundation node VM
for node in "${vnodes[@]}"; do
- if [[ "${node}" =~ ^(cfg01|mas01) ]]; then
- user_data='user-data.mcp.sh'
- else
- user_data='user-data.admin.sh'
- fi
./create-config-drive.sh -k "$(basename "${SSH_KEY}").pub" \
- -u "${user_data}" -h "${node}" "${image_dir}/mcp_${node}.iso"
+ -u 'user-data.sh' -h "${node}" "${image_dir}/mcp_${node}.iso"
cp "${image_dir}/${image}" "${image_dir}/mcp_${node}.qcow2"
qemu-img resize "${image_dir}/mcp_${node}.qcow2" 100G
# Prepare dedicated drive for cinder on cmp nodes
@@ -468,13 +463,6 @@ function create_vms {
done
}
-function update_mcpcontrol_network {
- # set static ip address for salt master node, MaaS node
- local amac=$(virsh domiflist mas01 2>&1| awk '/mcpcontrol/ {print $5; exit}')
- [ -z "${amac}" ] || virsh net-update "mcpcontrol" add ip-dhcp-host \
- "<host mac='${amac}' name='mas01' ip='${MAAS_IP}'/>" --live --config
-}
-
function reset_vms {
local vnodes=("$@")
local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}"