Skip to content
Snippets Groups Projects
Commit 06b7d5d0 authored by Josh Brooks's avatar Josh Brooks
Browse files

Implement Client-Registrar into testing

parent c104d5e9
No related branches found
No related tags found
1 merge request!4Release
# ==================================
# Client Registrar Configuration
# ==================================
# Log message level (0 = info, 1 = debug, >1 = trace)
logLevel: 0
# Path to log file
logPath: "results/client-registrar.log"
# Public address, used in NDF it gives to client
publicAddress: "0.0.0.0:11421"
# The listening port of this server
port: 11421
# === REQUIRED FOR ENABLING TLS ===
# Path to the registration server private key file
keyPath: "../keys/cmix.rip.key"
# Path to the registration server certificate file
certPath: "../keys/cmix.rip.crt"
# Maximum number of connections per period
userRegCapacity: 1000
# How often the number of connections is reset
userRegLeakPeriod: "24h"
# Database connection information
dbUsername: "cmix"
dbPassword: ""
dbName: "cmix_server"
dbAddress: ""
# List of client codes to be added to the database (for testing)
clientRegCodes:
- "AAAA"
- "BBBB"
- "CCCC"
...@@ -92,3 +92,6 @@ RegCodesFilePath: "regCodes.json" ...@@ -92,3 +92,6 @@ RegCodesFilePath: "regCodes.json"
addressSpace: 32 addressSpace: 32
randomGeoBinning: true randomGeoBinning: true
# Public address used in NDF to give to client
registrationAddress: "0.0.0.0:11421"
\ No newline at end of file
...@@ -67,6 +67,14 @@ then ...@@ -67,6 +67,14 @@ then
PIDVAL=$! PIDVAL=$!
echo "$PERMCMD -- $PIDVAL" echo "$PERMCMD -- $PIDVAL"
# Run Client Registrar
CLIENT_REG_CMD="../bin/client-registrar \
-l 2 -c client-registrar.yaml"
$CLIENT_REG_CMD > results/client-registrat-console.txt 2>&1 &
PIDVAL=$!
echo "$CLIENT_REG_CMD -- $PIDVAL"
for SERVERID in $(seq 5 -1 1) for SERVERID in $(seq 5 -1 1)
do do
IDX=$(($SERVERID - 1)) IDX=$(($SERVERID - 1))
......
...@@ -49,7 +49,7 @@ fi ...@@ -49,7 +49,7 @@ fi
# Set up the URL for downloading the binaries # Set up the URL for downloading the binaries
DEFAULTBRANCH=${DEFAULTBRANCH:="release"} DEFAULTBRANCH=${DEFAULTBRANCH:="release"}
if [[ $USEREPO == "d" ]]; then if [[ $USEREPO == "d" ]]; then
REPOS_API=${REPOS_API:="https://git.xx.network/api/v4/projects/elixxir%2F"} REPOS_API=${REPOS_API:="https://gitlab.com/api/v4/projects/elixxir%2F"}
else else
REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"} REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"}
fi fi
...@@ -85,12 +85,14 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do ...@@ -85,12 +85,14 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
SERVER_GPU_URL=${SERVER_GPU_URL:="${REPOS_API}server/$BRANCH_URL/server-cuda.linux64?job=build"} SERVER_GPU_URL=${SERVER_GPU_URL:="${REPOS_API}server/$BRANCH_URL/server-cuda.linux64?job=build"}
GPULIB_URL=${GPULIB_URL:="${REPOS_API}server/$BRANCH_URL/libpowmosm75.so?job=build"} GPULIB_URL=${GPULIB_URL:="${REPOS_API}server/$BRANCH_URL/libpowmosm75.so?job=build"}
GPULIB2_URL=${GPULIB2_URL:="${REPOS_API}server/$BRANCH_URL/libpow.fatbin?job=build"} GPULIB2_URL=${GPULIB2_URL:="${REPOS_API}server/$BRANCH_URL/libpow.fatbin?job=build"}
CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
else else
UDB_URL=${UDB_URL:="${REPOS_API}/$BRANCH/udb$BIN"} UDB_URL=${UDB_URL:="${REPOS_API}/$BRANCH/udb$BIN"}
SERVER_URL=${SERVER_URL:="${REPOS_API}/$BRANCH/server$BIN"} SERVER_URL=${SERVER_URL:="${REPOS_API}/$BRANCH/server$BIN"}
GW_URL=${GW_URL:="${REPOS_API}/$BRANCH/gateway$BIN"} GW_URL=${GW_URL:="${REPOS_API}/$BRANCH/gateway$BIN"}
PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}/$BRANCH/registration.stateless$BIN"} PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}/$BRANCH/registration.stateless$BIN"}
CLIENT_URL=${CLIENT_URL:="${REPOS_API}/$BRANCH/client$BIN"} CLIENT_URL=${CLIENT_URL:="${REPOS_API}/$BRANCH/client$BIN"}
CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
fi fi
set -x set -x
...@@ -120,6 +122,11 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do ...@@ -120,6 +122,11 @@ for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client" ${CLIENT_URL} curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client" ${CLIENT_URL}
fi fi
# Silently download the client registrar binary to the provisioning directory
if [ ! -f $download_path/client-registrar ] && [[ "$CLIENT_REG_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client-registrar" ${CLIENT_REG_URL}
fi
if [[ $2 == "d" ]]; then if [[ $2 == "d" ]]; then
# Silently download the Server binary to the provisioning directory # Silently download the Server binary to the provisioning directory
if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then
...@@ -134,6 +141,11 @@ if [[ $2 == "d" ]]; then ...@@ -134,6 +141,11 @@ if [[ $2 == "d" ]]; then
if [ ! -f $download_path/libpow.fatbin ] && [[ "$GPULIB2_URL" != *"forcedbranch"* ]]; then if [ ! -f $download_path/libpow.fatbin ] && [[ "$GPULIB2_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/libpow.fatbin" ${GPULIB2_URL} curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/libpow.fatbin" ${GPULIB2_URL}
fi fi
# Silently download the client registrar binary to the provisioning directory
if [ ! -f $download_path/client-registrar ] && [[ "$CLIENT_REG_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o "$download_path/client-registrar" ${CLIENT_REG_URL}
fi
fi fi
set +x set +x
...@@ -148,6 +160,7 @@ fi ...@@ -148,6 +160,7 @@ fi
unset SERVER_GPU_URL unset SERVER_GPU_URL
unset GPULIB_URL unset GPULIB_URL
unset GPULIB2_URL unset GPULIB2_URL
unset CLIENT_REG_URL
done done
# Make binaries executable # Make binaries executable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment