summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multivimbroker/docker/Dockerfile7
-rw-r--r--multivimbroker/docker/pecan/Dockerfile31
-rw-r--r--multivimbroker/pecan-requirements.txt6
-rw-r--r--multivimbroker/requirements.txt32
-rwxr-xr-xmultivimbroker/run.sh2
-rw-r--r--multivimbroker/test-requirements.txt5
-rw-r--r--multivimbroker/tox.ini5
-rw-r--r--multivimbroker/uwsgi-requirements.txt3
8 files changed, 71 insertions, 20 deletions
diff --git a/multivimbroker/docker/Dockerfile b/multivimbroker/docker/Dockerfile
index 1525e47..cda6d49 100644
--- a/multivimbroker/docker/Dockerfile
+++ b/multivimbroker/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:2
+FROM python:2-slim
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
@@ -14,12 +14,15 @@ RUN groupadd -r onap && useradd -r -g onap onap
# COPY ./ /opt/multivimbroker/
RUN apt-get update && \
- apt-get install -y unzip && \
+ apt-get install -y wget unzip gcc && \
cd /opt/ && \
wget -O multicloud-framework.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.framework.broker&a=multicloud-framework-broker&e=zip&v=1.2.3-SNAPSHOT" && \
unzip -q -o -B multicloud-framework.zip && \
rm -f multicloud-framework.zip && \
pip install -r /opt/multivimbroker/requirements.txt && \
+ pip install -r /opt/multivimbroker/uwsgi-requirements.txt && \
+ apt-get --purge remove -y wget unzip gcc && \
+ apt-get -y autoremove && \
chown onap:onap /opt/multivimbroker -R
USER onap
diff --git a/multivimbroker/docker/pecan/Dockerfile b/multivimbroker/docker/pecan/Dockerfile
new file mode 100644
index 0000000..60695b0
--- /dev/null
+++ b/multivimbroker/docker/pecan/Dockerfile
@@ -0,0 +1,31 @@
+FROM python:2-slim
+
+ENV MSB_ADDR "127.0.0.1"
+ENV MSB_PORT "80"
+ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
+ENV AAI_PORT "8443"
+ENV AAI_SCHEMA_VERSION "v11"
+ENV AAI_USERNAME "AAI"
+ENV AAI_PASSWORD "AAI"
+
+EXPOSE 9001
+
+RUN groupadd -r onap && useradd -r -g onap onap
+
+# COPY ./ /opt/multivimbroker/
+RUN apt-get update && \
+ apt-get install -y wget unzip gcc && \
+ cd /opt/ && \
+ wget -O multicloud-framework.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.framework.broker&a=multicloud-framework-broker&e=zip&v=1.2.3-SNAPSHOT" && \
+ unzip -q -o -B multicloud-framework.zip && \
+ rm -f multicloud-framework.zip && \
+ pip install -r /opt/multivimbroker/requirements.txt && \
+ pip install -r /opt/multivimbroker/pecan-requirements.txt && \
+ apt-get --purge remove -y wget unzip gcc && \
+ apt-get -y autoremove && \
+ chown onap:onap /opt/multivimbroker -R
+
+USER onap
+
+WORKDIR /opt/multivimbroker
+CMD /bin/sh -c /opt/multivimbroker/run.sh
diff --git a/multivimbroker/pecan-requirements.txt b/multivimbroker/pecan-requirements.txt
new file mode 100644
index 0000000..4e76b5e
--- /dev/null
+++ b/multivimbroker/pecan-requirements.txt
@@ -0,0 +1,6 @@
+# for pecan framework
+pecan>=1.2.1
+oslo.concurrency>=3.21.0
+oslo.config>=4.11.0
+oslo.service>=1.25.0
+eventlet>=0.20.0
diff --git a/multivimbroker/requirements.txt b/multivimbroker/requirements.txt
index 0f4a143..e3001ac 100644
--- a/multivimbroker/requirements.txt
+++ b/multivimbroker/requirements.txt
@@ -6,36 +6,36 @@ djangorestframework==3.3.3
poster==0.8.1
# redis cache
-redis==2.10.5
+# redis==2.10.5
# for access redis cache
-redisco==0.1.4
-django-redis-cache==0.13.1
+# redisco==0.1.4
+# django-redis-cache==0.13.1
# for call rest api
httplib2==0.9.2
# for call openstack api
-python-keystoneclient==3.6.0
-python-glanceclient==2.5.0
-python-neutronclient==6.0.0
+# python-keystoneclient==3.6.0
+# python-glanceclient==2.5.0
+# python-neutronclient==6.0.0
# for unit test
-django-nose>=1.4.0
-coverage==4.2
-mock==2.0.0
-unittest_xml_reporting==1.12.0
+# django-nose>=1.4.0
+# coverage==4.2
+# mock==2.0.0
+# unittest_xml_reporting==1.12.0
# for onap logging
onappylog>=1.0.8
# for pecan framework
-pecan>=1.2.1
-oslo.concurrency>=3.21.0
-oslo.config>=4.11.0
-oslo.service>=1.25.0
-eventlet>=0.20.0
+# pecan>=1.2.1
+# oslo.concurrency>=3.21.0
+# oslo.config>=4.11.0
+# oslo.service>=1.25.0
+# eventlet>=0.20.0
# uwsgi for parallel processing
-uwsgi
+# uwsgi
diff --git a/multivimbroker/run.sh b/multivimbroker/run.sh
index 9e1542b..9eaf2b3 100755
--- a/multivimbroker/run.sh
+++ b/multivimbroker/run.sh
@@ -38,4 +38,4 @@ else
done
tail -F $logDir/multivimbroker.log
-fi \ No newline at end of file
+fi
diff --git a/multivimbroker/test-requirements.txt b/multivimbroker/test-requirements.txt
new file mode 100644
index 0000000..e39b30b
--- /dev/null
+++ b/multivimbroker/test-requirements.txt
@@ -0,0 +1,5 @@
+# for unit test
+django-nose>=1.4.0
+coverage==4.2
+mock==2.0.0
+unittest_xml_reporting==1.12.0
diff --git a/multivimbroker/tox.ini b/multivimbroker/tox.ini
index 1e54370..ef0387e 100644
--- a/multivimbroker/tox.ini
+++ b/multivimbroker/tox.ini
@@ -6,7 +6,10 @@ skipsdist = true
downloadcache = ~/cache/pip
[testenv]
-deps = -r{toxinidir}/requirements.txt
+deps =
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
commands =
/usr/bin/find . -type f -name "*.py[c|o]" -delete
python manage.py test multivimbroker
diff --git a/multivimbroker/uwsgi-requirements.txt b/multivimbroker/uwsgi-requirements.txt
new file mode 100644
index 0000000..06a4b87
--- /dev/null
+++ b/multivimbroker/uwsgi-requirements.txt
@@ -0,0 +1,3 @@
+# uwsgi for parallel processing
+uwsgi
+