diff --git a/infra/streaming/rspec.yml b/infra/streaming/rspec.yml index 752d41a7805174936c22021e9cef478e16e09610..b83a5ba5065feaa55fa1c5ac500fbc2148280065 100644 --- a/infra/streaming/rspec.yml +++ b/infra/streaming/rspec.yml @@ -30,14 +30,31 @@ hosts: ipendpoint_id: "adaptive_streaming_I1_apache1" influxdb_url: "http://192.168.50.10:8086" database_name: "CLMCMetrics" + - name: apache2 + cpus: 1 + memory: 2048 + disk: "10GB" + service_name: "apache" + forward_ports: + - guest: 80 + host: 8082 + ip_address: "192.168.50.12" + location: "DC2" + sfc_id: "MS_Template_1" + sfc_id_instance: "MS_I1" + sf_id: "adaptive_streaming" + sf_id_instance: "adaptive_streaming_I1" + ipendpoint_id: "adaptive_streaming_I1_apache2" + influxdb_url: "http://192.168.50.10:8086" + database_name: "CLMCMetrics" - name: vlc-client cpus: 1 memory: 2048 disk: "10GB" service_name: "vlc" forward_ports: - - guest: 81 - host: 8082 + - guest: 80 + host: 8083 ip_address: "192.168.50.12" location: "DC1" sfc_id: "MS_Template_1" diff --git a/test/services/apache/telegraf_apache_template.conf b/test/services/apache/telegraf_apache_template.conf index a4c3ff82608498906e11d0a1ee77c2110d70cec0..be8d9f3321fecc13ee7562d001e498bf307f8d85 100644 --- a/test/services/apache/telegraf_apache_template.conf +++ b/test/services/apache/telegraf_apache_template.conf @@ -130,4 +130,25 @@ # ssl_cert = "/etc/telegraf/cert.pem" # ssl_key = "/etc/telegraf/key.pem" ## Use SSL but skip chain & host verification - # insecure_skip_verify = false \ No newline at end of file + # insecure_skip_verify = false + +[[inputs.net_response]] + ## Protocol, must be "tcp" or "udp" + ## NOTE: because the "udp" protocol does not respond to requests, it requires + ## a send/expect string pair (see below). + protocol = "tcp" + ## Server address (default localhost) + address = "localhost:80" + ## Set timeout + timeout = "1s" + + ## Set read timeout (only used if expecting a response) + read_timeout = "1s" + + ## The following options are required for UDP checks. For TCP, they are + ## optional. The plugin will send the given string to the server and then + ## expect to receive the given 'expect' string back. + ## string sent to the server + # send = "ssh" + ## expected string in answer + # expect = "ssh" \ No newline at end of file diff --git a/test/services/jmeter/install-jmeter.sh b/test/services/jmeter/install-jmeter.sh new file mode 100644 index 0000000000000000000000000000000000000000..82bda7d4aaa3a0cfc88f94ebedcfc07d2cc243af --- /dev/null +++ b/test/services/jmeter/install-jmeter.sh @@ -0,0 +1,43 @@ +#!/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 : 12/12/2017 +#// Created for Project : FLAME +#// +#///////////////////////////////////////////////////////////////////////// + +# install java 8 +add-apt-repository -y ppa:webupd8team/java +apt-get -y update + +# 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 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 + +# install JMeter +wget http://apache.mirrors.nublue.co.uk//jmeter/binaries/apache-jmeter-3.3.tgz -P /tmp +tar -C /opt -xf /tmp/apache-jmeter-3.3.tgz +rm -rf /tmp/apache-jmeter-3.3.tgz + +# Add jmeter to the path system wide +echo 'PATH="'$PATH':/opt/apache-jmeter-3.3/bin"' > /etc/environment diff --git a/test/streaming/manual.md b/test/streaming/manual.md index b2e6654206267db5c27604164a193d9d6581ab2a..547d43c9a09fac1199c668b0368030e9c48c504f 100644 --- a/test/streaming/manual.md +++ b/test/streaming/manual.md @@ -23,14 +23,14 @@ # CLMC Adaptive Streaming Test -This test streamings mpeg-dash video using the apache server monitored by Telegraf configured with a default apache plugin. The data is stored in the `clmc-service` using database `CLMCMetrics` and measurement `apache` +This test streams mpeg-dash video using the two apache servers monitored by Telegraf configured with a default apache plugin and a net_response plugin. The data is stored in the `clmc-service` using database `CLMCMetrics` and measurements `apache` and `net_response` The following command brings up the services `vagrant --infra=streaming up` * clmc-service: configured with influx, kapacitor, chornograf -* apache1: configured with apache and a test video located at http://192.168.50.11:80/test-video/stream.mpd on the internal vbox network adn at http://localhost:8890/test-video/stream.mpd if accessing from the host machine +* apache1@DC1, apache2@DC2: configured with apache and a test video located at http://192.168.50.11:80/test-video/stream.mpd on the internal vbox network adn at http://localhost:8890/test-video/stream.mpd if accessing from the host machine ## Manual test on Windows @@ -45,7 +45,7 @@ Start the VLC Player The test video is the FLAME project video and it can be viewed at the following location. -`Enter the network URL: http://localhost:8890/test-video/stream.mpd` +`Enter the network URL: http://localhost:8890/test-video/stream.mpd for apache1 server` The video should play.