A couple of month ago, Spirent released Avalanche Anywhere (as well as STC Anywhere). The goal of these products is to give our customers the ability to put the Avalanche (or STC) backend on any Linux distribution. For support purposes we officially support Red Hat Enterprise Linux (RHEL) and Fedora.
This blog isn’t here for me to make sales pitch, but I will say that it’s great being able to put Avalanche… well… anywhere! Our marketing team is so good at naming things it’s unsettling!
For this article we’ll install Avalanche Anywhere (AvA) on CentOS 6.3. I’m using CentOS because it’s basically RHEL only free.
Installing CentOS itself is outside the scope of this article. This video right here should be more than enough. Linux got confusingly easy to install in the last few years (hey, don’t laugh Systems people, this is a Networks people blog!).
Install CentOS (6.3 minimal install is used in this document). The system needs at least two NIC, one for admin of Anywhere (this can be the same as the main IP of the system), one for load generation (this one should be dedicated to load generation). You need at least 2 GB of RAM (4 GB is recommended) and one core.
The very first thing to do is to disable SE Linux by editing its configuration:
[root@ava-1 /]# vi /etc/selinux/config
In that file, set its mode to « disabled » like here:
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
(Knowing how to use vi is outside the scope of this article)
We also have to disable iptables. We can do it temporarily like so (recommended):
[root@ava-1 ~]# /etc/init.d/iptables stop
Or permanently (not recommended, unless the system will be dedicated to load testing):
[root@ava-1 ~]# chkconfig iptables off
Once this is installed, several extra packages need to be added:
Note: If you didn’t install CentOS minimal, some of these packages are probably already present on the system.
- kernel-devel or kernel-PAE-devel if you use a Physical Address Extension-enabled Kernel (if you’re not sure, you probably don’t use that). If your OS is sitting in a Xen-like VM, you will need kernel-xen-devel instead.
First we’ll install the packages. Type this:
[root@ava-1 ~]# yum install gcc make openssh-clients expect xinetd ntp glibc.i686 libstdc++.i686 perl
This will check for all these packages and their dependencies. The final summary should look like something akin to this:
================================================================= Transaction Summary ================================================================= Install 27 Package(s) Upgrade 2 Package(s) Total download size: 56 M Is this ok [y/N]:y
Once this is installed, we can move on to install the kernel-devel module.
First upgrade the current kernel:
[root@ava-1 ~]# yum upgrade kernel
Then reboot (“reboot”) and install the kernel-devel:
[root@ava-1 ~]# yum install kernel-devel
Activating Avalanche Anywhere
We now need to transfer the Avalanche Anywhere zip file to the server. There are many ways to do this but the easiest is to do this over SSH. FileZilla allows just that – FTP over SSH – and you don’t need to set anything else to work:
Transfer the file (the name should be something like “ava-4.10.2196-fs-1.1.tgz”), to the /root directory for instance if you are logged in as root as in the example. Once the file is transferred we need to make it executable:
[root@ava-1 ~]# chmod +x ava-4.10.2196-fs-1.1.tgz.run
And then execute it.
[root@ava-1 ~]# ./ava-4.10.2196-fs-1.1.tgz.run Verifying archive integrity... All good. Uncompressing build/il/packages/fsimg/stca-4.10.2196-fs-1.1.tgz.... Install STC Anywhere in your PC Stopping xinetd: [ OK ] Starting xinetd: [ OK ] Done Please run admin.py before your first running. [root@ava-1 ~]#
Avalanche Anywhere is now installed on the OS!
Configuring Avalanche Anywhere
We now need to configure it by running the admin.py script:
[root@ava-1 /]# /mnt/spirent/chassis/bin/admin.py Do you want to reconfigure the admin.conf? y Current config: DEVICE=admin0 ADDR_MODE=dhcp IPADDR=10.2.20.85 NETMASK=255.255.0.0 GATEWAY=10.2.0.1 HOSTNAME= LSERVER= NTPSERVER=10.100.15.140 NPORTGROUPS=1 NPORTS_PER_GROUP=1 DRIVERMODE=sockets PORT_SPEED=100M PROMISC=on Please input license server address: 10.7.2.250 Please input ntp server address: [10.100.15.140] Please input port speed (100M/1G/10G): [100M]1G Please input the port group size (1~1):  Here is the list of ethernet interfaces: 1) eth0 2) eth1 Please choose the interface for admin (1-2): 1 1) eth0 2) eth1 Please choose the interface for test port No.1 (1-2): 2 Do you want to reconfigure the stca cpu affinity?n Please restart stca to make the change take effect. [root@ava-1 /]#
And now we just need to start stca to turn the daemon on!
[root@ava-2 ~]# stca start Please make sure firewall (iptables) is disables. Install sasm.ko ...OK <quite a lot of stuff here, including error messages you can discard> [root@ava-2 ~]#
That’s about it really! Now we simply need to add this newly added load generator to our GUI (“Administration/Spirent Test Center Chassis”):
Now to use this backend, it’s same as usual: reserve it and add it into a test. The nice thing is that since the test cases are 100% compatible between any Avalanche load generator (Virtual, STC-based, Appliance, etc.), using Anywhere can be a practical way to design tests on a local PC (or remote VMs). Then you only need to pass the test case onto the team or person that’ll do the actual Big Bad Load Test – and modify the load appropriately.