-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile.template
98 lines (78 loc) · 4.3 KB
/
Vagrantfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "bento/centos-7.2"
#config.vm.box = "bento/centos-6.7"
#config.vm.box = "bento/ubuntu-16.04"
#config.vm.box = "bento/ubuntu-14.04"
#config.vm.box = "bento/debian-8.5"
#config.vm.box = "bento/debian-7.8"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
##########################################################################
# Networking / Port Forwarding
##########################################################################
# Guest VM's hostname
config.vm.hostname = "riak-test"
# SSH port
# - Only needed if you are going to run multiple Vagrant Instances of Guest VMs
#config.vm.network :forwarded_port, guest: 22, host: 4545
# Riak Ports - HTTP, HTTPS, PB
# - Only needed if you want to access Riak from your host machine
#config.vm.network :forwarded_port, guest: 8087, host: 8087
#config.vm.network :forwarded_port, guest: 10011, host: 10011
#config.vm.network :forwarded_port, guest: 8098, host: 8098
# The following is useful if you want to make your VM accessible on the local network
# You have to specify the static IP for the network and the NIC it will be using from the host machine.
#config.vm.network "public_network", ip: "192.168.29.51", bridge: 'en0: Wi-Fi (AirPort)'
##########################################################################
# File Sharing
##########################################################################
# WARNING: Avoid absolute symlinks within shared directories on the host, it causes unexpected behaviors
# Provisioning directory
config.vm.synced_folder "./", "/vagrant"
# Ansible Galaxy dev roles
# - If you need access or are developing an Ansible Galaxy role that is not available in AG, you
# can drop those here and reference them via relative symlink.
#config.vm.synced_folder "../ansible/", "/ansible"
# Code checkouts directory
# - If you want to share your code from a different directory, replace
# "../code/" with the path of where your current code is
#config.vm.synced_folder "../code/", "/home/vagrant/code", mount_options: ["dmode=777,fmode=777"]
# General files directory
# - Useful to provide access to misc files between the Host and Guest machines
# e.g. a sql dump file used to seed or backup a database on the Guest VM
#config.vm.synced_folder "../files/", "/home/vagrant/files"
##########################################################################
# Provisioning
##########################################################################
# Script that installs Ansible onto the Guest, configures the Guest as a host for Ansible,
# then executes /vagrant/provisioning/playbook.yml to provision your Guest.
# - This script is kicked off upon the initial "vagrant up" command issued on this vagrant instance
# and then only when the "vagrant provision" command is issued on this instance
smoketests = ENV['SMOKE_TESTS'] || 'kv'
extravars = ENV['EXTRA_VARS'] || ''
config.vm.provision "shell", path: "provisioning/bootstrap.sh", env: {"VAGRANT_RIAK_VERBOSE" => "true"}, args: [smoketests,extravars]
##########################################################################
# VirtualBox Guest Virtual Machine Configuaration
##########################################################################
config.vm.provider :virtualbox do |v|
# Host machine cpu cores to make available to Guest VM
v.cpus = 2
# Host machine memory to make available to Guest VM
v.memory = 2048
# Name used within VirtualBox application for this Guest VM.
# - Change in the event of conflicts (e.g. running more than one Guest VM using the same Vagrant config)
v.name = "vagrant-riak-clients"
# Enables a GUI for your Guest VM. Useful for troubleshooting.
# - The default is false
#v.gui = true
# nat
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end