82744a4ee098ad2a44e998566d7cc2c43f7f7f88
[releng.git] / jjb / yardstick / yardstick-get-k8s-conf.sh
1 #!/bin/bash
2 set -e
3
4 dest_path="$HOME/admin.conf"
5
6 if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then
7     if [[ ${INSTALLER_TYPE} == 'joid' ]];then
8         juju scp kubernetes-master/0:config "${dest_path}"
9     elif [[ ${INSTALLER_TYPE} == 'compass' ]];then
10         echo "Copy admin.conf to ${dest_path}"
11         docker cp compass-tasks:/opt/admin.conf "${dest_path}"
12     elif [[ ${INSTALLER_TYPE} == 'fuel' ]];then
13         echo "Getting kubernetes config ..."
14         docker cp -L fuel:/opt/kubernetes.config "${dest_path}"
15     fi
16 fi