From 4dcbf903d3a6ed0acf3e1cb05b4056d33fdec30e Mon Sep 17 00:00:00 2001
From: MJB <mjb@it-innovation.soton.ac.uk>
Date: Fri, 9 Feb 2018 23:03:00 +0000
Subject: [PATCH] #37 downloading files from ftp (need to zip this in future)
 rather than in git repo, updated infra to include clmc, checked basic
 reporting of metrics

---
 infra/streaming/rspec.yml              | 14 ++++++++++++++
 test/services/apache/install-apache.sh | 19 ++++++++++---------
 2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/infra/streaming/rspec.yml b/infra/streaming/rspec.yml
index 1761235..d50dfef 100644
--- a/infra/streaming/rspec.yml
+++ b/infra/streaming/rspec.yml
@@ -1,4 +1,18 @@
 hosts:
+  - name: clmc-service
+    cpus: 1
+    memory: 2048
+    disk: "10GB"
+    forward_ports:
+      - guest: 8086
+        host: 8086
+      - guest: 8888
+        host: 8888
+      - guest: 9092
+        host: 9092
+    ip_address: "192.168.50.10"
+    install_script: "install-clmc-service.sh"
+    start_script: "start-clmc-service.sh"
   - name: apache1
     cpus: 1
     memory: 2048
diff --git a/test/services/apache/install-apache.sh b/test/services/apache/install-apache.sh
index 968a5d5..e931802 100644
--- a/test/services/apache/install-apache.sh
+++ b/test/services/apache/install-apache.sh
@@ -27,25 +27,26 @@
 # Install apache
 sudo apt-get update
 sudo apt-get -y install apache2
+
 # Copy corrected configed over
   # Servername
 sudo rm /etc/apache2/apache2.conf
-sudo cp ./test/services/apache/apache2.conf /etc/apache2/apache2.conf
+sudo cp -rf ./test/services/apache/apache2.conf /etc/apache2/apache2.conf
+
   # ports
 sudo rm /etc/apache2/ports.conf
-sudo cp ./test/services/apache/ports.conf /etc/apache2/ports.conf
+sudo cp -rf ./test/services/apache/ports.conf /etc/apache2/ports.conf
+
   # ports for server
 sudo rm /etc/apache2/sites-enabled/000-default.conf
-sudo cp ./test/services/apache/000-default.conf /etc/apache2/sites-enabled/000-default.conf
+sudo cp -rf ./test/services/apache/000-default.conf /etc/apache2/sites-enabled/000-default.conf
 sudo rm /etc/apache2/sites-available/000-default.conf
-sudo cp ./test/services/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
+sudo cp -rf ./test/services/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
 
 # Copy files for MPEG-DASH testing
-sudo cp ./resources/videofile.mp4 /var/www/html/videofile.mp4
-sudo cp ./resources/stream.mpd /var/www/html/stream.mpd
-sudo cp -r ./resources/audio/* /var/www/html/audio
-sudo cp -r ./resources/video/* /var/www/html/video
-
+wget -r ftp://flame-rw:DR8ngj3ogSjd8gl@ftp.it-innovation.soton.ac.uk/media/videos/flame-video -P . 
+mv ftp.it-innovation.soton.ac.uk/media/videos/flame-video/* /var/www/html
+rm -rf ftp.it-innovation.soton.ac.uk/media/videos/flame-video
 
 sudo apachectl -k start
 sudo apachectl -k restart
-- 
GitLab