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"
......@@ -91,4 +91,7 @@ RegCodesFilePath: "regCodes.json"
# Set address space size for ephemeral IDs
addressSpace: 32
randomGeoBinning: true
\ No newline at end of file
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
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)
do
IDX=$(($SERVERID - 1))
......
......@@ -49,7 +49,7 @@ fi
# Set up the URL for downloading the binaries
DEFAULTBRANCH=${DEFAULTBRANCH:="release"}
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
REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"}
fi
......@@ -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"}
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"}
CLIENT_REG_URL=${CLIENT_REG_URL:="${REPOS_API}client-registrar/$BRANCH_URL/registration$BIN"}
else
UDB_URL=${UDB_URL:="${REPOS_API}/$BRANCH/udb$BIN"}
SERVER_URL=${SERVER_URL:="${REPOS_API}/$BRANCH/server$BIN"}
GW_URL=${GW_URL:="${REPOS_API}/$BRANCH/gateway$BIN"}
PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}/$BRANCH/registration.stateless$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
set -x
......@@ -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}
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
# Silently download the Server binary to the provisioning directory
if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then
......@@ -134,6 +141,11 @@ if [[ $2 == "d" ]]; 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}
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
set +x
......@@ -148,6 +160,7 @@ fi
unset SERVER_GPU_URL
unset GPULIB_URL
unset GPULIB2_URL
unset CLIENT_REG_URL
done
# Make binaries executable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment