diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2018-01-31 22:00:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-31 22:00:40 +0000 |
commit | 0eaab35c0129de150d8c726cb0f205aa76f2b464 (patch) | |
tree | b6ba138c0afba4e5dbdc946657433c1e49135acc | |
parent | e91789dc2832a685c58591a9890ddbecdf52ae2d (diff) | |
parent | 7b3cc9cddc9ecda27b1d8dc82b18a97264efe57a (diff) |
Merge "Modify fuel_baremetal pod config file"
-rw-r--r-- | etc/yardstick/nodes/fuel_baremetal/pod.yaml | 20 | ||||
-rwxr-xr-x | tests/ci/prepare_env.sh | 5 |
2 files changed, 15 insertions, 10 deletions
diff --git a/etc/yardstick/nodes/fuel_baremetal/pod.yaml b/etc/yardstick/nodes/fuel_baremetal/pod.yaml index acdb44741..5ce555293 100644 --- a/etc/yardstick/nodes/fuel_baremetal/pod.yaml +++ b/etc/yardstick/nodes/fuel_baremetal/pod.yaml @@ -23,29 +23,29 @@ nodes: name: node1 role: Controller ip: ip1 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node2 role: Controller ip: ip2 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node3 role: Controller ip: ip3 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node4 role: Compute ip: ip4 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node5 role: Compute ip: ip5 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh index 44e2694f7..262b74c09 100755 --- a/tests/ci/prepare_env.sh +++ b/tests/ci/prepare_env.sh @@ -14,6 +14,8 @@ : ${INSTALLER_TYPE:='unknown'} : ${NODE_NAME:='unknown'} : ${EXTERNAL_NETWORK:='admin_floating_net'} +: ${USER_NAME:='ubuntu'} +: ${SSH_KEY:='/root/.ssh/id_rsa'} # Extract network name from EXTERNAL_NETWORK # e.g. EXTERNAL_NETWORK='ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24' @@ -97,6 +99,9 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then node_line_num=($(grep -n node[1-5] $pod_yaml | awk -F: '{print $1}')) node_ID=0; + # update 'user' and 'key_filename' according to CI env + sed -i "s|node_username|${USER_NAME}|;s|node_keyfile|${SSH_KEY}|" $pod_yaml; + if [[ ${controller_ips[0]} ]]; then sed -i "${node_line_num[0]}s/node1/node$((++node_ID))/;s/ip1/${controller_ips[0]}/" $pod_yaml; fi |