aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/simulator-group
diff options
context:
space:
mode:
authorecaiyanlinux <martin.c.yan@est.tech>2019-08-21 12:10:33 +0000
committerDaniel Rose <dr695h@att.com>2019-08-29 17:35:36 +0000
commit796e8fe4255036b5785a2071ddd6a0240464556a (patch)
treeb5d9ee29c9c07d91ea4848dafb12c5ae9cd7336d /test/mocks/datafilecollector-testharness/simulator-group
parent190a2f42b5c0af56b8c8da7e05a90ad3999598d3 (diff)
Add tls-init-container to simulator
1.replace dr-sim/dr-redir-sim cert/key 2.update mr-sim, make it support https 3.update ftpes cert/key Change-Id: I7bbde98f352d1e7d7c8775acf3d8af89a6ef7bdc Issue-ID: DCAEGEN2-1702 Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
Diffstat (limited to 'test/mocks/datafilecollector-testharness/simulator-group')
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json4
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json12
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json32
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml46
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh15
13 files changed, 130 insertions, 43 deletions
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
index 29acb16ce..ff3783d40 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
@@ -1,8 +1,8 @@
{
"dmaap.ftpesConfig.keyCert":"config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword":"secret",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
"dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword":"secret",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath":"change it",
"dmaap.security.trustStorePasswordPath":"trustStorePasswordPath",
"dmaap.security.keyStorePath":"keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
index a37c3be4d..d26dd8d76 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
index 31d3a4b67..96521498d 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
index b7b63cc27..6508749be 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
index 8b87a5c3a..2ccfb1829 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
@@ -1,12 +1,12 @@
{
"dmaap.ftpesConfig.keyCert":"config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword":"secret",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
"dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword":"secret",
- "dmaap.security.trustStorePath":"change it",
- "dmaap.security.trustStorePasswordPath":"trustStorePasswordPath",
- "dmaap.security.keyStorePath":"keyStorePath",
- "dmaap.security.keyStorePasswordPath":"change it",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
+ "dmaap.security.trustStorePath":"config/ftp.jks",
+ "dmaap.security.trustStorePasswordPath":"config/ftp.pass",
+ "dmaap.security.keyStorePath":"config/dfc.jks",
+ "dmaap.security.keyStorePasswordPath":"config/dfc.pass",
"dmaap.security.enableDmaapCertAuth":"false",
"streams_publishes":{
"PM_MEAS_FILES":{
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
new file mode 100644
index 000000000..b11339a82
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
@@ -0,0 +1,32 @@
+{
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
+ "dmaap.security.trustStorePath":"config/ftp.jks",
+ "dmaap.security.trustStorePasswordPath":"config/ftp.pass",
+ "dmaap.security.keyStorePath":"config/dfc.jks",
+ "dmaap.security.keyStorePasswordPath":"config/dfc.pass",
+ "dmaap.security.enableDmaapCertAuth":"true",
+ "streams_publishes":{
+ "PM_MEAS_FILES":{
+ "type":"data_router",
+ "dmaap_info":{
+ "username": "user",
+ "log_url": "https://drsim:3907/feedlog/2",
+ "publish_url": "https://drsim:3907/publish/2",
+ "location": "loc00",
+ "password": "password",
+ "publisher_id": "972.360gm"
+ }
+ }
+ },
+ "streams_subscribes":{
+ "dmaap_subscriber":{
+ "dmaap_info":{
+ "topic_url":"https://dradmin:dradmin@mrsim:2223/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ },
+ "type":"message_router"
+ }
+ }
+}
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
index 617126863..b7063feee 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
index ade30aa89..6e8925f3f 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
index b98a46f73..2212765ab 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
index 7ee78f5cd..178552c46 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
index 7c68d7ac6..42fddd0b9 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "config/dfc.jks",
- "dmaap.ftpesConfig.keyPassword": "secret",
- "dmaap.ftpesConfig.trustedCa": "config/ftp.jks",
- "dmaap.ftpesConfig.trustedCaPassword": "secret",
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"hD:!w:CxF]lGvM6Mz9l^j[7U",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"ee%v.7Y3nf*We2T2Z$}}c%S?",
"dmaap.security.trustStorePath": "change it",
"dmaap.security.trustStorePasswordPath": "trustStorePasswordPath",
"dmaap.security.keyStorePath": "keyStorePath",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
index f078d36e3..78fa7cb1b 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
+++ b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
@@ -29,6 +29,14 @@ services:
depends_on:
- consul-server
+ tls-init-container:
+ container_name: dfc_tls-init-container
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container
+ networks:
+ - dfcnet
+ volumes:
+ - ./tls:/opt/tls/shared:rw
+
drsim:
networks:
- dfcnet
@@ -41,11 +49,15 @@ services:
- "3907:3907"
container_name: dfc_dr-sim
command: node dmaapDR.js ${DR_TC}
+ volumes:
+ - ./tls:/app/cert/:rw
+ depends_on:
+ - tls-init-container
drsim_redir:
networks:
- dfcnet
- environment:
+ environment:
DR_SIM_IP: drsim
DR_REDIR_FEEDS: ${DR_REDIR_FEEDS}
image: drsim_common:latest
@@ -54,6 +66,10 @@ services:
- "3909:3909"
container_name: dfc_dr-redir-sim
command: node dmaapDR_redir.js ${DR_REDIR_TC}
+ volumes:
+ - ./tls:/app/cert/:rw
+ depends_on:
+ - tls-init-container
mrsim:
networks:
@@ -66,9 +82,14 @@ services:
MR_FILE_PREFIX_MAPPING: ${MR_FILE_PREFIX_MAPPING}
image: mrsim:latest
ports:
- - "2222:2222"
+ - "2222:2222"
+ - "2223:2223"
container_name: dfc_mr-sim
command: python mr-sim.py ${MR_TC}
+ volumes:
+ - ./tls:/app/cert/:rw
+ depends_on:
+ - tls-init-container
sftp-server0:
networks:
@@ -132,6 +153,10 @@ services:
FTP_PASSWORD: pano
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
+ volumes:
+ - ./tls:/etc/ssl/private/:rw
+ depends_on:
+ - tls-init-container
ftpes-server-vsftpd1:
networks:
@@ -145,6 +170,10 @@ services:
FTP_PASSWORD: pano
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
+ volumes:
+ - ./tls:/etc/ssl/private/:rw
+ depends_on:
+ - tls-init-container
ftpes-server-vsftpd2:
networks:
@@ -158,6 +187,10 @@ services:
FTP_PASSWORD: pano
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
+ volumes:
+ - ./tls:/etc/ssl/private/:rw
+ depends_on:
+ - tls-init-container
ftpes-server-vsftpd3:
networks:
@@ -171,6 +204,10 @@ services:
FTP_PASSWORD: pano
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
+ volumes:
+ - ./tls:/etc/ssl/private/:rw
+ depends_on:
+ - tls-init-container
ftpes-server-vsftpd4:
networks:
@@ -184,4 +221,7 @@ services:
FTP_PASSWORD: pano
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
-
+ volumes:
+ - ./tls:/etc/ssl/private/:rw
+ depends_on:
+ - tls-init-container
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
index 9370f99a6..5463da8bd 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
@@ -12,6 +12,18 @@ server_check() {
echo "Simulator " $1 " on localhost:$2$3 - no response"
}
+server_check_https() {
+ for i in {1..10}; do
+ res=$(curl -k -s -o /dev/null -w "%{http_code}" https://localhost:$2$3)
+ if [ $res -gt 199 ] && [ $res -lt 300 ]; then
+ echo "Simulator " $1 " on https://localhost:$2$3 responded ok"
+ return
+ fi
+ sleep 1
+ done
+ echo "Simulator " $1 " on https://localhost:$2$3 - no response"
+}
+
ftps_server_check() {
for i in {1..10}; do
res=$(curl --silent --max-time 3 localhost:$2 2>&1 | grep vsFTPd)
@@ -97,6 +109,9 @@ server_check "consul " 8500 "/v1/catalog/service/agent"
server_check "DR sim " 3906 "/"
server_check "DR redir sim " 3908 "/"
server_check "MR sim " 2222 "/"
+server_check_https "DR sim https " 3907 "/"
+server_check_https "DR redir sim https" 3909 "/"
+server_check_https "MR sim https " 2223 "/"
ftps_server_check "FTPS server 0" 1032
ftps_server_check "FTPS server 1" 1033
ftps_server_check "FTPS server 2" 1034