summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-09-27 06:34:26 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-27 06:34:26 +0000
commitfb3707152f43c9c9ef17182baea9a8f3e63e54c2 (patch)
treed47c2369e00303e6034c7bb065a37e55817ad0bc
parent244e346e9deefaa856a2a89fd1334a50d4f85b89 (diff)
parentc43cfa0e8650ec1a868f1e2135e9ca3c5bf5cbfa (diff)
Merge "build docker from local maven for function test"
-rw-r--r--ocata/vagrant/test/Dockerfile24
-rw-r--r--ocata/vagrant/test/test_multicloud.sh15
2 files changed, 33 insertions, 6 deletions
diff --git a/ocata/vagrant/test/Dockerfile b/ocata/vagrant/test/Dockerfile
index 33d1a18a..2d9eda54 100644
--- a/ocata/vagrant/test/Dockerfile
+++ b/ocata/vagrant/test/Dockerfile
@@ -1,5 +1,25 @@
-FROM multicloud-ocata:latest
+FROM python:2
+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 9006
+
+COPY multicloud-openstack-ocata.zip /opt
RUN apt-get update && \
- apt-get install -y vim
+ apt-get install -y vim memcached unzip && \
+ cd /opt/ && \
+ unzip -q -o -B multicloud-openstack-ocata.zip && \
+ chmod +x /opt/ocata/*.sh && \
+ rm -f multicloud-openstack-ocata.zip && \
+ pip install -r /opt/ocata/requirements.txt
+
ADD extsys.py /opt/ocata/lib/newton/newton/pub/msapi/extsys.py
+
+WORKDIR /opt/ocata
+CMD /bin/sh -c /opt/ocata/run.sh
diff --git a/ocata/vagrant/test/test_multicloud.sh b/ocata/vagrant/test/test_multicloud.sh
index 9206f310..4cb17dd6 100644
--- a/ocata/vagrant/test/test_multicloud.sh
+++ b/ocata/vagrant/test/test_multicloud.sh
@@ -2,11 +2,18 @@
set -ex
sudo apt-get update -y
-sudo apt-get install -y docker.io
+sudo apt-get install -y docker.io maven npm
-cd /openstack/ocata/docker
-sudo docker build -t multicloud-ocata:latest .
-cd /vagrant/test
+git clone http://gerrit.onap.org/r/oparent
+mkdir $HOME/.m2
+cp oparent/settings.xml $HOME/.m2
+
+git clone /openstack
+cd openstack
+mvn clean install
+cp ocata/target/multicloud-openstack-ocata*.zip ocata/vagrant/test/multicloud-openstack-ocata.zip
+
+cd ocata/vagrant/test
sudo docker build -t multicloud-ocata-test:latest .
sudo docker network create --subnet=172.16.77.0/24 onap
sudo docker run -d -t --name ocata-test --network onap --ip 172.16.77.40 -e MSB_ADDR=172.16.77.40 -e MSB_PORT=9006 multicloud-ocata-test