daily pastebin goal


a guest Jan 23rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  2. Objective/Summary
  3. The Avalanche product comes with a fully-featured TCL API for Windows and Linux operating systems. Coupled with the “GUI to TCL” feature of the Windows thick client (Avalanche Commander) it’s a very powerful automation tool. The typical use case is “write a test case in the GUI, export it to TCL and execute it from a Linux Virtual Machine” (through a cron task for instance or a Continuous Integration process). This article provides a step-by-step guide on how to do just that on Spirent supported CentOS.
  5. Environment/Versions
  6. NOTE: For specific versions supported, please see the Avalanche Release Notes (DOC11034 and DOC11033).
  7. CentOS
  8. Java SE RunTime Environment 7
  9. TCL threaded binary (32-bit version)
  10. Spirent appliance/chassis or virtual platform
  11. Avalanche Commander Edition - Software and Documentation Controlled Release, <version #> for Red Hat Linux EL3/EL5 (Downloadable from Spirent Customer Service Center)
  12. Procedure
  13. Preparing the system
  14. Setting up Linux OS is self-explanatory; hence this solution article will not explain how to set up CentOS.
  15. The following step-by-step procedures explain how to set up Java SE 7, TCL, and Avalanche Linux API.
  17. 1.   First, install Java SE 7 (refer to jre-7u80-linux-i586.rpm):
  18.       [root@localhost tmp]# rpm -ivh jre-7u80-linux-i586.rpm
  20. 2.   Because Orcale JRE rpm does not register in the alternatives automatically, we need manually resister it and configure the system to use the JRE7 :
  21.       [root@localhost ~]#  update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.7.0_80/bin/java" 4
  22.       [root@localhost ~]#  update-alternatives --config java
  23.       There are 2 programs which provide 'java'.
  24.         Selection    Command
  25.       -----------------------------------------------
  26.          1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
  27.       *+ 2           /usr/java/jre1.7.0_80/bin/java
  29.       Enter to keep the current selection[+], or type selection number:
  31. 3.   Verify the installed Java version :
  32.       [root@localhost ~]# # java -version
  33.       java version "1.7.0_80"
  34.       Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
  35.       Java HotSpot(TM) Client VM (build 24.80-b11, mixed mode, sharing)
  37. 4.   Next, let's install TCL threaded binary (32-bit version) Linux (x86) and set it up.
  38.       [root@localhost ~]# tar -xvzf ActiveTcl8.
  39.       [root@localhost ~]#./ActiveTcl8. [stuff happening, use all default values]
  41. 5.   Then, add the path to the TCL interpreter in that user’s PATH environment variable in ~/.bash_profile :
  42.       [root@localhost ~]#vi ~/.bash_profile
  43.       PATH=/opt/ActiveTcl-8.5/bin:$PATH:$HOME/bin
  44.       export PATH
  47. 6.   Now, install and extract the Avalanche Linux API and move it under /opt/spirent/api :
  48.       [root@localhost ~]# tar -xvzf Layer_4_7_Auto_Linux_4.xx.tar.gz
  49.       [root@localhost ~]# mkdir /opt/spirent/
  50.       [root@localhost ~]# mkdir /opt/spirent/api
  51.       [root@localhost ~]# mv -f Layer_4_7_Auto_Linux_4.xx/Layer_4_7_Application_Linux/ /opt/spirent/api/
  53. 7.   If you are using a C100U device, you need to create a directory where to store the licenses of the load generators:
  54.       (You can skip this step if using any other platform.)
  55.       [root@localhost ~]# mkdir /opt/spirent/licenses
  57.        Make a directory where you’ll put all the tests.  
  58.        [root@localhost ~]# mkdir ~/spirent/tests
  60. 8.   Avalanche TCL scripts rely on a couple of environment variables so we also need to put them in to the user’s profile.
  61.       The first one is SPIRENT_TCLAPI_ROOT, the second one is SPIRENT_TCLAPI_LICENSEROOT.
  62.       Edit the profile again and add these lines at the end:
  63.       [root@localhost ~]#vi ~/.bash_profile
  64.       export SPIRENT_TCLAPI_ROOT=/opt/spirent/api/Layer_4_7_Application_Linux/TclAPI
  65.       export SPIRENT_TCLAPI_LICENSEROOT=/opt/spirent/licenses
  67.       Reload the profile and make sure it's working
  68.       [root@localhost ~]# source ~/.bash_profile
  69.       [root@localhost ~]# echo $PATH
  70.       /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/bench/bin:/home/bench/bin:/opt/ActiveTcl-8.5/bin
  72. 9.   Finally, we need to install the Session Manager daemon. This is a middleware that interfaces itself between the GUI/TCL scripts and the Avalanche backend.
  73.       Its main function is to ensure backward compatibility of scripts, but also to track the sessions between a front end (TCL, GUI) and the backend.
  74.       A Shell script will set everything up for you. First we need to make all the scripts executable, then run the main one.  
  75.       [root@localhost ~]# cd /opt/spirent/api/Layer_4_7_Application_Linux/service/bin/
  76.       [root@localhost bin]# cdmod +x ./*
  77.       [root@localhost bin]# ./installDaemon.sh
  78.       [root@localhost bin]# ./startDaemon.sh
  80. 10. You can confirm that everything was set up correctly if you see the daemon listening on port 9194:
  81.       [root@localhost bin]# netstat -tap | grep 9194   tcp        0      0 *:9194                      *:*                         LISTEN      10309/java
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand