diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2015-12-08 13:34:52 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2015-12-08 15:50:59 +0100 |
commit | 4fd6d19fd487b46a4e65e223469ba141d528ebd4 (patch) | |
tree | a3c401fa8d32d4c607ca60d51e9fe0a30e3a8f1b /jjb/functest | |
parent | 4f89c491753a12700717c4081b0e1534d25e3cd4 (diff) |
Pass ssh key to docker to be able to access the Instack VM without password
JIRA: FUNCTEST-69
We need to fetch de openstack credentials from the Installer VM (Instack).
Apex leaves a SSH public key in the jumphost. The idea is to pass it to
the docker container so that we can access that VM from it without password.
This is only needed by Apex installation. Ideally, all should have the same,
so that we don't hardcode passwords.
Change-Id: I5e9f6c8f298140f77780362e640d43e624897a9c
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r-- | jjb/functest/functest.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index 4223e67ca..e76fe526b 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -375,6 +375,10 @@ name: GIT_BASE default: ssh://gerrit.opnfv.org:29418/$PROJECT description: "Override GIT_BASE" + - string: + name: SSH_KEY + default: "/root/.ssh/id_rsa" + description: "SSH public key to access the installer VM" - parameter: name: opnfv-jump-2 @@ -430,8 +434,12 @@ if [ -n "${LAB_CONFIG}" ]; then labconfig="-v ${LAB_CONFIG}:/home/opnfv/functest/conf/openstack.creds" fi + if [ -n "${SSH_KEY}" ]; then + sshkey="-v ${SSH_KEY}:/root/.ssh/id_rsa" + fi + docker pull opnfv/functest:latest_stable - cmd="docker run -id -e $envs ${labconfig} opnfv/functest:latest_stable /bin/bash" + cmd="docker run -id -e $envs ${labconfig} ${sshkey} opnfv/functest:latest_stable /bin/bash" echo "Functest: Running docker run command: ${cmd}" ${cmd} docker ps -a |