const tc_10first_error_response = "10first_error_response";
const tc_100first_error_response = "100first_error_response";
-var drr_sim_ip = '127.0.0.1'; //IP for redirect to DR redir sim. Can be changed by env DRR_SIM_IP
+var drr_sim_ip = 'drsim_redir'; //IP for redirect to DR redir sim. Can be changed by env DRR_SIM_IP
//Counters
var ctr_publish_query = [];
- "3908:3908"
- "3909:3909"
container_name: drsim_redir
- command: node dmaapDR_redir.js
\ No newline at end of file
+ command: node dmaapDR_redir.js
\ No newline at end of file
sftp_ports=[]
ftps_hosts=[]
ftps_ports=[]
-num_ftp_servers=0
+num_ftp_servers=1
def sumList(ctrArray):
tmp=0
ftps_ports.append(hp[1])
groups = os.environ.get('MR_GROUPS', 'OpenDcae-c12:PM_MEAS_FILES')
+ print("Groups detected: " + groups )
configuredPrefixes = os.environ.get('MR_FILE_PREFIX_MAPPING', 'PM_MEAS_FILES:A')
if (len(groups) == 0 ):
"streams_subscribes":{
"dmaap_subscriber":{
"dmaap_info":{
- "topic_url":"http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ "topic_url":"http://dradmin:dradmin@dfc_mr-sim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
},
"type":"message_router"
}
--- /dev/null
+{
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"secret",
+ "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.security.enableDmaapCertAuth":"false",
+ "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":"http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ },
+ "type":"message_router"
+ }
+ }
+}
#!/bin/bash
+bash -x
# Script to configure consul with json configuration files with 'localhost' urls. This
# is needed when running the simulator as as a stand-alone app or via a dfc container in 'host' network mode.
exit 1
fi
-if [ $1 == "app" ]; then
- appname=$DFC_APP_BASE$2
- echo "Replacing 'mrsim' with 'localhost' in json app config for consul"
- sed 's/mrsim/localhost/g' $3 > .tmp_file.json
-elif [ $1 == "dmaap" ]; then
- appname=$DFC_APP_BASE$2":dmaap"
- echo "Replacing 'drsim' with 'localhost' in json dmaap config for consul"
- sed 's/drsim/localhost/g' $3 > .tmp_file.json
-else
- __print_err "config type should be 'app' or 'dmaap'"
- exit 1
-fi
-
echo "Configuring consul for " $appname " from " $3
-curl -s http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$tmp_file.json >/dev/null
+curl -s http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$3
+
+echo "Reading back from consul:"
+curl "http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1&raw=0"
echo "done"
\ No newline at end of file
#!/bin/bash
-
+set -x
server_check() {
for i in {1..10}; do
res=$(curl -s -o /dev/null -w "%{http_code}" localhost:$2$3)