6 SETUPS_DIR=../../../source/diameter/stack/setups
7 MSGDTD=../../../include/anna/diameter/codec/message.dtd
8 DCTDTD=../../../include/anna/diameter/stack/dictionary.dtd
9 BASE_PROT=commands_baseProtocol.xml
10 EXEC=./debug/example_diameter_launcher
25 # Basic launcher 'run.sh' will be created at deployment configuration:
26 [ "$1" = "b" ] && return
27 [ "$1" = "a" ] && exe=ADL-launcher
28 [ "$1" = "f" ] && { exe=ADL-ftclient ; ln -s ADL-launcher $exe ; }
34 STARTED=\`pgrep \$EXE 2>/dev/null\`
35 [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
40 ./\$EXE -cntDir counters $(for i in `cat args.txt | grep -v "^#"`; do echo -n "$i "; done)&
48 createDictionaryPaths () {
49 for i in stacks/*commands*xml
51 stacks/dependence.sh $i >/dev/null
53 if test "$stack" != "$BASE_PROT"
55 > .dictionary__${stack}
56 for j in `cat ${i}.dep`
58 echo -n "${j}," >> .dictionary__${stack}
60 echo "stacks/$BASE_PROT,stacks/${stack}" >> .dictionary__${stack}
65 ln -s .dictionary__commands_qosControl.xml .dictionary
76 echo "---------------------------------------"
77 echo "Anna Diameter Launcher (ADL) deployment"
78 echo "---------------------------------------"
80 echo "Basic checkings ..."
81 [ ! -f $EXEC ] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite."
82 [ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR)."
85 echo "Deploy one of these versions:"
87 echo " (a)dvanced version: includes burst management script and templates for different scenarios. Automatic configuration during start."
88 echo " (b)asic version: 4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
89 echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs."
91 echo "Input option [b]:"
93 [ "$option" = "" ] && option=b
96 DEPLOYMENTS_DIR=deployments/advanced
97 DPATH_dflt=$HOME/ADL-advanced
101 DEPLOYMENTS_DIR=deployments/basic
102 DPATH_dflt=$HOME/ADL-basic
106 DEPLOYMENTS_DIR=deployments/ft-client
107 DPATH_dflt=$HOME/ADL-ft-client
111 _exit "Unknown option !!"
116 echo "Input deployment path [$DPATH_dflt]:"
118 [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
119 [ -d $DPATH ] && _exit "The path '$DPATH' already exists. Remove it before continue..."
123 mkdir -p $DPATH/stacks
125 mkdir -p $DPATH/counters
126 mkdir -p $DPATH/resources
127 cp $EXEC $DPATH/ADL-launcher
128 cp -rL $DEPLOYMENTS_DIR/* $DPATH
129 cp resources/* $DPATH/resources
130 cp $SETUPS_DIR/*xml $DPATH/stacks
131 cp $SETUPS_DIR/*sh $DPATH/stacks
132 cp $SETUPS_DIR/readme.txt $DPATH/stacks
133 cp $MSGDTD $DPATH/DTDs
134 cp $DCTDTD $DPATH/DTDs
138 createRunScript $option
139 createDictionaryPaths
144 echo "Go to '$DPATH' and see README file"