Created
April 28, 2016 00:22
-
-
Save gregorskii/91023db134fcfeff0cea2e6131b79d3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Simple Provisioner | |
$script = <<SCRIPT | |
SCRIPT | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'ubuntu/trusty64' | |
config.ssh.forward_agent = true | |
# Fix for: "stdin: is not a tty" | |
# https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042 | |
config.ssh.shell = %{bash -c 'BASH_ENV=/etc/profile exec bash'} | |
memory = 1024 | |
cpus = 1 | |
config.vm.hostname = 'testbox' | |
# Required for NFS to work, pick any local IP | |
config.vm.network :private_network, ip: '192.168.50.10', hostsupdater: 'skip' | |
# Virtualbox settings | |
config.vm.provider 'virtualbox' do |vb| | |
# Customize VM settings | |
vb.customize ['modifyvm', :id, '--memory', memory] | |
vb.customize ['modifyvm', :id, '--cpus', cpus] | |
# Fix for slow external network connections | |
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] | |
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on'] | |
# Set VM name | |
vb.name = config.vm.hostname | |
end | |
# Provision MariaDB | |
config.vm.provision "shell", inline: $script | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment