diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2019-03-22 20:40:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-22 20:40:02 +0000 |
commit | 58a7eef98db0af5fc358a0eb07eee07a47ca2827 (patch) | |
tree | 7e0f4fc99479b7bb125cdc9b29063e83fd4fcdda /test/mocks/datafilecollector-testharness/dr-sim | |
parent | 22ff7f4672c327d47ee16152034c092911075947 (diff) | |
parent | f8b34f0d559711d14b95baabcb07e55d5dd9190e (diff) |
Merge "Updated simulators for DFC"
Diffstat (limited to 'test/mocks/datafilecollector-testharness/dr-sim')
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 |