aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst11
-rw-r--r--qtip/cli/commands/cmd_run.py3
-rw-r--r--qtip/cli/commands/cmd_setup.py3
-rw-r--r--qtip/cli/commands/cmd_workspace.py5
-rw-r--r--tests/integration/cleanup-deploy.sh21
-rw-r--r--tests/integration/validate-deploy.sh62
-rw-r--r--tests/integration/validate-setup.sh24
7 files changed, 14 insertions, 115 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 17ed58d8..f3e275e5 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -13,7 +13,10 @@ for performance, simple but supported by comprehensive testing data and transpar
.. _QTIP: https://wiki.opnfv.org/display/qtip
.. _OPNFV: https://www.opnfv.org/
-.. include:: release/release-notes/index.rst
-.. include:: testing/user/configguide/index.rst
-.. include:: testing/user/userguide/index.rst
-.. include:: testing/developer/devguide/index.rst
+.. toctree::
+ :maxdepth: 2
+
+ release/release-notes/index.rst
+ testing/user/configguide/index.rst
+ testing/user/userguide/index.rst
+ testing/developer/devguide/index.rst
diff --git a/qtip/cli/commands/cmd_run.py b/qtip/cli/commands/cmd_run.py
index d1b96d4f..56d416ab 100644
--- a/qtip/cli/commands/cmd_run.py
+++ b/qtip/cli/commands/cmd_run.py
@@ -9,8 +9,9 @@
import click
+import os
@click.command('run', help='Run performance tests')
def cli():
- pass
+ os.system('ansible-playbook {}/run.yml'.format(os.getcwd()))
diff --git a/qtip/cli/commands/cmd_setup.py b/qtip/cli/commands/cmd_setup.py
index 586a4a72..ac434561 100644
--- a/qtip/cli/commands/cmd_setup.py
+++ b/qtip/cli/commands/cmd_setup.py
@@ -9,8 +9,9 @@
import click
+import os
@click.command('setup', help='Setup QTIP workspace')
def cli():
- pass
+ os.system('ansible-playbook {}/setup.yml'.format(os.getcwd()))
diff --git a/qtip/cli/commands/cmd_workspace.py b/qtip/cli/commands/cmd_workspace.py
index 42d4e2d5..a5b6828f 100644
--- a/qtip/cli/commands/cmd_workspace.py
+++ b/qtip/cli/commands/cmd_workspace.py
@@ -22,8 +22,8 @@ def cli():
@cli.command("create", help="Create QTIP workspace")
@click.option('--pod', default='unknown', help='Name of pod under test')
-@click.option('--installer', help='OPNFV installer')
-@click.option('--master-host', help='Installer hostname')
+@click.option('--installer', help='OPNFV installer', required=True)
+@click.option('--master-host', help='Installer hostname', required=True)
@click.option('--scenario', default='unknown', help='OPNFV scenario')
@click.argument('name')
def create(pod, installer, master_host, scenario, name):
@@ -37,6 +37,7 @@ def create(pod, installer, master_host, scenario, name):
'workspace': name
}
os.system("ANSIBLE_ROLES_PATH={qtip_package}/{roles_path} ansible-playbook"
+ " -i {qtip_package}/{roles_path}/qtip-workspace/hosts"
" {qtip_package}/{roles_path}/qtip-workspace/create.yml"
" --extra-vars '{extra_vars}'"
"".format(qtip_package=utils.QTIP_PACKAGE,
diff --git a/tests/integration/cleanup-deploy.sh b/tests/integration/cleanup-deploy.sh
deleted file mode 100644
index 9cb19a58..00000000
--- a/tests/integration/cleanup-deploy.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 ZTE and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-# Remove previous running containers if exist
-if [[ ! -z $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG") ]]; then
- echo "Removing existing opnfv/qtip containers..."
- # workaround: sometimes it throws an error when stopping qtip container.
- # To make sure ci job unblocked, remove qtip container by force without stopping it.
- docker rm -f $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG" | awk '{print $1}')
-fi
-
-# Remove existing images if exist
-if [[ $(docker images opnfv/qtip:${DOCKER_TAG} | wc -l) -gt 1 ]]; then
- echo "Removing docker image opnfv/qtip:$DOCKER_TAG..."
- docker rmi opnfv/qtip:$DOCKER_TAG
-fi
diff --git a/tests/integration/validate-deploy.sh b/tests/integration/validate-deploy.sh
deleted file mode 100644
index 9f3dbe41..00000000
--- a/tests/integration/validate-deploy.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 ZTE and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -e
-
-envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}
--e NODE_NAME=${NODE_NAME} -e CI_DEBUG=${CI_DEBUG}"
-ramfs=/tmp/qtip/ramfs
-cfg_dir=$(dirname $ramfs)
-dir_imgstore="${HOME}/imgstore"
-ramfs_volume="$ramfs:/mnt/ramfs"
-
-echo "--------------------------------------------------------"
-echo "POD: $NODE_NAME"
-echo "INSTALLER: $INSTALLER_TYPE"
-echo "Scenario: $DEPLOY_SCENARIO"
-echo "--------------------------------------------------------"
-
-echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}"
-docker pull opnfv/qtip:$DOCKER_TAG
-
-# use ramfs to fix docker socket connection issue with overlay mode in centos
-if [ ! -d $ramfs ]; then
- mkdir -p $ramfs
-fi
-
-if [ ! -z "$(df $ramfs | tail -n -1 | grep $ramfs)" ]; then
- sudo mount -t tmpfs -o size=32M tmpfs $ramfs
-fi
-
-# enable contro path in docker
-cat <<EOF > ${cfg_dir}/ansible.cfg
-[defaults]
-callback_whitelist = profile_tasks
-[ssh_connection]
-control_path=/mnt/ramfs/ansible-ssh-%%h-%%p-%%r
-EOF
-
-cmd=" docker run -id -e $envs -v ${ramfs_volume} opnfv/qtip:${DOCKER_TAG} /bin/bash"
-echo "Qtip: Running docker command: ${cmd}"
-${cmd}
-
-container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1)
-if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
- echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..."
- exit 1
-else
- echo "The container ID is: ${container_id}"
- QTIP_REPO=/home/opnfv/repos/qtip
- docker cp ${cfg_dir}/ansible.cfg ${container_id}:/home/opnfv/.ansible.cfg
-# TODO(zhihui_wu): use qtip cli to execute benchmark test in the future
- docker exec -t ${container_id} bash -c "cd ${QTIP_REPO}/qtip/runner/ &&
- python runner.py -d /home/opnfv/qtip/results/ -b all"
-
-fi
-
-echo "Qtip done!"
diff --git a/tests/integration/validate-setup.sh b/tests/integration/validate-setup.sh
deleted file mode 100644
index 8d84e120..00000000
--- a/tests/integration/validate-setup.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-##############################################################################
-# Copyright (c) 2017 ZTE and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-set -e
-
-# setup virtualenv
-sudo pip install -u virtualenv virtualenvwrapper
-export WORKON_HOME=$HOME/.virtualenvs
-source /usr/local/bin/virtualenvwrapper.sh
-mkvirtualenv qtip
-workon qtip
-
-# setup qtip
-sudo pip install $HOME/repos/qtip
-
-# testing
-qtip --version
-qtip --help