aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/dr-sim
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2019-03-22 20:40:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-22 20:40:02 +0000
commit58a7eef98db0af5fc358a0eb07eee07a47ca2827 (patch)
tree7e0f4fc99479b7bb125cdc9b29063e83fd4fcdda /test/mocks/datafilecollector-testharness/dr-sim
parent22ff7f4672c327d47ee16152034c092911075947 (diff)
parentf8b34f0d559711d14b95baabcb07e55d5dd9190e (diff)
Merge "Updated simulators for DFC"
Diffstat (limited to 'test/mocks/datafilecollector-testharness/dr-sim')
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/Dockerfile18
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/README.md6
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml17
3 files changed, 41 insertions, 0 deletions
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile
new file mode 100644
index 000000000..fc903d7e7
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile
@@ -0,0 +1,18 @@
+#Common image for both dmmapDR and dmaapDR_redir
+
+FROM node:8
+
+WORKDIR /app
+
+COPY dmaapDR.js ./
+COPY dmaapDR_redir.js ./
+COPY package*.json ./
+COPY cert/ cert/
+
+RUN npm install express
+RUN npm install argparse
+
+EXPOSE 3906
+EXPOSE 3907
+EXPOSE 3908
+EXPOSE 3909 \ No newline at end of file
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/README.md b/test/mocks/datafilecollector-testharness/dr-sim/README.md
index 38ad1c522..f0cdf589b 100644
--- a/test/mocks/datafilecollector-testharness/dr-sim/README.md
+++ b/test/mocks/datafilecollector-testharness/dr-sim/README.md
@@ -1,3 +1,9 @@
+#Alternative to running python (as described below) on your machine, use the docker files.
+1. Build docker container with ```docker build -t drsim_common:latest .```
+2. Run the container ```docker-compose up```
+
+
+
1. install nodejs
2. install npm
Make sure that you run these commands in the application directory "dr-sim"
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml b/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml
new file mode 100644
index 000000000..1ad478886
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml
@@ -0,0 +1,17 @@
+version: '2'
+services:
+ drsim:
+ image: drsim_common:latest
+ ports:
+ - "3906:3906"
+ - "3907:3907"
+ container_name: drsim
+ command: node dmaapDR.js
+
+ drsim_redir:
+ image: drsim_common:latest
+ ports:
+ - "3908:3908"
+ - "3909:3909"
+ container_name: drsim_redir
+ command: node dmaapDR_redir.js \ No newline at end of file