From: Yang (Gabriel) Yu Date: Fri, 7 Sep 2018 09:09:29 +0000 (+0800) Subject: add k8s capcity test X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=commitdiff_plain;h=22e9d2944558888d1a466425290052af47588fe9 add k8s capcity test JIRA: BOTTLENECK-242 Change-Id: I2fb92017b2b07ede448c817c89ae0d7572cfbae9 Signed-off-by: Yang (Gabriel) Yu --- diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yaml b/jjb/bottlenecks/bottlenecks-ci-jobs.yaml index 41b73a290..4c302dd52 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yaml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yaml @@ -79,6 +79,7 @@ - 'posca_feature_moon_tenants' - 'posca_feature_vnf_scale_out' - 'posca_factor_soak_throughputs' + - 'kubestone_deployment_capacity' jobs: - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}' diff --git a/jjb/bottlenecks/bottlenecks-run-suite.sh b/jjb/bottlenecks/bottlenecks-run-suite.sh index 7a3db00c4..59116cb6e 100644 --- a/jjb/bottlenecks/bottlenecks-run-suite.sh +++ b/jjb/bottlenecks/bottlenecks-run-suite.sh @@ -24,7 +24,26 @@ OPENRC=/tmp/admin_rc.sh OS_CACERT=/tmp/os_cacert BOTTLENECKS_CONFIG=/tmp - +KUBESTONE_TEST_DIR=/home/opnfv/bottlenecks/testsuites/kubestone/testcases + +# Pulling Bottlenecks docker and passing environment variables +echo "INFO: pulling Bottlenecks docker ${DOCKER_TAG}" +docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect + +opts="--privileged=true -id" +envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ + -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \ + -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \ + -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \ + -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} -e BUILD_TAG=${BUILD_TAG}" +docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp" + +cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash" +echo "BOTTLENECKS INFO: running docker run commond: ${cmd}" +${cmd} >$redirect +sleep 5 + +# Run test suite if [[ $SUITE_NAME == *posca* ]]; then POSCA_SCRIPT=/home/opnfv/bottlenecks/testsuites/posca sudo rm -f ${OPENRC} @@ -116,23 +135,6 @@ if [[ $SUITE_NAME == *posca* ]]; then sudo ls -al ${BOTTLENECKS_CONFIG} fi - # Pulling Bottlenecks docker and passing environment variables - echo "INFO: pulling Bottlenecks docker ${DOCKER_TAG}" - docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect - - opts="--privileged=true -id" - envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ - -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \ - -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \ - -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \ - -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} -e BUILD_TAG=${BUILD_TAG}" - docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp" - - cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash" - echo "BOTTLENECKS INFO: running docker run commond: ${cmd}" - ${cmd} >$redirect - sleep 5 - # Running test cases through Bottlenecks docker if [[ $SUITE_NAME == posca_stress_traffic ]]; then TEST_CASE=posca_factor_system_bandwidth @@ -144,4 +146,11 @@ if [[ $SUITE_NAME == *posca* ]]; then testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT" echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}" ${testcase_cmd} >$redirect +elif [[ $SUITE_NAME == *kubestone* ]]; then + if [[ $SUITE_NAME == kubestone_deployment_capacity ]]; then + TEST_CASE = ${KUBESTONE_TEST_DIR}/deployment_capacity.yaml + fi + testcase_cmd="docker exec bottlenecks-load-master python ${KUBESTONE_TEST_DIR}/../stress_test.py -c $TEST_CASE" + echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}" + ${testcase_cmd} >$redirect fi diff --git a/jjb/compass4nfv/compass-ci-jobs.yaml b/jjb/compass4nfv/compass-ci-jobs.yaml index 328e9e3a2..e5775b2d5 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yaml +++ b/jjb/compass4nfv/compass-ci-jobs.yaml @@ -295,6 +295,24 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: k8-nosdn-nofeature-ha + label: '{scenario}' + steps: + - trigger-builds: + - project: 'bottlenecks-compass-kubestone_deployment_capacity-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - conditional-step: condition-kind: and condition-operands: