Centralize ADML deployment
authorEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Mon, 17 Apr 2017 17:33:09 +0000 (19:33 +0200)
committerEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Mon, 17 Apr 2017 17:33:09 +0000 (19:33 +0200)
example/diameter/launcher/DEPLOY.sh [deleted file]
example/diameter/launcher/DEPLOY_setups.sh [deleted file]
example/diameter/launcher/deploy-setups.sh [new file with mode: 0755]
example/diameter/launcher/deploy.sh [new file with mode: 0755]
example/diameter/launcher/deployments/advanced/README
example/diameter/launcher/deployments/basic/README
example/diameter/launcher/deployments/basic/configure.sh
example/diameter/launcher/deployments/ft-client/README
example/diameter/launcher/deployments/st-client/README
example/diameter/launcher/deployments/st-client/configure.sh
example/postinstall.sh

diff --git a/example/diameter/launcher/DEPLOY.sh b/example/diameter/launcher/DEPLOY.sh
deleted file mode 100755 (executable)
index 7e19fff..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-#!/bin/bash
-
-#############
-# VARIABLES #
-#############
-SCR_DIR=`readlink -f $(dirname $0)`
-PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
-SETUPS_DIR=$PROJECT_ROOT/source/diameter/stack/setups
-MSGDTD=$PROJECT_ROOT/include/anna/diameter/codec/message.dtd
-DCTDTD=$PROJECT_ROOT/include/anna/diameter/stack/dictionary.dtd
-SERVICES=$SCR_DIR/resources/services_examples
-STACK_EXAMPLES=$SCR_DIR/resources/stack_examples
-SRVDTD=$SERVICES/services.dtd
-VARIANT=
-
-#############
-# FUNCTIONS #
-#############
-_exit () {
-   echo -e "\n$1\n"
-   exit 1
-}
-
-usage () {
-  echo "Usage: $0 [deployment_type: a|b|f|s] [deployment_path]"
-  echo
-  echo "       deployment_type:"
-  echo "          a=advanced"
-  echo "          b=basic"
-  echo "          f=function test client"
-  echo "          s=system test client"
-  echo "       deployment_path:"
-  echo "          non-existent path directory."
-  echo
-  echo "       For example:"
-  echo "          $0 b $HOME/ADML-basicServer"
-  echo "          $0 b $HOME/ADML-MMSbalancer"
-  echo "          $0 f $HOME/ADML-tester"
-  echo "          $0 s $HOME/ADML-stress-client"
-  echo
-  exit 0
-}
-# $1: deployment type
-createRunScript () {
-  # Basic launcher 'run.sh' will be created at deployment configuration: 
-  [ "$1" = "b" ] && return
-
-  local other=
-  [ "$1" = "a" ] && other="--httpServer \`grep -v ^# .httpServer\`"
-  [ "$1" = "f" ] && ln -s ADML-launcher $EXE
-  [ "$1" = "s" ] && { other="--disableLogs"; ln -s ADML-launcher $EXE ; }
-
-  echo "Creating 'run.sh' script ..."
-
-  cat << EOF > run.sh
-#!/bin/bash
-cd \`dirname \$0\`
-EXE=$EXE
-STARTED=\`pgrep \$EXE$ 2>/dev/null\`
-[ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
-./pre-start.sh
-0> launcher.trace
-rm -f counters/* test-reports/*
-# Execution line:
-export LD_LIBRARY_PATH=\$PWD/dynlibs
-./\$EXE --services services.xml --cntDir counters --tmDir test-reports $other &
-echo \$! > .pid
-EOF
-
-  chmod a+x run.sh
-}
-
-#############
-# EXECUTION #
-#############
-cd $SCR_DIR
-echo
-echo "---------------------------------------"
-echo "Anna Diameter Launcher (ADML) deployment"
-echo "---------------------------------------"
-[ "$1" = "--help" -o "$1" = "-h" ] && usage
-echo " (--help or -h for more info)"
-echo
-echo "Basic checkings ..."
-
-# Get variant and main executables:
-[ -f $SCR_DIR/release/example_diameter_launcher ] && VARIANT=release
-[ -f $SCR_DIR/debug/example_diameter_launcher ] && VARIANT=debug
-[ -z "$VARIANT" ] && _exit "Cannot locate neither 'release' nor 'debug' variant !"
-echo "Variant: $VARIANT"
-ADML_EXEC=$SCR_DIR/$VARIANT/example_diameter_launcher
-STACKMGMT_EXEC=$(readlink -f $SCR_DIR/../stackManagement/$VARIANT/example_diameter_stackManagement)
-
-[ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR)."
-
-echo
-if [ "$1" = "" ]
-then
-  echo
-  echo "Deploy one of these versions:"
-  echo
-  echo " (a)dvanced version:     includes burst management script and templates for different scenarios. Automatic configuration during start."
-  echo " (b)asic version:        4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
-  echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs. Requires a server to perform the tests."
-  echo " (s)ystem test client:   special client for stress testing. Requires a server/s to perform the tests."
-  echo
-  echo "Input option [b]:"
-  read option
-  [ "$option" = "" ] && option=b
-else
-  option=$1
-fi
-
-case $option in
-  a)
-    echo "Advanced deployment"
-    DEPLOYMENTS_DIR=deployments/advanced
-    DPATH_dflt=$HOME/ADML-advanced
-  ;;
-
-  b)
-    echo "Basic deployment"
-    DEPLOYMENTS_DIR=deployments/basic
-    DPATH_dflt=$HOME/ADML-basic
-  ;;
-
-  f)
-    echo "FT deployment"
-    DEPLOYMENTS_DIR=deployments/ft-client
-    DPATH_dflt=$HOME/ADML-ft-client
-  ;;
-
-  s)
-    echo "ST deployment"
-    DEPLOYMENTS_DIR=deployments/st-client
-    DPATH_dflt=$HOME/ADML-st-client
-  ;;
-
-  *)
-    _exit "Invalid deployment type '$option' !!"
-  ;;
-esac
-
-echo
-if [ "$2" = "" ]
-then
-  echo "Input deployment path [$DPATH_dflt]:"
-  read DPATH
-  [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
-else
-  DPATH=$2
-fi
-
-[ -d $DPATH ] && _exit "The installation path '$DPATH' must not exists."
-EXE=`basename $DPATH`
-
-echo "Copying to '$DPATH' ..."
-mkdir -p $DPATH
-mkdir -p $DPATH/stacks
-mkdir -p $DPATH/DTDs
-mkdir -p $DPATH/counters
-mkdir -p $DPATH/test-reports
-
-# Dynamic libs:
-mkdir -p $DPATH/dynlibs
-DYNLIBS=( $(find $PROJECT_ROOT -name "*.so" | grep -w $VARIANT) )
-
-for dynlib in ${DYNLIBS[@]}
-do
-  dynlib_bn=$(basename $dynlib)
-  if [ "$dynlib_bn" != "libanna_dynamicLauncherProcedure.so" ]
-  then
-    cp $dynlib $DPATH/dynlibs
-  else
-    ########## ADML Dynamic libs system ##########
-    # Create structure from $PROJECT_ROOT/dynamic/launcher
-    suffix_path=$(echo $dynlib | awk -F"$PROJECT_ROOT/dynamic/launcher/" '{ print $2 }')
-    target=$(dirname $DPATH/dynlibs/$(dirname $suffix_path))
-    mkdir -p $target
-    cp $dynlib $target
-
-    # Additional resources
-    dynlib_dn=$(dirname $dynlib)
-    dynlib_dn_dn=$(dirname $dynlib_dn)
-    cp $dynlib_dn_dn/*.xml $target 2>/dev/null
-    cp $dynlib_dn_dn/dynamic.suffix $target 2>/dev/null
-    cp -r $dynlib_dn_dn/services $target 2>/dev/null
-  fi
-done
-
-# ADML dynamic libs selection script:
-cp $SCR_DIR/resources/scripts/select_dynlib.sh $DPATH/dynlibs/select.sh
-
-# Default dynamic library:
-cd $DPATH/dynlibs
-ln -s default/libanna_dynamicLauncherProcedure.so
-cd - >/dev/null
-
-# Basic setup:
-[ "$option" = "b" ] && mkdir -p $DPATH/services
-
-# Copy executables:
-cp $ADML_EXEC $DPATH/ADML-launcher
-[ ! -f $DPATH/stacks/stack-mgmt ] && cp $STACKMGMT_EXEC $DPATH/stacks/stack-mgmt
-
-# Copy resources:
-cp -rL $DEPLOYMENTS_DIR/* $DPATH
-cp $SETUPS_DIR/*xml $DPATH/stacks
-cp $SETUPS_DIR/*sh $DPATH/stacks
-cp $SETUPS_DIR/readme.txt $DPATH/stacks
-mkdir $DPATH/stacks/other_examples
-cp $STACK_EXAMPLES/* $DPATH/stacks/other_examples 
-cp $MSGDTD $DPATH/DTDs
-cp $DCTDTD $DPATH/DTDs
-cp $SRVDTD $DPATH/DTDs
-[ "$option" = "b" ] && cp $SERVICES/* $DPATH/services
-
-echo "Preparing ..."
-cd $DPATH
-createRunScript $option
-stacks/makeAutonomous.sh commands_qosControl.xml stacks/stack-mgmt >/dev/null
-ln -s stacks/autonomous.commands_qosControl.xml dictionary.xml
-cd - >/dev/null
-
-if [ "$option" = "s" ]
-then
-  cd $DPATH
-  ln -s services_example services
-  mv run.sh .run-one.sh
-  mv run_all.sh run.sh
-  mv operation.sh .operation-one.sh
-  mv operation_all.sh operation.sh
-  rm dictionary.xml
-  cd - >/dev/null
-fi
-
-# Help:
-echo "Done !"
-echo "(see README at '$DPATH')"
-echo
-
diff --git a/example/diameter/launcher/DEPLOY_setups.sh b/example/diameter/launcher/DEPLOY_setups.sh
deleted file mode 100755 (executable)
index dab557d..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/sh
-
-#############
-# VARIABLES #
-#############
-DEPLOY_SCR=`dirname $0`/DEPLOY.sh
-
-#############
-# FUNCTIONS #
-#############
-_exit() {
-  echo
-  echo $1
-  echo
-  exit 1
-}
-
-#############
-# EXECUTION #
-#############
-type=$1
-target=$2
-
-echo
-echo "               ----------------------------"
-echo "               SETUPS DEPLOYMENT AUTOMATION"
-echo "               ----------------------------"
-echo
-echo "-----------------------------------------------------------"
-echo "Usage: $0 [type] [target_directory]"
-echo
-echo "          type:"
-echo "                1. Client and server"
-echo "                2. Ft-client and server"
-echo "                3. St-client and servers"
-echo
-echo "          target_directory:"
-echo
-echo "                Non existing directory to install the stuff"
-echo
-echo "-----------------------------------------------------------"
-echo
-[ "$type" = "" ] && { echo "Which one you want to deploy [1]:" ; read type ; }
-[ "$type" = "" ] && type=1
-
-case $type in
-  1)
-    echo "Selected Client-Server"
-    DEPLOY_DIR__dflt=$HOME/ADML-clientAndServer
-  ;;
-
-  2)
-    echo "Selected Client-Server FT"
-    DEPLOY_DIR__dflt=$HOME/ADML-ftclientAndServer
-  ;;
-
-  3)
-    echo "Selected Client-Servers ST"
-    DEPLOY_DIR__dflt=$HOME/ADML-stclientAndServers
-  ;;
-
-  *)
-    echo "Unknown option!"
-    exit 1
-  ;;
-esac
-echo
-
-
-[ "$target" = "" ] && { echo "Directory for deploy [$DEPLOY_DIR__dflt]:" ; read target ; }
-[ "$target" = "" ] && target=$DEPLOY_DIR__dflt
-[ -d $target ] && _exit "The directory '$target' already exists !"
-echo "Target directory: $target"
-
-case $type in
-  1)
-    $DEPLOY_SCR b $target/ADML-client
-    $DEPLOY_SCR b $target/ADML-server
-    echo "Configuring ..."
-    cd $target/ADML-client
-    echo c | ./configure.sh >/dev/null
-    cd - >/dev/null
-    cd $target/ADML-server
-    echo s | ./configure.sh >/dev/null
-    cd - >/dev/null
-  ;;
-
-  2)
-    $DEPLOY_SCR f $target/ADML-ft-client
-    $DEPLOY_SCR b $target/ADML-server
-    echo "Configuring ..."
-    cd $target/ADML-server
-    echo s | ./configure.sh >/dev/null
-    cd - >/dev/null
-  ;;
-
-  3)
-    $DEPLOY_SCR s $target/ADML-st-client
-    $DEPLOY_SCR b $target/ADML-serverGx
-    $DEPLOY_SCR b $target/ADML-serverRx
-    echo "Configuring ..."
-#    cd $target/ADML-st-client
-#    ln -s services_example services
-#    mv run.sh .run-one.sh
-#    mv run_all.sh run.sh
-#    mv operation.sh .operation-one.sh
-#    mv operation_all.sh operation.sh
-#    rm dictionary.xml
-#    cd - >/dev/null
-    cd $target/ADML-serverGx
-    echo s | ./configure.sh >/dev/null
-    sed -i 's/3868/3869/' services.xml
-    # Gx dictionary:
-    ln -sf stacks/other_examples/16777238.xml dictionary.xml
-    cd - >/dev/null
-    cd $target/ADML-serverRx
-    echo s | ./configure.sh >/dev/null
-    # Rx dictionary:
-    ln -sf stacks/other_examples/16777236.xml dictionary.xml
-    cd - >/dev/null
-  ;;
-esac
-
-echo
-echo "Done!"
-echo
-
diff --git a/example/diameter/launcher/deploy-setups.sh b/example/diameter/launcher/deploy-setups.sh
new file mode 100755 (executable)
index 0000000..526ff79
--- /dev/null
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+#############
+# VARIABLES #
+#############
+DEPLOY_SCR=`dirname $0`/deploy.sh
+
+#############
+# FUNCTIONS #
+#############
+_exit() {
+  echo
+  echo $1
+  echo
+  exit 1
+}
+
+#############
+# EXECUTION #
+#############
+type=$1
+target=$2
+
+echo
+echo "               ----------------------------"
+echo "               SETUPS DEPLOYMENT AUTOMATION"
+echo "               ----------------------------"
+echo
+echo "-----------------------------------------------------------"
+echo "Usage: $0 [type] [target_directory]"
+echo
+echo "          type:"
+echo "                1. Client and server"
+echo "                2. Ft-client and server"
+echo "                3. St-client and servers"
+echo "                4. Single deployment"
+echo
+echo "          target_directory:"
+echo
+echo "                Non existing directory to install the stuff"
+echo
+echo "-----------------------------------------------------------"
+echo
+[ "$type" = "" ] && { echo "Which one you want to deploy [1]:" ; read type ; }
+[ "$type" = "" ] && type=1
+
+case $type in
+  1)
+    echo "Selected Client-Server"
+    DEPLOY_DIR__dflt=$HOME/ADML-clientAndServer
+  ;;
+
+  2)
+    echo "Selected Client-Server FT"
+    DEPLOY_DIR__dflt=$HOME/ADML-ftclientAndServer
+  ;;
+
+  3)
+    echo "Selected Client-Servers ST"
+    DEPLOY_DIR__dflt=$HOME/ADML-stclientAndServers
+  ;;
+
+  4)
+    echo "Selected single deployment"
+    DEPLOY_DIR__dflt=$HOME/ADML-single
+  ;;
+
+  *)
+    echo "Unknown option!"
+    exit 1
+  ;;
+esac
+echo
+
+
+[ "$target" = "" ] && { echo "Directory for deploy [$DEPLOY_DIR__dflt]:" ; read target ; }
+[ "$target" = "" ] && target=$DEPLOY_DIR__dflt
+[ -d $target ] && _exit "The directory '$target' already exists !"
+echo "Target directory: $target"
+
+case $type in
+  1)
+    $DEPLOY_SCR b $target/ADML-client
+    $DEPLOY_SCR b $target/ADML-server
+    echo "Configuring ..."
+    cd $target/ADML-client
+    echo c | ./configure.sh >/dev/null
+    cd - >/dev/null
+    cd $target/ADML-server
+    echo s | ./configure.sh >/dev/null
+    cd - >/dev/null
+  ;;
+
+  2)
+    $DEPLOY_SCR f $target/ADML-ft-client
+    $DEPLOY_SCR b $target/ADML-server
+    echo "Configuring ..."
+    cd $target/ADML-server
+    echo s | ./configure.sh >/dev/null
+    cd - >/dev/null
+  ;;
+
+  3)
+    $DEPLOY_SCR s $target/ADML-st-client
+    $DEPLOY_SCR b $target/ADML-serverGx
+    $DEPLOY_SCR b $target/ADML-serverRx
+    echo "Configuring ..."
+    cd $target/ADML-serverGx
+    echo s | ./configure.sh >/dev/null
+    sed -i 's/3868/3869/' services.xml
+    # Gx dictionary:
+    ln -sf stacks/other_examples/16777238.xml dictionary.xml
+    cd - >/dev/null
+    cd $target/ADML-serverRx
+    echo s | ./configure.sh >/dev/null
+    # Rx dictionary:
+    ln -sf stacks/other_examples/16777236.xml dictionary.xml
+    cd - >/dev/null
+  ;;
+
+  4)
+    $DEPLOY_SCR b $target
+    echo "Configuring ..."
+    cd $target
+    echo d | ./configure.sh >/dev/null
+    cd - >/dev/null
+  ;;
+
+esac
+
+echo
+echo "Done!"
+echo
+
diff --git a/example/diameter/launcher/deploy.sh b/example/diameter/launcher/deploy.sh
new file mode 100755 (executable)
index 0000000..cb7c169
--- /dev/null
@@ -0,0 +1,244 @@
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+SCR_DIR=`readlink -f $(dirname $0)`
+PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
+SETUPS_DIR=$PROJECT_ROOT/source/diameter/stack/setups
+MSGDTD=$PROJECT_ROOT/include/anna/diameter/codec/message.dtd
+DCTDTD=$PROJECT_ROOT/include/anna/diameter/stack/dictionary.dtd
+SERVICES=$SCR_DIR/resources/services_examples
+SCRIPTS=$SCR_DIR/resources/scripts
+STACK_EXAMPLES=$SCR_DIR/resources/stack_examples
+SRVDTD=$SERVICES/services.dtd
+VARIANT=
+
+#############
+# FUNCTIONS #
+#############
+_exit () {
+   echo -e "\n$1\n"
+   exit 1
+}
+
+usage () {
+  echo "Usage: $0 [deployment_type: a|b|f|s] [deployment_path]"
+  echo
+  echo "       deployment_type:"
+  echo "          a=advanced"
+  echo "          b=basic"
+  echo "          f=function test client"
+  echo "          s=system test client"
+  echo "       deployment_path:"
+  echo "          non-existent path directory."
+  echo
+  echo "       For example:"
+  echo "          $0 b $HOME/ADML-basicServer"
+  echo "          $0 b $HOME/ADML-MMSbalancer"
+  echo "          $0 f $HOME/ADML-tester"
+  echo "          $0 s $HOME/ADML-stress-client"
+  echo
+  exit 0
+}
+# $1: deployment type
+createRunScript () {
+  # Basic launcher 'run.sh' will be created at deployment configuration: 
+  [ "$1" = "b" ] && return
+
+  local other=
+  [ "$1" = "a" ] && other="--httpServer \`grep -v ^# .httpServer\`"
+  [ "$1" = "f" ] && ln -s ADML $EXE
+  [ "$1" = "s" ] && { other="--disableLogs"; ln -s ADML $EXE ; }
+
+  echo "Creating 'run.sh' script ..."
+
+  cat << EOF > run.sh
+#!/bin/bash
+cd \`dirname \$0\`
+EXE=$EXE
+STARTED=\`pgrep \$EXE$ 2>/dev/null\`
+[ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
+./pre-start.sh
+0> launcher.trace
+rm -f counters/* test-reports/*
+# Execution line:
+export LD_LIBRARY_PATH=\$PWD/dynlibs
+./\$EXE --services services.xml --cntDir counters --tmDir test-reports $other &
+echo \$! > .pid
+EOF
+
+  chmod a+x run.sh
+}
+
+#############
+# EXECUTION #
+#############
+cd $SCR_DIR
+echo
+echo "---------------------------------------"
+echo "Anna Diameter Launcher (ADML) deployment"
+echo "---------------------------------------"
+[ "$1" = "--help" -o "$1" = "-h" ] && usage
+echo " (--help or -h for more info)"
+echo
+echo "Basic checkings ..."
+
+# Get variant and main executables:
+[ -f $SCR_DIR/release/example_diameter_launcher ] && VARIANT=release
+[ -f $SCR_DIR/debug/example_diameter_launcher ] && VARIANT=debug
+[ -z "$VARIANT" ] && _exit "Cannot locate neither 'release' nor 'debug' variant !"
+echo "Variant: $VARIANT"
+ADML_EXEC=$SCR_DIR/$VARIANT/example_diameter_launcher
+STACKMGMT_EXEC=$(readlink -f $SCR_DIR/../stackManagement/$VARIANT/example_diameter_stackManagement)
+
+[ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR)."
+
+echo
+if [ "$1" = "" ]
+then
+  echo
+  echo "Deploy one of these versions:"
+  echo
+  echo " (a)dvanced version:     includes burst management script and templates for different scenarios. Automatic configuration during start."
+  echo " (b)asic version:        4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
+  echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs. Requires a server to perform the tests."
+  echo " (s)ystem test client:   special client for stress testing. Requires a server/s to perform the tests."
+  echo
+  echo "Input option [b]:"
+  read option
+  [ "$option" = "" ] && option=b
+else
+  option=$1
+fi
+
+case $option in
+  a)
+    echo "Advanced deployment"
+    DEPLOYMENTS_DIR=deployments/advanced
+    DPATH_dflt=$HOME/ADML-advanced
+  ;;
+
+  b)
+    echo "Basic deployment"
+    DEPLOYMENTS_DIR=deployments/basic
+    DPATH_dflt=$HOME/ADML-basic
+  ;;
+
+  f)
+    echo "FT deployment"
+    DEPLOYMENTS_DIR=deployments/ft-client
+    DPATH_dflt=$HOME/ADML-ft-client
+  ;;
+
+  s)
+    echo "ST deployment"
+    DEPLOYMENTS_DIR=deployments/st-client
+    DPATH_dflt=$HOME/ADML-st-client
+  ;;
+
+  *)
+    _exit "Invalid deployment type '$option' !!"
+  ;;
+esac
+
+echo
+if [ "$2" = "" ]
+then
+  echo "Input deployment path [$DPATH_dflt]:"
+  read DPATH
+  [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
+else
+  DPATH=$2
+fi
+
+[ -d $DPATH ] && _exit "The installation path '$DPATH' must not exists."
+EXE=`basename $DPATH`
+
+echo "Copying to '$DPATH' ..."
+mkdir -p $DPATH
+mkdir -p $DPATH/DTDs
+mkdir -p $DPATH/counters
+mkdir -p $DPATH/test-reports
+
+# Dynamic libs:
+mkdir -p $DPATH/dynlibs
+DYNLIBS=( $(find $PROJECT_ROOT -name "*.so" | grep -w $VARIANT) )
+
+for dynlib in ${DYNLIBS[@]}
+do
+  dynlib_bn=$(basename $dynlib)
+  if [ "$dynlib_bn" != "libanna_dynamicLauncherProcedure.so" ]
+  then
+    cp $dynlib $DPATH/dynlibs
+  else
+    ########## ADML Dynamic libs system ##########
+    # Create structure from $PROJECT_ROOT/dynamic/launcher
+    suffix_path=$(echo $dynlib | awk -F"$PROJECT_ROOT/dynamic/launcher/" '{ print $2 }')
+    target=$(dirname $DPATH/dynlibs/$(dirname $suffix_path))
+    mkdir -p $target
+    cp $dynlib $target
+
+    # Additional resources
+    dynlib_dn=$(dirname $dynlib)
+    dynlib_dn_dn=$(dirname $dynlib_dn)
+    cp $dynlib_dn_dn/*.xml $target 2>/dev/null
+    cp $dynlib_dn_dn/dynamic.suffix $target 2>/dev/null
+    cp -r $dynlib_dn_dn/services $target 2>/dev/null
+  fi
+done
+
+# ADML dynamic libs selection script:
+cp $SCR_DIR/resources/scripts/select_dynlib.sh $DPATH/dynlibs/select.sh
+
+# Default dynamic library:
+cd $DPATH/dynlibs
+ln -s default/libanna_dynamicLauncherProcedure.so
+cd - >/dev/null
+
+# Basic setup:
+[ "$option" = "b" ] && mkdir -p $DPATH/services
+
+# Copy resources:
+cp -rL $DEPLOYMENTS_DIR/* $DPATH
+mkdir -p $DPATH/stack_examples/other
+cp $STACK_EXAMPLES/* $DPATH/stack_examples/other
+cp $SETUPS_DIR/*xml $DPATH/stack_examples
+cp $SETUPS_DIR/*sh $DPATH/stack_examples
+cp $SETUPS_DIR/readme.txt $DPATH/stack_examples
+cp $MSGDTD $DPATH/DTDs
+cp $DCTDTD $DPATH/DTDs
+cp $SRVDTD $DPATH/DTDs
+[ "$option" = "b" ] && cp $SERVICES/* $DPATH/services
+cp $SCRIPTS/clone.sh $DPATH
+cp $SCRIPTS/tinyTestcase.sh $DPATH
+
+# Copy executables:
+cp $ADML_EXEC $DPATH/ADML
+[ ! -f $DPATH/stack_examples/stack-mgmt ] && cp $STACKMGMT_EXEC $DPATH/stack_examples/stack-mgmt
+
+echo "Default stack dynamic generation ..."
+cd $DPATH
+createRunScript $option
+stack_examples/makeAutonomous.sh commands_qosControl.xml stack_examples/stack-mgmt >/dev/null
+ln -s stack_examples/autonomous.commands_qosControl.xml dictionary.xml
+cd - >/dev/null
+
+if [ "$option" = "s" ]
+then
+  cd $DPATH
+  ln -s services_example services
+  mv run.sh .run-one.sh
+  mv run_all.sh run.sh
+  mv operation.sh .operation-one.sh
+  mv operation_all.sh operation.sh
+  rm dictionary.xml
+  cd - >/dev/null
+fi
+
+# Help:
+echo "Done !"
+echo "(see README at '$DPATH')"
+echo
+
index 3b59438..404524b 100644 (file)
@@ -1,7 +1,7 @@
 
 ABOUT CONTENT
 -------------
-Stacks available at './stacks'. The launcher uses 'dictionary.xml' created ad-hoc by default.
+Stacks at './stack_examples'. The launcher uses 'dictionary.xml' created ad-hoc by default.
 It is a QoS application dictionary.
 
 Template for xml messages (message.dtd), dictionaries (dictionary.dtd) and services (services.dtd)
@@ -10,13 +10,12 @@ are informative, not actually required by process. Located at './DTDs'.
 STARTING THE PROCESS
 --------------------
 Start with 'run.sh'. You could manually edit such script adding parameters as '--trace debug' to
-get complete 'launcher.trace'. Execute 'ADML-launcher' without arguments to see a complete
-command-line help.
+get complete 'launcher.trace'. Execute 'ADML' without arguments to see a complete command-line help.
 
 DEPLOYED SCRIPTS
 ----------------
 You could get help about installed resources by mean 'help.sh', which launch a help request to
-the started ADML-launcher process http interface. All the implemented http operations could be
-launched through a script to make easy use. The http client 'curl' is used by default due to
-its presence on common linux distributions.
+the started ADML process http interface. All the implemented http operations could be launched
+through a script to make easy use. The http client 'curl' is used by default due to its presence
+on common linux distributions.
 
index 8a0b83c..6a51e4a 100644 (file)
@@ -2,7 +2,7 @@ ABOUT CONTENT
 -------------
 Template for xml messages (message.dtd), dictionaries (dictionary.dtd) and services (services.dtd)
 are informative, not actually required by process. They are located at './DTDs'. Stacks are available
-at './stacks'. There are also some stuff (hex/xml examples, etc.) which could be useful.
+at './stack_examples'. There are also some stuff (hex/xml examples, etc.) which could be useful.
 
 Firstly you have to configure this directory in order to choose the type of launcher which will
 be preconfigured for your basic needs: client, server, balancer (proxy) and dummy process (this
index f03eca7..5257578 100755 (executable)
@@ -5,7 +5,7 @@
 #############
 
 # General
-EXE_BN=ADML-launcher
+EXE_BN=ADML
 
 #############
 # FUNCTIONS #
@@ -90,7 +90,7 @@ fi
 
 # Run script:
 EXE_LINK=`basename $PWD`
-ln -sf $EXE_BN $EXE_LINK
+[ "$EXE_BN" != "$EXE_LINK" ] && ln -sf $EXE_BN $EXE_LINK
 
 case $tol in
 
index d538a77..ff22c92 100644 (file)
@@ -2,7 +2,7 @@ ABOUT CONTENT
 -------------
 Template for xml messages (message.dtd), dictionaries (dictionary.dtd) and services (services.dtd)
 are informative, not actually required by process. They are located at './DTDs'. Stacks are available
-at './stacks'. There are also some stuff (hex/xml examples, etc.) which could be useful.
+at './stack_examples'. There are also some stuff (hex/xml examples, etc.) which could be useful.
 
 The directory 'tests' contains resources to create FT test cases. The script 'common.sh' implement
 a basic scheduler to launch a request to the server, waits for incoming activity, retrieve the
index 73b32c2..d6f4f5b 100644 (file)
@@ -2,7 +2,7 @@ ABOUT CONTENT
 -------------
 Template for xml messages (message.dtd), dictionaries (dictionary.dtd)
 and services (services.dtd) are informative, not actually required by
-process. They are located at './DTDs'. Stacks are available at './stacks'.
+process. They are located at './DTDs'. Stacks at './stack_examples'.
 There are also some stuff (hex/xml examples, etc.) which could be useful.
 
 You could adapt your 'services' configuration using stuff from dynamic
index 21e3112..17bff02 100755 (executable)
@@ -247,7 +247,7 @@ do
   ln -s ../../pre-start.sh
   cp ../../.run-one.sh run.sh
   sed -i 's/^EXE=.*/EXE=ADML-'$instance'/' run.sh
-  ln -s ../../ADML-launcher ADML-$instance
+  ln -s ../../ADML ADML-$instance
   for xml in `ls ../../services/*xml`; do ln -s $xml; done
   cd - >/dev/null
 done
index 351789d..bbe59fe 100755 (executable)
@@ -8,10 +8,10 @@ Post-installation procedure
 ===========================
 
 Execute multiple-deployment scripts by mean:
-   example/diameter/launcher/DEPLOY_setups.sh
+   example/diameter/launcher/deploy-setups.sh
 
 Or single endpoints using:
-   example/diameter/launcher/DEPLOY.sh
+   example/diameter/launcher/deploy.sh