summaryrefslogtreecommitdiffstats
path: root/ocata/vagrant
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-09-27 03:44:45 -0700
committerGuo Ruijing <ruijing.guo@intel.com>2017-09-27 04:42:44 -0700
commitc43cfa0e8650ec1a868f1e2135e9ca3c5bf5cbfa (patch)
treec53dee434ecd49a574bd7637eebc6a11c047ae84 /ocata/vagrant
parent9d02be9a1a42f0035186e2de69e4fd8ecc7845af (diff)
build docker from local maven for function test
Change-Id: I4bbb437e3563833edef7ce020b158e8332d545e3 Issue-Id: MULTICLOUD-95 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'ocata/vagrant')
-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