diff --git a/infra/streaming/rspec.yml b/infra/streaming/rspec.yml index 8cbcda904a502387f9d9e95029e0c3d3132558fe..fa428cc6b989d8ffa672a76011df5f6191caa253 100644 --- a/infra/streaming/rspec.yml +++ b/infra/streaming/rspec.yml @@ -11,11 +11,11 @@ hosts: - guest: 9092 host: 9092 ip_address: "192.168.50.10" - - name: apache1 - cpus: 2 - memory: 4096 + - name: nginx1 + cpus: 1 + memory: 2048 disk: "10GB" - service_name: "apache" + service_name: "nginx" forward_ports: - guest: 80 host: 8081 @@ -25,14 +25,14 @@ hosts: sfc_id_instance: "MS_I1" sf_id: "adaptive_streaming" sf_id_instance: "adaptive_streaming_I1" - ipendpoint_id: "adaptive_streaming_I1_apache1" + ipendpoint_id: "adaptive_streaming_I1_nginx1" influxdb_url: "http://192.168.50.10:8086" database_name: "CLMCMetrics" - - name: apache2 - cpus: 2 - memory: 4096 + - name: nginx2 + cpus: 1 + memory: 2048 disk: "10GB" - service_name: "apache" + service_name: "nginx" forward_ports: - guest: 80 host: 8082 @@ -42,9 +42,9 @@ hosts: sfc_id_instance: "MS_I1" sf_id: "adaptive_streaming" sf_id_instance: "adaptive_streaming_I1" - ipendpoint_id: "adaptive_streaming_I1_apache2" + ipendpoint_id: "adaptive_streaming_I1_nginx2" influxdb_url: "http://192.168.50.10:8086" - database_name: "CLMCMetrics" + database_name: "CLMCMetrics" - name: loadtest-streaming cpus: 2 memory: 4096 diff --git a/test/services/apache/install.sh b/test/services/apache/install.sh index 8ae01814bc269ae55794c5c941899229ced68ec5..8b57de8ae44decee49b7d016066d614a8625d599 100755 --- a/test/services/apache/install.sh +++ b/test/services/apache/install.sh @@ -35,7 +35,7 @@ DEST_FILE=$DEST_DIR"/"$TEST_VIDEO_ARCHIVE # Copy files for MPEG-DASH testing curl "ftp://ftp.it-innovation.soton.ac.uk/testdata/video/"$TEST_VIDEO_ARCHIVE --user flame-rw:DR8ngj3ogSjd8gl -o $DEST_FILE -tar -xvf $DEST_FILE -C /var/www/html/ +tar -xvf $DEST_FILE -C $DEST_DIR rm -rf $DEST_FILE mv $DEST_DIR"/"$TEST_VIDEO $DEST_DIR"/"test_video diff --git a/test/services/nginx/install.sh b/test/services/nginx/install.sh index 318996f4ad6e3804bf5a7cf51febe59586a1af8a..bdc349a59acd56b0e42bd40d4e8b4611fbbc455b 100755 --- a/test/services/nginx/install.sh +++ b/test/services/nginx/install.sh @@ -25,28 +25,25 @@ #///////////////////////////////////////////////////////////////////////// # Install nginx -sudo apt-get update -yes Y | sudo apt-get install nginx +apt-get update +yes Y | apt-get install nginx # Need to set up basic stats as this not configured by default # http://nginx.org/en/docs/http/ngx_http_stub_status_module.html -echo "Coping new config file into nginx" -cd /vagrant -sudo rm ../etc/nginx/nginx.conf -sudo cp test/services/nginx/nginx.conf ../etc/nginx/nginx.conf -#cat test/services/nginx/nginx.conf > ../etc/nginx/nginx.conf +cp -rf $REPO_ROOT/test/services/nginx/nginx.conf /etc/nginx/nginx.conf +nginx -s reload +systemctl start nginx +# Copy in the test video, this needs to be part of a test set up and not here. -sudo nginx -s reload +TEST_VIDEO="20180212104221flame-project-full.mp4" +TEST_VIDEO_ARCHIVE=$TEST_VIDEO".gz" +DEST_DIR="/usr/share/nginx/html" +DEST_FILE=$DEST_DIR"/"$TEST_VIDEO_ARCHIVE -# start NGINX -sudo systemctl start nginx -# --with-http_stub_status_module -#nginx -V 2>&1 | grep -o with-http_stub_status_module -#/vagrant/../etc/nginx/nginx.config +# Copy files for MPEG-DASH testing +curl "ftp://ftp.it-innovation.soton.ac.uk/testdata/video/"$TEST_VIDEO_ARCHIVE --user flame-rw:DR8ngj3ogSjd8gl -o $DEST_FILE +tar -xvf $DEST_FILE -C $DEST_DIR -# systemctl status telegraf -l - - - -# dpkg -l | grep -c nginx \ No newline at end of file +rm -rf $DEST_FILE +mv $DEST_DIR"/"$TEST_VIDEO $DEST_DIR"/"test_video \ No newline at end of file diff --git a/test/services/nginx/telegraf_template.conf b/test/services/nginx/telegraf_template.conf index afd25312a419bf358bb8a4dfc57c1193245182ee..8c059c3d79e126fc73716f86fce026270579c190 100644 --- a/test/services/nginx/telegraf_template.conf +++ b/test/services/nginx/telegraf_template.conf @@ -94,6 +94,67 @@ ############################################################################### # INPUTS # ############################################################################### +# # Read metrics about network interface usage + [[inputs.net]] +# ## By default, telegraf gathers stats from any up interface (excluding loopback) +# ## Setting interfaces will tell it to gather these explicit interfaces, +# ## regardless of status. +# ## +# # interfaces = ["eth0"] + +# Read metrics about cpu usage +[[inputs.cpu]] + ## Whether to report per-cpu stats or not + percpu = true + ## Whether to report total system cpu stats or not + totalcpu = true + ## If true, collect raw CPU time metrics. + collect_cpu_time = false + ## If true, compute and report the sum of all non-idle CPU states. + #report_active = false + + +# Read metrics about disk usage by mount point +[[inputs.disk]] + ## By default, telegraf gather stats for all mountpoints. + ## Setting mountpoints will restrict the stats to the specified mountpoints. + # mount_points = ["/"] + + ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually + ## present on /run, /var/run, /dev/shm or /dev). + ignore_fs = ["tmpfs", "devtmpfs", "devfs"] + + +# Read metrics about disk IO by device +[[inputs.diskio]] + ## By default, telegraf will gather stats for all devices including + ## disk partitions. + ## Setting devices will restrict the stats to the specified devices. + # devices = ["sda", "sdb"] + ## Uncomment the following line if you need disk serial numbers. + # skip_serial_number = false + # + ## On systems which support it, device metadata can be added in the form of + ## tags. + ## Currently only Linux is supported via udev properties. You can view + ## available properties for a device by running: + ## 'udevadm info -q property -n /dev/sda' + # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"] + # + ## Using the same metadata source as device_tags, you can also customize the + ## name of the device via templates. + ## The 'name_templates' parameter is a list of templates to try and apply to + ## the device. The template may contain variables in the form of '$PROPERTY' or + ## '${PROPERTY}'. The first template which does not contain any variables not + ## present for the device is used as the device name tag. + ## The typical use case is for LVM volumes, to get the VG/LV name instead of + ## the near-meaningless DM-0 name. + # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"] + +# Read metrics about memory usage +[[inputs.mem]] + # no configuration + # # Influx HTTP write listener [[inputs.http_listener]] ## Address and port to host HTTP listener on