aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile12
-rw-r--r--docker/README.md11
-rwxr-xr-xdocker/run_qtip.sh9
-rw-r--r--docker/supervisord.conf13
4 files changed, 43 insertions, 2 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 05286b09..8d951fc5 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -4,7 +4,7 @@
FROM ubuntu:14.04
-MAINTAINER Nauman Ahad <Nauman_Ahad@dell.com>
+MAINTAINER Yujun Zhang <zhang.yujunz@zte.com.cn>
LABEL version="0.1" description="OPNFV QTIP Docker container"
@@ -35,6 +35,7 @@ libjpeg62-dev \
zlib1g-dev \
python-tk \
curl \
+supervisor \
--no-install-recommends
RUN apt-add-repository ppa:ansible/ansible -y
@@ -60,4 +61,11 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng $REPOS_DIR/releng
RUN pip install -r $REPOS_DIR/qtip/requirements.txt
-CMD cd $REPOS_DIR/qtip && python restful_server/qtip_server.py>$HOME/qtip/logs/run.log
+#Config supervisor
+
+RUN mkdir -p /var/log/supervisor
+RUN locale-gen en_US en_US.UTF-8
+COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
+
+
+CMD ["/usr/bin/supervisord"]
diff --git a/docker/README.md b/docker/README.md
new file mode 100644
index 00000000..35ac0935
--- /dev/null
+++ b/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/docker/run_qtip.sh b/docker/run_qtip.sh
index 62f97c88..a7a20501 100755
--- a/docker/run_qtip.sh
+++ b/docker/run_qtip.sh
@@ -1,4 +1,5 @@
#! /bin/bash
+
run_test_suite()
{
if [ "$TEST_CASE" == "compute" ]; then
@@ -21,8 +22,16 @@ run_test_suite()
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*
diff --git a/docker/supervisord.conf b/docker/supervisord.conf
new file mode 100644
index 00000000..35d16c7e
--- /dev/null
+++ b/docker/supervisord.conf
@@ -0,0 +1,13 @@
+[supervisord]
+nodaemon=true
+
+[program:qtip_server]
+command=bash -c "cd $REPOS_DIR/qtip&&python restful_server/qtip_server.py"
+numprocs=1
+autostart=true
+autorestart=true
+user=root
+environment=INSTALLER_TYPE="%(ENV_INSTALLER_TYPE)s",INSTALLER_IP="%(ENV_INSTALLER_IP)s",NODE_NAME="%(ENV_NODE_NAME)s"
+stdout_logfile=/var/log/supervisor/%(program_name)s.log
+stderr_logfile=/var/log/supervisor/%(program_name)s.log
+