4 sshpass -p root ssh root@10.1.0.50 \
5 "mkdir -p /etc/yardstick; rm -rf /etc/yardstick/admin.conf"
8 sshpass -p root ssh root@10.1.0.50 \
9 kubectl config set-cluster yardstick --server=127.0.0.1:8080 --insecure-skip-tls-verify=true --kubeconfig=/etc/yardstick/admin.conf
10 sshpass -p root ssh root@10.1.0.50 \
11 kubectl config set-context yardstick --cluster=yardstick --kubeconfig=/etc/yardstick/admin.conf
12 sshpass -p root ssh root@10.1.0.50 \
13 kubectl config use-context yardstick --kubeconfig=/etc/yardstick/admin.conf
17 if [ ! -n "$redirect" ]; then
18 redirect="/dev/stdout"
21 if [ ! -n "$DOCKER_TAG" ]; then
25 if [ ! -n "$NODE_NAME" ]; then
26 NODE_NAME='arm-virutal03'
29 if [ ! -n "$DEPLOY_SCENARIO" ]; then
30 DEPLOY_SCENARIO='k8-nosdn-lb-noha_daily'
33 if [ ! -n "$YARDSTICK_DB_BACKEND" ]; then
34 YARDSTICK_DB_BACKEND='-i 104.197.68.199:8086'
37 # Pull the image with correct tag
38 DOCKER_REPO='opnfv/yardstick'
39 if [ "$(uname -m)" = 'aarch64' ]; then
40 DOCKER_REPO="${DOCKER_REPO}_$(uname -m)"
42 echo "Yardstick: Pulling image ${DOCKER_REPO}:${DOCKER_TAG}"
43 sshpass -p root ssh root@10.1.0.50 \
44 docker pull ${DOCKER_REPO}:$DOCKER_TAG >$redirect
46 if [ ! -n "$BRANCH" ]; then
50 opts="--name=yardstick --privileged=true --net=host -d -it "
51 envs="-e YARDSTICK_BRANCH=${BRANCH} -e BRANCH=${BRANCH} \
52 -e NODE_NAME=${NODE_NAME} \
53 -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
54 rc_file_vol="-v /etc/yardstick/admin.conf:/etc/yardstick/admin.conf"
58 YARDSTICK_SCENARIO_SUITE_NAME="opnfv_k8-nosdn-lb-noha_daily.yaml"
63 dir_result="${HOME}/opnfv/yardstick/results/${branch}"
64 mkdir -p ${dir_result}
65 sudo rm -rf ${dir_result}/*
66 map_log_dir="-v ${dir_result}:/tmp/yardstick"
69 cmd="docker rm -f yardstick || true"
70 sshpass -p root ssh root@10.1.0.50 \
73 cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} /bin/bash"
74 echo "Yardstick: Running docker cmd: ${cmd}"
75 sshpass -p root ssh root@10.1.0.50 \
79 cmd='sudo docker exec yardstick sed -i.bak "/# execute tests/i\sed -i.bak \"s/openretriever\\\/yardstick/openretriever\\\/yardstick_aarch64/g\" \
80 $\{YARDSTICK_REPO_DIR\}/tests/opnfv/test_cases/opnfv_yardstick_tc080.yaml" /usr/local/bin/exec_tests.sh'
81 sshpass -p root ssh root@10.1.0.50 \
84 echo "Yardstick: run tests: ${YARDSTICK_SCENARIO_SUITE_NAME}"
85 cmd="sudo docker exec yardstick exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}"
86 sshpass -p root ssh root@10.1.0.50 \
89 cmd="docker rm -f yardstick"
90 sshpass -p root ssh root@10.1.0.50 \
93 echo "Yardstick: done!"