summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-08 17:34:50 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-08 17:34:50 +0000
commit91312836e649c24d2d0268f1f5c8aa45fdd79a8d (patch)
tree91d7c9bebd44a0eae247732c0c0a4a3d322ef74d
parente53acf41e4659140e3f78794765bb87f1dc59136 (diff)
parent6f7582ec80f0158baa3b94b637a5738a7b180b2f (diff)
Merge "Move mcp.rsa to /var/lib/opnfv"
-rwxr-xr-xci/deploy.sh7
-rw-r--r--mcp/scripts/lib.sh2
2 files changed, 3 insertions, 6 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index f73fdfc3e..4b64000e1 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -139,9 +139,7 @@ DEPLOY_TYPE='baremetal'
OPNFV_BRIDGES=('pxebr' 'mgmt' 'internal' 'public')
URI_REGEXP='(file|https?|ftp)://.*'
-# NOTE: When this script runs with sudo, key will land in /root/opnfv/mcp.rsa,
-# unless SSH_KEY is set to point to non-root user's home (e.g. via env var).
-export SSH_KEY=${SSH_KEY:-"${HOME}/opnfv/mcp.rsa"}
+export SSH_KEY=${SSH_KEY:-"/var/lib/opnfv/mcp.rsa"}
export SALT_MASTER=${SALT_MASTER_IP:-192.168.10.100}
export MAAS_IP=${MAAS_IP:-192.168.10.3}
export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}"
@@ -262,7 +260,6 @@ if ! virsh list >/dev/null 2>&1; then
fi
# Validate mandatory arguments are set
-# FIXME(armband): Bring back support for BASE_CONFIG_URI
if [ -z "${TARGET_LAB}" ] || [ -z "${TARGET_POD}" ] || \
[ -z "${DEPLOY_SCENARIO}" ]; then
notify "[ERROR] At least one of the mandatory args is missing!\n" 1>&2
@@ -275,7 +272,7 @@ set -x
# Enable the automatic exit trap
trap do_exit SIGINT SIGTERM EXIT
-# Set no restrictive umask so that Jenkins can removeeee any residuals
+# Set no restrictive umask so that Jenkins can remove any residuals
umask 0000
clean
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index d9b5e6385..94a9bd3c3 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -17,7 +17,7 @@ generate_ssh_key() {
fi
[ -f "${mcp_ssh_key}" ] || ssh-keygen -f "${mcp_ssh_key}" -N ''
- install -D -o "${user}" -m 0600 "${mcp_ssh_key}" "${SSH_KEY}"
+ sudo install -D -o "${user}" -m 0600 "${mcp_ssh_key}" "${SSH_KEY}"
}
get_base_image() {