au.net.causal.maven.plugins.boxdb.db.sqlserver.Vagrantfile Maven / Gradle / Ivy
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "msabramo/mssqlserver2014express"
config.vm.network "forwarded_port", guest: 1433, host: 1433, host_ip: "localhost", id: "tcp1433"
config.vm.network "forwarded_port", guest: 3389, host: 3389, host_ip: "localhost", id: "tcp3389"
config.vm.network "forwarded_port", guest: 5985, host: 55985, host_ip: "localhost", id: "winrm"
config.vm.network "forwarded_port", guest: 5986, host: 55986, host_ip: "localhost", id: "winrm-ssl"
config.vm.network "forwarded_port", guest: 22, host: 2222, host_ip: "localhost", id: "ssh"
config.vm.define ENV['CONTAINERNAME'] do |t|
end
config.vm.provider "virtualbox" do |vb|
vb.name = ENV['CONTAINERNAME']
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
# vb.memory = "1024"
# Later versions of Vagrant (2.2.1+) need this or else they default to virtio which is not what we want
# See https://github.com/hashicorp/vagrant/issues/10416
vb.default_nic_type = nil
end
# Configure vagrant DB user to be allowed to create databases, etc.
config.vm.provision "initdb", type: "shell", inline: <<-SHELL
$app = "c:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\SQLCMD.EXE"
& $app -H localhost -b -e -i c:\\vagrant\\initdb.sql
exit $LASTEXITCODE
SHELL
end