browbeat/utils/shaker-external.sh
Dan Macpherson 929f2eb645 Updating netperf-2.7.0.tar.gz tar URL for CentOS template
The netperf-2.7.0.tar.gz file from ftp.netperf.org is no longer
available. As a result, netperf doesn't build successfully on
the external shaker server, which causes CentOS-based Shaker
tests to fail. All netperf source and tar files have been migrated
to github. This fix changes the URL for netperf-2.7.0 to the
appropriate tar file on github. In addition, the parent directory
within the tar file has changed to "netperf-netperf-2.7.0".

A similar commit has been filed for the shaker image:
https://review.openstack.org/#/c/482177/

Change-Id: Ib7db0a0e7c5cbce7f6674b341b71aa38bbd24e24
2017-07-11 01:18:25 +10:00

50 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Run as root to setup a shaker-server to run external network tests with
yum install -y epel-release
yum install -y wget iperf iperf3 gcc gcc-c++ python-devel screen zeromq zeromq-devel
wget https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.tar.gz
tar xvzf netperf-2.7.0.tar.gz
pushd netperf-netperf-2.7.0
./configure --enable-demo=yes
make
make install
popd
easy_install pip
pip install pbr flent pyshaker-agent
cat<<'EOF' >> /etc/systemd/system/iperf.service
[Unit]
Description=iperf Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/iperf -s
[Install]
WantedBy=multi-user.target
EOF
cat<<'EOF' >> /etc/systemd/system/iperf3.service
[Unit]
Description=iperf3 Service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/iperf3 -s
[Install]
WantedBy=multi-user.target
EOF
cat<<'EOF' >> /etc/systemd/system/netperf.service
[Unit]
Description="Netperf netserver daemon"
After=network.target
[Service]
ExecStart=/usr/local/bin/netserver -D
[Install]
WantedBy=multi-user.target
EOF
systemctl start iperf
systemctl enable iperf
systemctl start iperf3
systemctl enable iperf3
systemctl start netperf
systemctl enable netperf