Node class, command line redesign. New xml template for process configuration.
[anna.git] / example / diameter / launcher / deployments / basic / configure.sh
index ac4fa74..07ee3b1 100755 (executable)
@@ -4,18 +4,8 @@
 # VARIABLES #
 #############
 
-# Diameter dictionary:
-STD_DICTIONARY=stacks/avps_etsi.xml,stacks/avps_ietf.xml,stacks/avps_tgpp.xml,stacks/commands_baseProtocol.xml
-APP_DICTIONARY=stacks/commands_qosControl.xml
-DICTIONARY=$STD_DICTIONARY,$APP_DICTIONARY
-
-# Communication endpoints:
-LOCAL_STANDARD_ENDPOINT=localhost:3868
-EXAMPLE_ENTITY_4_BALANCER=192.168.12.11:3868,192.168.12.21:3868
-CONNS=10
-
 # General
-EXE_BN=ADL-launcher
+EXE_BN=ADML-launcher
 
 #############
 # FUNCTIONS #
@@ -36,10 +26,10 @@ createRunScript () {
 cd \`dirname \$0\`
 STARTED=\`pgrep $1 2>/dev/null\`
 [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
-0> launcher.traces
+0> launcher.trace
 rm -f counters/*
 # Execution line:
-./$@ &
+./$@ --services services.xml &
 echo \$! > .pid
 EOF
 
@@ -68,13 +58,16 @@ read option
 tol=$(get_tol $option)
 [ "$tol" = "" ] && _exit "Option '$option' not implemented !!"
 
+# Services
+ln -sf services/${tol}.xml services.xml
+
 # Tracing
-TRACING="--cntDir counters"
+DEBUG="--cntDir counters"
 echo
 echo "Enable debug traces ? (y/n) [n]:"
 read enable
 [ "$enable" = "" ] && enable=n
-[ "$enable" = "y" ] && TRACING="$TRACING --trace debug"
+[ "$enable" = "y" ] && DEBUG="$DEBUG --trace debug"
 
 # Kindness
 KINDNESS=
@@ -95,29 +88,29 @@ then
 fi
 
 # Run script:
-EXE_LINK=ADL-$tol
+EXE_LINK=ADML-$tol
 ln -sf $EXE_BN $EXE_LINK
 
 case $tol in
 
   client)
     ENTITY=$LOCAL_STANDARD_ENDPOINT
-    createRunScript $EXE_LINK --dictionary $DICTIONARY --entity $ENTITY --entityServerSessions $CONNS --diameterServerSessions 0 $KINDNESS $TRACING &
+    createRunScript $EXE_LINK $KINDNESS $DEBUG &
     ;;
 
   server)
     SERVER=$LOCAL_STANDARD_ENDPOINT
-    createRunScript $EXE_LINK --dictionary $DICTIONARY --diameterServer $SERVER --diameterServerSessions $CONNS --entityServerSessions 0 $KINDNESS $TRACING &
+    createRunScript $EXE_LINK $KINDNESS $DEBUG &
     ;;
 
   balancer)
     SERVER=$LOCAL_STANDARD_ENDPOINT
     ENTITY=$EXAMPLE_ENTITY_4_BALANCER
-    createRunScript $EXE_LINK --dictionary $DICTIONARY --entity $ENTITY --entityServerSessions $CONNS --diameterServer $SERVER --diameterServerSessions $CONNS --balance $KINDNESS $TRACING &
+    createRunScript $EXE_LINK $KINDNESS $DEBUG &
     ;;
 
   dummy)
-    createRunScript $EXE_LINK --dictionary $DICTIONARY --entityServerSessions 0 --diameterServerSessions 0 $KINDNESS $TRACING &
+    createRunScript $EXE_LINK $KINDNESS $DEBUG &
     ;;
 
 esac
@@ -125,3 +118,4 @@ esac
 echo
 echo "Created 'run.sh' script !"
 echo
+