-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathVagrantfile
More file actions
66 lines (54 loc) · 1.95 KB
/
Vagrantfile
File metadata and controls
66 lines (54 loc) · 1.95 KB
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
# encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# PROJECT VARIABLES
project_name = "performance"
ip_address = "192.168.100.108"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# Private networking, automatically adds entry to host's /etc/hosts
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.vm.define project_name do |node|
node.vm.hostname = project_name
node.vm.network :private_network, ip: ip_address
node.hostmanager.aliases = %w(graphite sitespeed grafana)
end
config.vm.provision :hostmanager
# Map this entire repo to /var/www/[project_name]/
# Uses NFS so it modifies your /etc/exports
config.vm.synced_folder "./provisioning/files", "/home/vagrant/provisioning-files/", type: "nfs"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
# This allows the git commands to work using host server keys
config.ssh.forward_agent = true
# To avoid stdin/tty issues
config.vm.provision "fix-no-tty", type: "shell" do |s|
s.privileged = false
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
end
config.vm.provision "shell" do |s|
s.path = "provisioning/sitespeed.sh"
s.keep_color = true
end
config.vm.provision "shell" do |s|
s.path = "provisioning/graphite.sh"
s.keep_color = true
end
config.vm.provision "shell" do |s|
s.path = "provisioning/grafana.sh"
s.keep_color = true
end
config.vm.provision "shell" do |s|
s.path = "provisioning/security.sh"
s.keep_color = true
end
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
end
end