Skip to content
Snippets Groups Projects
Commit d409f739 authored by MJB's avatar MJB
Browse files

added streaming test to incrementally spawn vlc streams, jmeter fails to...

added streaming test to incrementally spawn vlc streams, jmeter fails to launch vlc from the command line so we'll go with bash for now
parent ba1a94e8
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,8 @@ Vagrant.configure("2") do |config| ...@@ -90,7 +90,8 @@ Vagrant.configure("2") do |config|
instance_config.vm.provision :shell, :path => "scripts/clmc-service/install.sh" instance_config.vm.provision :shell, :path => "scripts/clmc-service/install.sh"
else else
# specific service install # specific service install
instance_config.vm.provision :shell, :path => "test/services/#{host["service_name"]}/install.sh" instance_config.vm.provision :shell, :path => "test/services/#{host["service_name"]}/install.sh", env: {"REPO_ROOT" => "/vagrant"}
# CLMC agent install # CLMC agent install
instance_config.vm.provision :shell, :path => "scripts/clmc-agent/install.sh", :args => "/vagrant/test/services/#{host["service_name"]}/telegraf_template.conf #{host["location"]} #{host["sfc_id"]} #{host["sfc_id_instance"]} #{host["sf_id"]} #{host["sf_id_instance"]} #{host["ipendpoint_id"]} #{host["influxdb_url"]} #{host["database_name"]}" instance_config.vm.provision :shell, :path => "scripts/clmc-agent/install.sh", :args => "/vagrant/test/services/#{host["service_name"]}/telegraf_template.conf #{host["location"]} #{host["sfc_id"]} #{host["sfc_id_instance"]} #{host["sf_id"]} #{host["sf_id_instance"]} #{host["ipendpoint_id"]} #{host["influxdb_url"]} #{host["database_name"]}"
end end
......
...@@ -12,8 +12,8 @@ hosts: ...@@ -12,8 +12,8 @@ hosts:
host: 9092 host: 9092
ip_address: "192.168.50.10" ip_address: "192.168.50.10"
- name: apache1 - name: apache1
cpus: 1 cpus: 2
memory: 2048 memory: 4096
disk: "10GB" disk: "10GB"
service_name: "apache" service_name: "apache"
forward_ports: forward_ports:
...@@ -29,8 +29,8 @@ hosts: ...@@ -29,8 +29,8 @@ hosts:
influxdb_url: "http://192.168.50.10:8086" influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics" database_name: "CLMCMetrics"
- name: apache2 - name: apache2
cpus: 1 cpus: 2
memory: 2048 memory: 4096
disk: "10GB" disk: "10GB"
service_name: "apache" service_name: "apache"
forward_ports: forward_ports:
...@@ -45,11 +45,11 @@ hosts: ...@@ -45,11 +45,11 @@ hosts:
ipendpoint_id: "adaptive_streaming_I1_apache2" ipendpoint_id: "adaptive_streaming_I1_apache2"
influxdb_url: "http://192.168.50.10:8086" influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics" database_name: "CLMCMetrics"
- name: vlc-client - name: loadtest-streaming
cpus: 1 cpus: 2
memory: 2048 memory: 4096
disk: "10GB" disk: "10GB"
service_name: "vlc" service_name: "loadtest-streaming"
forward_ports: forward_ports:
- guest: 80 - guest: 80
host: 8083 host: 8083
......
#!/bin/bash #!/bin/bash
sudo apt-get update apt-get update
sudo apt-get -y install zip python apt-get -y install zip python
wget http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip wget http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip
unzip Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip unzip Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip
...@@ -9,7 +9,7 @@ unzip Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip ...@@ -9,7 +9,7 @@ unzip Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip
mv Bento4-SDK-1-5-1-621.x86_64-unknown-linux /opt/ mv Bento4-SDK-1-5-1-621.x86_64-unknown-linux /opt/
rm Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip rm Bento4-SDK-1-5-1-621.x86_64-unknown-linux.zip
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 add-apt-repository -y ppa:jonathonf/ffmpeg-3
sudo apt-get update && sudo apt -y install ffmpeg libav-tools x264 x265 apt-get update && apt -y install ffmpeg libav-tools x264 x265
ffmpeg -version ffmpeg -version
...@@ -31,13 +31,16 @@ apt-get -y update ...@@ -31,13 +31,16 @@ apt-get -y update
# tell the oracle java installer the license has been read # tell the oracle java installer the license has been read
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" oracle-java8-installer DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" oracle-java8-installer
# install JMeter # install JMeter
wget http://apache.mirrors.nublue.co.uk//jmeter/binaries/apache-jmeter-3.3.tgz -P /tmp JMETER_VERSION="apache-jmeter-4.0"
tar -C /opt -xf /tmp/apache-jmeter-3.3.tgz wget http://mirror.vorboss.net/apache//jmeter/binaries/$JMETER_VERSION.tgz -P /tmp
rm -rf /tmp/apache-jmeter-3.3.tgz tar -C /opt -xf /tmp/$JMETER_VERSION.tgz
rm -rf /tmp/$JMETER_VERSION.tgz
# Add jmeter to the path system wide # Add jmeter to the path system wide
echo 'PATH="'$PATH':/opt/apache-jmeter-3.3/bin"' > /etc/environment #echo 'PATH="'$PATH':/opt/'$JMETER_VERSION'/bin"' > /etc/environment
echo 'PATH="'$PATH':/opt/apache-jmeter-4.0/bin"' > /etc/environment
source /etc/environment
#!/bin/bash
#/////////////////////////////////////////////////////////////////////////
#//
#// (c) University of Southampton IT Innovation Centre, 2017
#//
#// Copyright in this software belongs to University of Southampton
#// IT Innovation Centre of Gamma House, Enterprise Road,
#// Chilworth Science Park, Southampton, SO16 7NS, UK.
#//
#// This software may not be used, sold, licensed, transferred, copied
#// or reproduced in whole or in part in any manner or form or in or
#// on any media by any person other than in accordance with the terms
#// of the Licence Agreement supplied with the software, or otherwise
#// without the prior written consent of the copyright owners.
#//
#// This software is distributed WITHOUT ANY WARRANTY, without even the
#// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#// PURPOSE, except where stated in the Licence Agreement supplied with
#// the software.
#//
#// Created By : Michael Boniface
#// Created Date : 14/02/2018
#// Created for Project : FLAME
#//
#/////////////////////////////////////////////////////////////////////////
set -euo pipefail
echo "REPO_ROOT:"$REPO_ROOT
eval '$REPO_ROOT/test/services/vlc/install.sh'
eval '$REPO_ROOT/test/services/jmeter/install.sh'
# Telegraf configuration
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
# Global tags can be specified here in key="value" format.
[global_tags]
# location of the data centre
location="{{LOCATION}}"
# media service template id
sfc="{{SFC_ID}}"
# media service instance
sfc_i="{{SFC_ID_INSTANCE}}"
# service function type
sf="{{SF_ID}}"
# service function instance id
sf_i="{{SF_ID_INSTANCE}}"
# ipendpoint id aka surrogate instance
ipendpoint="{{IP_ENDPOINT_ID}}"
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will cache metric_buffer_limit metrics for each output, and will
## flush this buffer on a successful write.
metric_buffer_limit = 1000
## Flush the buffer whenever full, regardless of flush_interval.
flush_buffer_when_full = true
## Collection jitter is used to jitter the collection by a random amount.
## Each plugin will sleep for a random time within jitter before collecting.
## This can be used to avoid many plugins querying things like sysfs at the
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"
## Default flushing interval for all outputs. You shouldn't set this below
## interval. Maximum flush_interval will be flush_interval + flush_jitter
flush_interval = "10s"
## Jitter the flush interval by a random amount. This is primarily to avoid
## large write spikes for users running a large number of telegraf instances.
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
flush_jitter = "0s"
## Logging configuration:
## Run telegraf in debug mode
debug = false
## Run telegraf in quiet mode
quiet = false
## Specify the log file name. The empty string means to log to stdout.
logfile = "/var/log/telegraf/telegraf.log"
## Override default hostname, if empty use os.Hostname()
hostname = ""
###############################################################################
# OUTPUTS #
###############################################################################
# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
# The full HTTP or UDP endpoint URL for your InfluxDB instance.
# Multiple urls can be specified but it is assumed that they are part of the same
# cluster, this means that only ONE of the urls will be written to each interval.
# urls = ["udp://127.0.0.1:8089"] # UDP endpoint example
urls = ["{{INFLUXDB_URL}}"] # required
# The target database for metrics (telegraf will create it if not exists)
database = "{{DATABASE_NAME}}" # required
# Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# note: using second precision greatly helps InfluxDB compression
precision = "s"
## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
# Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
# Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512
###############################################################################
# INPUTS #
###############################################################################
# # Influx HTTP write listener
[[inputs.http_listener]]
## Address and port to host HTTP listener on
service_address = ":8186"
## timeouts
read_timeout = "10s"
write_timeout = "10s"
## HTTPS
#tls_cert= "/etc/telegraf/cert.pem"
#tls_key = "/etc/telegraf/key.pem"
## MTLS
#tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
\ No newline at end of file
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
#// #//
#///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////
sudo add-apt-repository ppa:videolan/master-daily add-apt-repository -y ppa:videolan/master-daily
sudo apt-get update apt-get update
apt-get -y install vlc apt-get -y install vlc
\ No newline at end of file
#!/bin/bash
#/////////////////////////////////////////////////////////////////////////
#//
#// (c) University of Southampton IT Innovation Centre, 2017
#//
#// Copyright in this software belongs to University of Southampton
#// IT Innovation Centre of Gamma House, Enterprise Road,
#// Chilworth Science Park, Southampton, SO16 7NS, UK.
#//
#// This software may not be used, sold, licensed, transferred, copied
#// or reproduced in whole or in part in any manner or form or in or
#// on any media by any person other than in accordance with the terms
#// of the Licence Agreement supplied with the software, or otherwise
#// without the prior written consent of the copyright owners.
#//
#// This software is distributed WITHOUT ANY WARRANTY, without even the
#// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#// PURPOSE, except where stated in the Licence Agreement supplied with
#// the software.
#//
#// Created By : Michael Boniface
#// Created Date : 13/12/2017
#// Created for Project : FLAME
#//
#/////////////////////////////////////////////////////////////////////////
# create test directories
testfolder=$(date +%Y%m%d%H%M%S)
testrundir="/vagrant/test/run"
testdir=$testrundir"/streaming/"$testfolder
echo "Test directory: "$testdir
mkdir -p "$testdir"
# run testplan
cd $testdir
# jmeter -n -LDEBUG -t /vagrant/test/streaming/testplan.jmx -l results.jtx -j jmeter.log
COUNTER=0
while [ $COUNTER -lt 20 ]; do
cvlc -Vdummy --no-audio http://192.168.50.11/test_video/stream.mpd &
sleep 1
let COUNTER=COUNTER+1
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment