Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- Vagrant.configure("2") do |config|
- required_plugins = %w(vagrant-share vagrant-vbguest vagrant-gatling-rsync)
- plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
- if not plugins_to_install.empty?
- puts "Installing plugins: #{plugins_to_install.join(' ')}"
- if system "vagrant plugin install #{plugins_to_install.join(' ')}"
- exec "vagrant #{ARGV.join(' ')}"
- else
- abort "Installation of one or more plugins has failed. Aborting."
- end
- end
- # Use the Centos7 Box from public repository
- config.vm.box = "centos/7"
- # Disable the newly added feature of generating a new SSH key
- config.ssh.insert_key = false
- # Port mapping from guest to host, as per the specifications sheet
- config.vm.network "forwarded_port", guest: 80, host: 8888
- # Temporarily disable vagrant-gatling-rsync until I sort out the bootstrap
- config.gatling.rsync_on_startup = false
- # Execute bootstrap.sh to install the applications, as per the specifications sheet
- config.vm.provision :shell, path: "bootstrap.sh"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement