Skip to content

Instantly share code, notes, and snippets.

@gregorskii
Created April 28, 2016 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregorskii/91023db134fcfeff0cea2e6131b79d3a to your computer and use it in GitHub Desktop.
Save gregorskii/91023db134fcfeff0cea2e6131b79d3a to your computer and use it in GitHub Desktop.
# -*- 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