Skip to content
Snippets Groups Projects
Commit 9d12aa26 authored by Rowan Powell's avatar Rowan Powell
Browse files

Merge branch 'fms-mon' of https://gitlab.it-innovation.soton.ac.uk/FLAME/flame-clmc into fms-mon

parents 90208b5f e52196f8
No related branches found
No related tags found
No related merge requests found
LICENSE 0 → 100644
Copyright (c) 2017-2018 University of Southampton IT Innovation Centre
Licence to use IT Innovation Software for carrying out the FLAME Project
DEFINITIONS
"Grant Agreement" means EC Grant Agreement 731677 — FLAME —
H2020-ICT-2016-2017/H2020-ICT-2016-1, relating to the Project
FLAME: Facility for Largescale Adaptive Media Experimentation (FLAME).
"Software" means ‘Cross Layer Management and Control’ or CLMC, and any
documentation and any error corrections provided by IT Innovation.
"IT Innovation" means the University of Southampton acting through the
IT Innovation Centre of Gamma House, Enterprise Road, Southampton SO16 7NS, UK.
"You" means any Contractor identified in the Grant Agreement.
Words defined in the Grant Agreement or in the Consortium Agreement have
the same meaning in this Licence
ACCEPTANCE
By using the Software, You accept the terms of this Licence.
INTELLECTUAL PROPERTY RIGHTS
The Software is IT Innovation Knowledge. The Software is confidential and
copyrighted. Title to the Software and all associated intellectual property
rights are retained by IT Innovation.
LICENCE
IT Innovation grants You a free non-exclusive and non-transferable licence
giving You Access Rights to the Software for carrying out the Project, as
set out in the Grant Agreement Article 31 and the Consortium Agreement
section 9.
RESTRICTIONS
This Licence specifically excludes Access Rights for Use outside the Project
as set out in the Consortium Agreement section 9. You may not assign or
transfer this Licence. You may not sublicense the Software. You may not make
copies of the Software, other than for carrying out the Project and for backup
purposes. You may not modify the Software.
LIABILITY
This Licence implies no warranty, as set out in the Consortium Agreement
section 5.
TERMINATION
This Licence is effective until the end of the Project. You may terminate
this Licence at any time by written notice to IT Innovation. This Licence
will terminate immediately without notice from IT Innovation if You fail to
comply with any provision of this Licence. Upon Termination, You must destroy
all copies of the Software.
......@@ -26,7 +26,6 @@
require 'getoptlong'
require 'yaml'
# Custom options:
# --infra <infradir>
......@@ -53,47 +52,53 @@ puts "custom config file: /infra/#{infra}/rspec.yml"
host_rspec_file = "infra/#{infra}/rspec.yml"
hosts = YAML.load_file(host_rspec_file)
# Start creating VMS using xenial64 as the base box
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
# Dynamic VMs
hosts['hosts'].each do |host|
#p host["name"]
instance_name = host["name"]
config.vm.define instance_name do |instance_config|
# Specify VM properties
# Specify VM properties
instance_config.vm.hostname = instance_name
instance_config.disksize.size = host["disk"]
instance_config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", host["memory"]]
v.customize ["modifyvm", :id, "--cpus", host["cpus"]]
end
# Configure network
# Configure network, not that we only expect 1 test to be running so we have one internal network
config.vm.network :private_network, ip: "#{host["ip_address"]}", virtualbox__intnet: "clmc-net"
# Port forwarding
puts "Forwarding the following specified ports for #{host["name"]}:"
host['forward_ports'].each do |port|
puts "Forwarding guest:#{port["guest"]} => host:#{port["host"]}"
config.vm.network "forwarded_port", guest: port["guest"], host: port["host"]
end
# Switch case added here to make clmc-service provisioning simple without having to have a complex rspec.yml file
# We only run a service installation script and the agent installation script when creating a specific service VM, not the clmc-service VM
case host
when 'clmc-service'
config.vm.provision :shell, :path => "scripts/clmc-service/#{host["install_script"]}"
config.vm.provision :shell, :path => "scripts/clmc-service/#{host["start_script"]}"
when (not 'clmc-service')
# specific service install
service_install_path = "test/services/#{host["service_name"]}/install-#{host["service_name"]}.sh"
puts "installing service script: #{service_install_path}"
config.vm.provision :shell, :path => service_install_path
# agent install
config.vm.provision :shell, :path => "scripts/clmc-agent/install-clmc-agent.sh", :args => "/vagrant/test/services/#{host["service_name"]}/telegraf_#{host["service_name"]}_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"]}"
# Port forwarding
puts "Forwarding the following specified ports for #{host["name"]}:"
host['forward_ports'].each do |port|
puts "Forwarding guest:#{port["guest"]} => host:#{port["host"]}"
config.vm.network "forwarded_port", guest: port["guest"], host: port["host"]
end
end
# Switch case added here to make clmc-service provisioning simple without having to have a complex rspec.yml file
# We only run a service installation script and the agent installation script when creating a specific service VM, not the clmc-service VM
puts "Instance name #{instance_name}:"
case instance_name
when 'clmc-service'
config.vm.provision :shell, :path => "scripts/clmc-service/#{host["install_script"]}"
config.vm.provision :shell, :path => "scripts/clmc-service/#{host["start_script"]}"
else
# specific service install
service_install_path = "test/services/#{host["service_name"]}/install-#{host["service_name"]}.sh"
puts "installing service script: #{service_install_path}"
config.vm.provision :shell, :path => service_install_path
# agent install
config.vm.provision :shell, :path => "scripts/clmc-agent/install-clmc-agent.sh", :args => "/vagrant/test/services/#{host["service_name"]}/telegraf_#{host["service_name"]}_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
end
end
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: ipendpoint1
cpus: 1
memory: 2048
disk: "10GB"
service_name: "ipendpoint"
forward_ports:
- guest: 80
host: 8081
ip_address: "192.168.50.11"
location: "DC1"
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_apache1"
influxdb_url: "http://192.168.50.10:8086"
database_name: "CLMCMetrics"
- name: ipendpoint12
cpus: 1
memory: 2048
disk: "10GB"
service_name: "ipendpoint"
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"
\ 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 : 23/01/2018
#// Created for Project : FLAME
#//
#/////////////////////////////////////////////////////////////////////////
# Install ipendpoint
# This is a dummy script as the endpoint is driven by simulation
\ No newline at end of file
# 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 = "G:/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
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