# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" HOSTNAME=`hostname -s` isLocalMode=true if HOSTNAME.strip.eql? "dbis-w65107" # puts "Server mode" isLocalMode=false else # puts "Local mode" isLocalMode=true end Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.boot_timeout = 600 # Hardware configuration config.vm.provider "virtualbox" do |v| v.name = (isLocalMode ? "isochrone-local" : "isochrone") v.cpus = 2 v.memory = 3072 end # Enable vagrant-cachier plugin if VagrantPlugins.const_defined?(:Cachier) config.cache.enable :yum end # Information about the box itself (name from vagrantcloud) config.vm.box = "jayunit100/centos7" # Setup of shared folders config.vm.synced_folder "etc/vagrant/conf", "/setup/conf" config.vm.synced_folder "etc/vagrant/img", "/setup/img" # Setup environment on startup (done using a shell script) config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", (isLocalMode ? "true" : "false")] # Network configuration config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true, id: "tomcat" config.vm.network :forwarded_port, guest: 7474, host: 7474, auto_correct: true, id: "neo4j" config.vm.network :forwarded_port, guest: 5432, host: 5432, auto_correct: true, id: "postgresql" config.vm.network :forwarded_port, guest: 80, host: 8000, auto_correct: true, id: "httpd" end