
1. Support to run storage testing off provider network; 2. Support to run sotrage testing with IPv6 subnets; 3. Remove the NOVA client version restriction; 4. Update to use ubuntu 18.04 as KloudBuster base image; 5. Use config_drive to pass configs; Change-Id: Ie0753b0c6616edb13c5426c26a9e04983d330d0d
120 lines
3.1 KiB
Bash
Executable File
120 lines
3.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# script for kloudbuster
|
|
|
|
# Tune the Linux kernel for scale test
|
|
echo "* soft nofile 102400" >> /etc/security/limits.conf
|
|
echo "* hard nofile 102400" >> /etc/security/limits.conf
|
|
|
|
cat << EOF >> /etc/sysctl.conf
|
|
fs.file-max=6553550
|
|
net.core.wmem_max=8388608
|
|
net.core.wmem_default=8388608
|
|
net.core.rmem_max=33554432
|
|
net.core.rmem_default=33554432
|
|
net.core.netdev_max_backlog=100000
|
|
net.ipv4.icmp_ratelimit=0
|
|
net.ipv4.tcp_tw_recycle=1
|
|
net.ipv4.tcp_tw_reuse=1
|
|
net.ipv4.tcp_max_tw_buckets=65536
|
|
net.ipv4.tcp_fin_timeout=15
|
|
net.ipv4.tcp_max_syn_backlog=65536
|
|
net.ipv4.tcp_syncookies=1
|
|
net.ipv4.neigh.default.gc_thresh1=4096
|
|
net.ipv4.neigh.default.gc_thresh2=4096
|
|
net.ipv4.neigh.default.gc_thresh3=4096
|
|
net.ipv4.conf.all.rp_filter=0
|
|
net.ipv4.conf.all.arp_filter=0
|
|
net.ipv4.conf.default.rp_filter=0
|
|
net.ipv4.conf.default.arp_filter=0
|
|
EOF
|
|
sysctl -p
|
|
|
|
# do not autostart the redis server or the nginx server
|
|
# let the KB agent start the appropriate server (if applicable)
|
|
update-rc.d -f redis-server remove
|
|
update-rc.d -f nginx remove
|
|
|
|
# Change permission to 777 for kb_test
|
|
chmod -R 777 /kb_test
|
|
|
|
# Create nginx server root
|
|
mkdir -p /data/www
|
|
chmod -R 777 /data
|
|
|
|
# redis server should listen on all interfaces
|
|
sed -i "s/^bind 127.0.0.1 ::1/bind 0.0.0.0 ::0/g" /etc/redis/redis.conf
|
|
|
|
# if started nginx should be allowed to open more file descriptors
|
|
sed -i 's/start-stop-daemon\ --start/ulimit\ \-n\ 102400\n\t\0/g' /etc/init.d/nginx
|
|
|
|
# Auto start the KloudBuster Agent, with user-data
|
|
echo '#!/bin/bash' > /etc/rc.local
|
|
echo 'echo -e "127.0.0.1\\t`hostname`" >> /etc/hosts' >> /etc/rc.local
|
|
echo 'echo `hostname -I` `hostname` >> /etc/hosts' >> /etc/rc.local
|
|
echo 'mkdir -p /mnt/config' >> /etc/rc.local
|
|
echo 'mount /dev/disk/by-label/config-2 /mnt/config' >> /etc/rc.local
|
|
echo 'cp /mnt/config/openstack/latest/user_data /kb_test/' >> /etc/rc.local
|
|
echo 'cd /kb_test' >> /etc/rc.local
|
|
echo 'python kb_vm_agent.py &' >> /etc/rc.local
|
|
chmod +x /etc/rc.local
|
|
|
|
# =================
|
|
# KloudBuster Proxy
|
|
# =================
|
|
cd /kb_test
|
|
git clone git://github.com/openstack/kloudbuster.git
|
|
cd kloudbuster
|
|
pip install -r requirements.txt
|
|
|
|
# ======
|
|
# Client
|
|
# ======
|
|
# python redis client, HdrHistorgram_py
|
|
pip install redis hdrhistogram
|
|
|
|
# Install HdrHistorgram_c
|
|
cd /tmp
|
|
git clone git://github.com/HdrHistogram/HdrHistogram_c.git
|
|
cd HdrHistogram_c
|
|
cmake .
|
|
make install
|
|
|
|
# Install the http traffic generator
|
|
cd /tmp
|
|
git clone git://github.com/yicwang/wrk2.git
|
|
cd wrk2
|
|
make
|
|
mv wrk /usr/local/bin/wrk2
|
|
|
|
# Move the HdrHistogram library to /usr/lib
|
|
mv /usr/local/lib/libhdr_histogram.so /usr/lib/
|
|
|
|
# Install fio
|
|
cd /tmp
|
|
FIO='fio-2.16'
|
|
wget http://brick.kernel.dk/snaps/$FIO.tar.gz
|
|
tar xzf $FIO.tar.gz
|
|
cd $FIO
|
|
make
|
|
mv fio /usr/local/bin/fio
|
|
|
|
# Install nuttcp
|
|
# cd /kb_test/kloudbuster/kb_dib/elements/nuttcp
|
|
# gcc nuttcp-7.3.3.c -o nuttcp
|
|
# mv nuttcp /usr/local/bin/nuttcp
|
|
|
|
# =======
|
|
# Cleanup
|
|
# =======
|
|
# Remove HdrHistogram_c, wrk2, and fio builds
|
|
rm -rf /tmp/HdrHistogram_c
|
|
rm -rf /tmp/wrk2
|
|
rm -rf /tmp/fio
|
|
|
|
# Uninstall unneeded packages
|
|
apt-get -y --purge remove libyaml-dev libssl-dev zlib1g-dev libaio-dev python-pip python-dev build-essential cmake
|
|
apt-get -y --purge autoremove
|
|
apt-get -y install python
|
|
apt-get -y autoclean
|