summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-07-26 19:22:55 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-26 19:22:55 +0000
commitfdece1a118282d19cce0eb9e586cc0c07b0bd01a (patch)
tree03b3334af01ecfffbc2ca0e09159d845c719d159 /lib
parentfda3923dd7649fafed5ce050adb9d78a0e00bac4 (diff)
parentffab5943f9f4c0ddf87004352791f2e852b9bdc4 (diff)
Merge "Add nova ssh key for vm resize"
Diffstat (limited to 'lib')
-rwxr-xr-xlib/overcloud-deploy-functions.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index e3fdc65f..1fcaa0df 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -203,6 +203,14 @@ if [ "${deploy_options_array['tacker']}" == 'False' ]; then
sed -i '/EnableTacker:/c\ EnableTacker: false' opnfv-environment.yaml
fi
+# Create a key for use by nova for live migration
+echo "Creating nova SSH key for nova resize support"
+ssh-keygen -f nova_id_rsa -b 1024 -P ""
+public_key=\'\$(cat nova_id_rsa.pub | cut -d ' ' -f 2)\'
+sed -i "s#replace_public_key:#key: \$public_key#g" opnfv-environment.yaml
+python -c 'open("opnfv-environment-new.yaml", "w").write((open("opnfv-environment.yaml").read().replace("replace_private_key:", "key: \"" + "".join(open("nova_id_rsa").readlines()).replace("\\n","\\\n") + "\"")))'
+mv -f opnfv-environment-new.yaml opnfv-environment.yaml
+
source stackrc
set -o errexit
# Workaround for APEX-207 where sometimes swift proxy is down