#/////////////////////////////////////////////////////////////////////////
#//
#// (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
#//
#/////////////////////////////////////////////////////////////////////////

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"
 
  config.vm.define "influx" do |my|
      my.vm.provider "virtualbox" do |v|
        v.customize ["modifyvm", :id, "--memory", 2048]
        v.customize ["modifyvm", :id, "--cpus", 1]
      end

      # open InfluxDB port
      config.vm.network "forwarded_port", guest: 8086, host: 8086 

      # open Chronograf port
      config.vm.network "forwarded_port", guest: 8888, host: 8888

      # open TICK Kapacitor port
      config.vm.network "forwarded_port", guest: 9092, host: 9092

      config.vm.provision :shell, :path => 'scripts/influx/install-tick-stack-vm.sh'
  end  
end