diff --git a/broadcast/client-registrar.yaml b/broadcast/client-registrar.yaml index c0dbde0bd30fc5e4b0053c43ca9bc129318e0066..fdb4f5f6ab8b91e2cd2d3a68ff97a85fd04e74cf 100644 --- a/broadcast/client-registrar.yaml +++ b/broadcast/client-registrar.yaml @@ -8,9 +8,9 @@ logLevel: 0 logPath: "results/client-registrar.log" # Public address, used in NDF it gives to client -publicAddress: "0.0.0.0:20111" +publicAddress: "0.0.0.0:20121" # The listening port of this server -port: 20111 +port: 20121 # === REQUIRED FOR ENABLING TLS === # Path to the registration server private key file diff --git a/broadcast/gateway-1.yaml b/broadcast/gateway-1.yaml index 4b4f952b853d1defc9ab9e2818fb9b6eb6c3389d..132f95c49d6d9cf783e710d1804719312f5f9f26 100644 --- a/broadcast/gateway-1.yaml +++ b/broadcast/gateway-1.yaml @@ -16,10 +16,10 @@ loglevel: 2 log: "results/gateways/gateway-1.log" # The public IP address and port of the node associated with this gateway -cmixAddress: "0.0.0.0:10110" +cmixAddress: "0.0.0.0:10120" # The listening port of this gateway -Port: 1110 +Port: 1120 # The public IPv4 address of the Gateway, as reported to the network, to use # instead of dynamically looking up Gateway's own IP address. If a port is not diff --git a/broadcast/gateway-2.yaml b/broadcast/gateway-2.yaml index 410eae6bc8e5a920a288644ba890e9583b182cac..d182c665115049bd2585dfe41fb291ea82338883 100644 --- a/broadcast/gateway-2.yaml +++ b/broadcast/gateway-2.yaml @@ -16,10 +16,10 @@ loglevel: 2 log: "results/gateways/gateway-2.log" # The public IP address and port of the node associated with this gateway -cmixAddress: "0.0.0.0:10111" +cmixAddress: "0.0.0.0:10121" # The listening port of this gateway -Port: 1111 +Port: 1121 # The public IPv4 address of the Gateway, as reported to the network, to use # instead of dynamically looking up Gateway's own IP address. If a port is not diff --git a/broadcast/gateway-3.yaml b/broadcast/gateway-3.yaml index 5e55d5d0c0ee288b4b1fdd5e5f800259852b2060..294bfc687e67f102f75db68045e81987862e82f3 100644 --- a/broadcast/gateway-3.yaml +++ b/broadcast/gateway-3.yaml @@ -16,10 +16,10 @@ loglevel: 2 log: "results/gateways/gateway-3.log" # The public IP address and port of the node associated with this gateway -cmixAddress: "0.0.0.0:10112" +cmixAddress: "0.0.0.0:10122" # The listening port of this gateway -Port: 1112 +Port: 1122 # The public IPv4 address of the Gateway, as reported to the network, to use # instead of dynamically looking up Gateway's own IP address. If a port is not diff --git a/broadcast/gateway-4.yaml b/broadcast/gateway-4.yaml index de4f19b4cd82deacc92624c5f1da969fec6f7bd7..7667873d1fc7ae80ba52dce0faa9c0fd6488102d 100644 --- a/broadcast/gateway-4.yaml +++ b/broadcast/gateway-4.yaml @@ -16,10 +16,10 @@ loglevel: 2 log: "results/gateways/gateway-4.log" # The public IP address and port of the node associated with this gateway -cmixAddress: "0.0.0.0:10113" +cmixAddress: "0.0.0.0:10123" # The listening port of this gateway -Port: 1113 +Port: 1123 # The public IPv4 address of the Gateway, as reported to the network, to use # instead of dynamically looking up Gateway's own IP address. If a port is not diff --git a/broadcast/gateway-5.yaml b/broadcast/gateway-5.yaml index 7d684e0068819bcb8bd796f7a27893b50846d39d..71ed41a2369376ab6a1cfab081e482b0ff8231a4 100644 --- a/broadcast/gateway-5.yaml +++ b/broadcast/gateway-5.yaml @@ -16,10 +16,10 @@ loglevel: 2 log: "results/gateways/gateway-5.log" # The public IP address and port of the node associated with this gateway -cmixAddress: "0.0.0.0:10114" +cmixAddress: "0.0.0.0:10124" # The listening port of this gateway -Port: 1114 +Port: 1124 # The public IPv4 address of the Gateway, as reported to the network, to use # instead of dynamically looking up Gateway's own IP address. If a port is not diff --git a/broadcast/network.config b/broadcast/network.config index 14a121f4c6c17dc5e9de458a92dde620dc59a69e..038a5820cf69f9ae7706197e5a12699f0c593601 100644 --- a/broadcast/network.config +++ b/broadcast/network.config @@ -1,4 +1,4 @@ -localhost:1110 +localhost:1120 # This is the network configuration file. The top line of this file, # when not set via command line, is used to determine to which network # the integration test will be run against. diff --git a/broadcast/permissioning.yaml b/broadcast/permissioning.yaml index 5e253376d9f1ca9458a1651071baf33920e89c19..32c7965951d270e60a176691fbbc99ac8eb086db 100644 --- a/broadcast/permissioning.yaml +++ b/broadcast/permissioning.yaml @@ -9,7 +9,7 @@ loglevel: 2 logPath: "results/permissioning.log" # The listening port of this server -port: 20110 +port: 20120 # Database connection information dbUsername: "" @@ -48,7 +48,7 @@ updateIdPath: "results/updateId.txt" # Public address used in NDF to give to client -registrationAddress: "0.0.0.0:20111" +registrationAddress: "0.0.0.0:20121" # Path to whitelisted IPs for client ratelimiting whitelistedIpAddressesPath: "whitelist.txt" @@ -70,7 +70,7 @@ signedPartialNDFOutputPath: "results/permissions-ndfoutput-partial.json" udbCertPath: "../keys/cmix.rip.crt" # "Location of the user discovery contact file. udContactPath: "results/udbContact.bin" -udbAddress: "127.0.0.1:30110" +udbAddress: "127.0.0.1:30120" # Time interval (in minutes) in which the database is # checked for banned nodes diff --git a/broadcast/regCodes.json b/broadcast/regCodes.json index 65c124789920ee1ab565188179e2b4eed95e427f..59ada42b02a4108a4deb492bb46dbe1c8b9c3bd5 100644 --- a/broadcast/regCodes.json +++ b/broadcast/regCodes.json @@ -1 +1 @@ -[{"RegCode": "qxkv", "Order": "CR"},{"RegCode": "bsms", "Order": "CR"},{"RegCode": "axcv", "Order": "CR"},{"RegCode": "vkgs", "Order": "CR"},{"RegCode": "qwuw", "Order": "CR"}] \ No newline at end of file +[{"RegCode": "enkf", "Order": "CR"},{"RegCode": "ozxl", "Order": "CR"},{"RegCode": "qgby", "Order": "CR"},{"RegCode": "llhb", "Order": "CR"},{"RegCode": "umks", "Order": "CR"}] \ No newline at end of file diff --git a/broadcast/run.sh b/broadcast/run.sh index 0a2d432ce1f3972400e807c445ad0db37036856a..a2b429cbb073e83700ab80709c46dfb071ad6eb7 100755 --- a/broadcast/run.sh +++ b/broadcast/run.sh @@ -71,7 +71,7 @@ fi echo "NETWORK: $NETWORKENTRYPOINT" -if [ "$NETWORKENTRYPOINT" == "localhost:1090" ] +if [ "$NETWORKENTRYPOINT" == "localhost:1120" ] then source network.sh @@ -80,7 +80,7 @@ else echo $NETWORKENTRYPOINT > results/startgwserver.txt fi -echo "localhost:1090" > results/startgwserver.txt +echo "localhost:1120" > results/startgwserver.txt echo "DONE LETS DO STUFF" @@ -177,7 +177,7 @@ for C in $(ls -1 $CLIENTCLEAN | grep -v client11[01]); do done GOLDOUTPUT=clients.goldoutput -if [ "$NETWORKENTRYPOINT" != "localhost:1090" ] +if [ "$NETWORKENTRYPOINT" != "localhost:1120" ] then rm -fr clients.net_goldoutput || true GOLDOUTPUT=clients.net_goldoutput @@ -200,7 +200,7 @@ fi set +x diff -aru $GOLDOUTPUT $CLIENTCLEAN -if [ "$NETWORKENTRYPOINT" == "localhost:1090" ] +if [ "$NETWORKENTRYPOINT" == "localhost:1120" ] then #cat $CLIENTOUT/* | strings | grep -ae "ERROR" -e "FATAL" > results/client-errors || true diff --git a/broadcast/server-1.yaml b/broadcast/server-1.yaml index a241b8cf04facc79b3bd08580c6be87437ef7b35..896cd77c99d60cdec502b2ef75c56842f45b683b 100644 --- a/broadcast/server-1.yaml +++ b/broadcast/server-1.yaml @@ -1,5 +1,5 @@ # START YAML === -registrationCode: "qxkv" +registrationCode: "enkf" useGPU: false devMode: true rawPermAddr: true @@ -18,7 +18,7 @@ cmix: log: "results/servers/server-1.log" errOutput: "results/servers/server-1.err" ipListOutput: "results/servers/iplist-1.txt" - port: "10110" + port: "10120" overridePublicIP: "127.0.0.1" database: name: "cmix_server" @@ -34,7 +34,7 @@ scheduling: # Path to the self signed TLS cert used by the permissioning. Provided by xx network cert: "../keys/cmix.rip.crt" # IP Address of the permissioning server, provided by xx network - address: "0.0.0.0:20110" + address: "0.0.0.0:20120" metrics: # location of stored metrics data. Modification to set to permissioning # server instead of saving will be made at a later date diff --git a/broadcast/server-2.yaml b/broadcast/server-2.yaml index d68cbf217806031645c5b7c12a3b8361c9dd87cc..e4e718999605d40711a49fa81570ad20ab38c1a9 100644 --- a/broadcast/server-2.yaml +++ b/broadcast/server-2.yaml @@ -1,5 +1,5 @@ # START YAML === -registrationCode: "bsms" +registrationCode: "ozxl" useGPU: false devMode: true rawPermAddr: true @@ -18,7 +18,7 @@ cmix: log: "results/servers/server-2.log" errOutput: "results/servers/server-2.err" ipListOutput: "results/servers/iplist-1.txt" - port: "10111" + port: "10121" overridePublicIP: "127.0.0.1" database: name: "cmix_server" @@ -34,7 +34,7 @@ scheduling: # Path to the self signed TLS cert used by the permissioning. Provided by xx network cert: "../keys/cmix.rip.crt" # IP Address of the permissioning server, provided by xx network - address: "0.0.0.0:20110" + address: "0.0.0.0:20120" metrics: # location of stored metrics data. Modification to set to permissioning # server instead of saving will be made at a later date diff --git a/broadcast/server-3.yaml b/broadcast/server-3.yaml index a45b687e83026da1812405d44758fbd9098bdd43..4672d8ba3b3ab688b4d78bdc162d885b80a7e9de 100644 --- a/broadcast/server-3.yaml +++ b/broadcast/server-3.yaml @@ -1,5 +1,5 @@ # START YAML === -registrationCode: "axcv" +registrationCode: "qgby" useGPU: false devMode: true rawPermAddr: true @@ -18,7 +18,7 @@ cmix: log: "results/servers/server-3.log" errOutput: "results/servers/server-3.err" ipListOutput: "results/servers/iplist-1.txt" - port: "10112" + port: "10122" overridePublicIP: "127.0.0.1" database: name: "cmix_server" @@ -34,7 +34,7 @@ scheduling: # Path to the self signed TLS cert used by the permissioning. Provided by xx network cert: "../keys/cmix.rip.crt" # IP Address of the permissioning server, provided by xx network - address: "0.0.0.0:20110" + address: "0.0.0.0:20120" metrics: # location of stored metrics data. Modification to set to permissioning # server instead of saving will be made at a later date diff --git a/broadcast/server-4.yaml b/broadcast/server-4.yaml index 17d87e0733fc7ad974c438c2407599ae182cefae..ddf363cdd1c15df2904cbac53a32fe6b59d020cd 100644 --- a/broadcast/server-4.yaml +++ b/broadcast/server-4.yaml @@ -1,5 +1,5 @@ # START YAML === -registrationCode: "vkgs" +registrationCode: "llhb" useGPU: false devMode: true rawPermAddr: true @@ -18,7 +18,7 @@ cmix: log: "results/servers/server-4.log" errOutput: "results/servers/server-4.err" ipListOutput: "results/servers/iplist-1.txt" - port: "10113" + port: "10123" overridePublicIP: "127.0.0.1" database: name: "cmix_server" @@ -34,7 +34,7 @@ scheduling: # Path to the self signed TLS cert used by the permissioning. Provided by xx network cert: "../keys/cmix.rip.crt" # IP Address of the permissioning server, provided by xx network - address: "0.0.0.0:20110" + address: "0.0.0.0:20120" metrics: # location of stored metrics data. Modification to set to permissioning # server instead of saving will be made at a later date diff --git a/broadcast/server-5.yaml b/broadcast/server-5.yaml index fbc686553d3c807ab18fcc81a1b79ba3a4453dab..91e72d1a3d8d978b6bcae0646abb323f65de448a 100644 --- a/broadcast/server-5.yaml +++ b/broadcast/server-5.yaml @@ -1,5 +1,5 @@ # START YAML === -registrationCode: "qwuw" +registrationCode: "umks" useGPU: false devMode: true rawPermAddr: true @@ -18,7 +18,7 @@ cmix: log: "results/servers/server-5.log" errOutput: "results/servers/server-5.err" ipListOutput: "results/servers/iplist-1.txt" - port: "10114" + port: "10124" overridePublicIP: "127.0.0.1" database: name: "cmix_server" @@ -34,7 +34,7 @@ scheduling: # Path to the self signed TLS cert used by the permissioning. Provided by xx network cert: "../keys/cmix.rip.crt" # IP Address of the permissioning server, provided by xx network - address: "0.0.0.0:20110" + address: "0.0.0.0:20120" metrics: # location of stored metrics data. Modification to set to permissioning # server instead of saving will be made at a later date diff --git a/broadcast/udb.yaml b/broadcast/udb.yaml index ebb8725b2e6716fcc29314df491436f0a1d82a10..dae82f8644e4d81476165d32bdff3a52957b2792 100644 --- a/broadcast/udb.yaml +++ b/broadcast/udb.yaml @@ -3,8 +3,8 @@ log: "./results/udb.log" sessionPath: "./results/udbsession" sessionPass: "hello" certPath: "../keys/cmix.rip.crt" -port: "30110" +port: "30120" keyPath: "../keys/cmix.rip.key" permCertPath: "../keys/cmix.rip.crt" -permAddress: "0.0.0.0:20110" +permAddress: "0.0.0.0:20120" devMode: true \ No newline at end of file diff --git a/generatePackage.py b/generatePackage.py index efd3bb9c8104d3365a1ab72d446a6faad2a04888..a76bca81c8a17768f9acde650ef382da7874b382 100755 --- a/generatePackage.py +++ b/generatePackage.py @@ -5,6 +5,7 @@ import os import string import random import argparse +import re from collections.abc import Sequence # Generates a random string def random_string(stringLength=4): @@ -34,7 +35,7 @@ def create_ports_list(offset, manualOffset=0): while regCode in node_regCodes: regCode = random_string() node_regCodes.append(regCode) - + permissioningPort = 20000 + 10 * offset udbPort = 30000 + 10 * offset @@ -120,13 +121,13 @@ def generate_server_side_config(offset: int, newPackage: string): reg_json = "" with open("gen/registration.json") as f: reg_json = f.read() - + # Open udb proto file udb_proto = "" with open("gen/udbProto.json") as f: udb_proto = f.read() - # Create package + # Create package if not os.path.exists(newPackage): os.makedirs(newPackage) @@ -196,7 +197,7 @@ def generate_server_side_config(offset: int, newPackage: string): .replace("{udb_port}", str(udbPort))\ .replace("{registration_port}", str(perm_port+1)) f.write(reg_template) - + # Generate registration configs with open("{}/registration.json".format(newPackage), "w") as f: f.write(reg_json) @@ -204,7 +205,7 @@ def generate_server_side_config(offset: int, newPackage: string): with open("{}/client-registrar.yaml".format(newPackage), "w") as f: client_reg_template = client_reg_template.replace("{registration_port}", str(perm_port+1)) f.write(client_reg_template) - + with open("{}/noerrors.txt".format(newPackage), "w") as f: f.write(no_errors) @@ -213,6 +214,14 @@ def generate_server_side_config(offset: int, newPackage: string): run_template = run_template.replace("{entry_point}", str(gateway_ports[0])) f.write(run_template) + else: + with open("{}/run.sh".format(newPackage), "r") as f: + filedata = f.read() + newdata = re.sub(r"(localhost:)(\d+)", f"localhost:{str(gateway_ports[0])}", filedata) + with open("{}/run.sh".format(newPackage), "w") as f: + f.write(newdata) + + # Set the executable permissions on the bash script file os.chmod("{}/run.sh".format(newPackage), 0o755)