From ad13bf489b56cccdfbf853eea14f40c542f6fc98 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Fri, 24 Oct 2014 11:34:08 +0200 Subject: [PATCH] MT#9567 Moved enable_vm_services from deployment.sh to installer I have tried to add web_* types using deployment.sh, but we need to rebuild configs later, so the proper way here is to move it installer (like we did for performance options). So, reverting web_* part (last two commits) and stops using function enable_vm_services in deployment.sh since mr3.6 P.S. vagrant_configuration is the last Vagrant part in deployment.sh I hope to move it in installer also one day. Change-Id: I57fcb68b71f51cd39b821fb1f30da658fc68d152 --- deployment.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/deployment.sh b/deployment.sh index 0f48687..562bc9f 100755 --- a/deployment.sh +++ b/deployment.sh @@ -1452,7 +1452,8 @@ EOF # install and execute ngcp-installer logit "ngcp-installer: $INSTALLER" - INSTALLER_OPTS="TRUNK_VERSION=$TRUNK_VERSION SKIP_SOURCES_LIST=$SKIP_SOURCES_LIST ADJUST_FOR_LOW_PERFORMANCE=$ADJUST_FOR_LOW_PERFORMANCE" + INSTALLER_OPTS="TRUNK_VERSION=$TRUNK_VERSION SKIP_SOURCES_LIST=$SKIP_SOURCES_LIST ADJUST_FOR_LOW_PERFORMANCE=$ADJUST_FOR_LOW_PERFORMANCE " + INSTALLER_OPTS+="ENABLE_VM_SERVICES=$ENABLE_VM_SERVICES " if $PRO_EDITION && ! $LINUX_HA3 ; then # HA v2 echo "$INSTALLER_OPTS ngcp-installer $ROLE $CROLE $IP1 $IP2 $EADDR $EIFACE" > /tmp/ngcp-installer-cmdline.log cat << EOT | grml-chroot $TARGET /bin/bash @@ -2223,6 +2224,11 @@ vagrant_configuration() { } enable_vm_services() { + if expr $SP_VERSION \>= mr3.6 >/dev/null 2>&1 ; then + echo "enable_vm_services has been moved to ngcp-installer for mr3.6+, nothing to do here" + return + fi + chroot "$TARGET" etckeeper commit "Snapshot before enabling VM defaults [$(date)]" || true chroot "$TARGET" bash -c "cd /etc/ngcp-config ; git commit -a -m \"Snapshot before enabling VM defaults [$(date)]\" || true" @@ -2272,16 +2278,6 @@ open(my $fh, ">", "$outputfile") or die "Could not open $outputfile for writing" print $fh $yaml->write_string() or die "Could not write YAML to $outputfile"; EOF - # MT#9567 Enable web_ext and web_int on all Vagrant interfaces - cat << EOF | grml-chroot $TARGET /bin/bash - if "$PRO_EDITION" ; then - ngcp-network --host=sp1 --set-interface=eth0 --type=web_ext --type=web_int - ngcp-network --host=sp2 --set-interface=eth0 --type=web_ext --type=web_int - else - ngcp-network --host=self --set-interface=eth0 --type=web_ext --type=web_int - fi -EOF - # record configuration file changes chroot "$TARGET" etckeeper commit "Snapshot after enabling VM defaults [$(date)]" || true chroot "$TARGET" bash -c "cd /etc/ngcp-config ; git commit -a -m \"Snapshot after enabling VM defaults [$(date)]\" || true"