summaryrefslogtreecommitdiffstats
path: root/legacy/docker
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/docker')
-rw-r--r--legacy/docker/README.md11
-rw-r--r--legacy/docker/cleanup_qtip_image.sh24
-rw-r--r--legacy/docker/prepare_qtip_image.sh49
-rwxr-xr-xlegacy/docker/push_db.sh3
-rwxr-xr-xlegacy/docker/run_qtip.sh39
5 files changed, 126 insertions, 0 deletions
diff --git a/legacy/docker/README.md b/legacy/docker/README.md
new file mode 100644
index 00000000..35ac0935
--- /dev/null
+++ b/legacy/docker/README.md
@@ -0,0 +1,11 @@
+# QTIP The Indices for Performance
+
+[QTIP] is an [OPNFV] project.
+
+It aims to build a platform for creating and sharing indices of [NFVI] performance.
+
+See the [project vision](https://wiki.opnfv.org/display/qtip/Vision) for more details.
+
+[QTIP]: https://wiki.opnfv.org/display/qtip
+[OPNFV]: https://www.opnfv.org
+[NFVI]: https://en.wikipedia.org/wiki/Network_function_virtualization
diff --git a/legacy/docker/cleanup_qtip_image.sh b/legacy/docker/cleanup_qtip_image.sh
new file mode 100644
index 00000000..9c2b59db
--- /dev/null
+++ b/legacy/docker/cleanup_qtip_image.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [[ ! -f ${QTIP_DIR}/openrc ]];then
+ source ${REPOS_DIR}/releng/utils/fetch_os_creds.sh \
+ -d ${QTIP_DIR}/openrc \
+ -i ${INSTALLER_TYPE} \
+ -a ${INSTALLER_IP}
+fi
+
+source ${QTIP_DIR}/openrc
+
+cleanup_image()
+{
+ echo
+ if ! glance image-list; then
+ return
+ fi
+
+ echo "Deleting image QTIP_CentOS..."
+ glance image-delete $(glance image-list | grep -e QTIP_CentOS | awk '{print $2}')
+
+}
+
+cleanup_image
diff --git a/legacy/docker/prepare_qtip_image.sh b/legacy/docker/prepare_qtip_image.sh
new file mode 100644
index 00000000..4095c806
--- /dev/null
+++ b/legacy/docker/prepare_qtip_image.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+IMGNAME='QTIP_CentOS.qcow2'
+IMGPATH='/home/opnfv/imgstore'
+IMGURL='http://build.opnfv.org/artifacts.opnfv.org/qtip/QTIP_CentOS.qcow2'
+
+load_image()
+{
+ if [[ -n $( glance image-list | grep -e QTIP_CentOS) ]]; then
+ return
+ fi
+
+ test -d $IMGPATH || mkdir -p $IMGPATH
+ if [[ ! -f "$IMGPATH/$IMGNAME" ]];then
+ echo
+ echo "========== Downloading QTIP_CentOS image =========="
+ cd $IMGPATH
+ wget -c --progress=dot:giga $IMGURL
+ fi
+
+ echo
+ echo "========== Loading QTIP_CentOS image =========="
+ output=$(glance image-create \
+ --name QTIP_CentOS \
+ --visibility public \
+ --disk-format qcow2 \
+ --container-format bare \
+ --file $IMGPATH/$IMGNAME )
+ echo "$output"
+
+ IMAGE_ID=$(echo "$output" | grep " id " | awk '{print $(NF-1)}')
+
+ if [ -z "$IMAGE_ID" ]; then
+ echo 'Failed uploading QTIP_CentOS image to cloud'.
+ exit 1
+ fi
+
+ echo "QTIP_CentOS image id: $IMAGE_ID"
+}
+
+rm -rf ${QTIP_DIR}/openrc
+
+${REPOS_DIR}/releng/utils/fetch_os_creds.sh \
+-d ${QTIP_DIR}/openrc \
+-i ${INSTALLER_TYPE} \
+-a ${INSTALLER_IP}
+
+source ${QTIP_DIR}/openrc
+
+load_image
diff --git a/legacy/docker/push_db.sh b/legacy/docker/push_db.sh
new file mode 100755
index 00000000..50341eac
--- /dev/null
+++ b/legacy/docker/push_db.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cd ${QTIP_DIR} && python qtip/utils/dashboard/pushtoDB.py
diff --git a/legacy/docker/run_qtip.sh b/legacy/docker/run_qtip.sh
new file mode 100755
index 00000000..98abf139
--- /dev/null
+++ b/legacy/docker/run_qtip.sh
@@ -0,0 +1,39 @@
+#! /bin/bash
+
+QTIP=qtip/run.py
+
+run_test_suite()
+{
+ if [ "$TEST_CASE" == "compute" ]; then
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f compute
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
+ elif [ "$TEST_CASE" == "storage" ]; then
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f storage
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
+ elif [ "$TEST_CASE" == "network" ]; then
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f network
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py network
+ elif [ "$TEST_CASE" == "all" ]; then
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f compute
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f storage
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f network
+
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
+ cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py network
+ fi
+}
+
+rm -f ${QTIP_DIR}/config/QtipKey*
+
+echo "Generating ssh keypair"
+ssh-keygen -t rsa -N "" -f ${QTIP_DIR}/config/QtipKey -q
+
+source ${QTIP_DIR}/docker/prepare_qtip_image.sh
+
+run_test_suite
+
+source ${QTIP_DIR}/docker/cleanup_qtip_image.sh
+
+echo "Remove ssh keypair"
+rm -f ${QTIP_DIR}/config/QtipKey*