-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
56 lines (47 loc) · 1.71 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
HOSTNAME_MACHINE = "electron.box"
# Setup root script
$baseScript = <<SCRIPT
echo "I am provisioning a #{HOSTNAME_MACHINE} machine"
cd /home/vagrant
add-apt-repository ppa:git-core/ppa
apt-get update
apt-get install -y vim git curl
echo "Installing required graphical libraries for Electron"
apt-get install -y libgtk2.0-0
apt-get install -y libxss1
apt-get install -y GConf2
apt-get install -y libnss3
# apt-get install -y libcanberra-gtk*
SCRIPT
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
hostname = HOSTNAME_MACHINE
locale = "en_GB.UTF.8"
# Box
config.vm.box = "ubuntu/trusty64"
# Shared folders
config.vm.synced_folder ".", "/vagrant", owner: "vagrant", group: "vagrant"
# Removes "stdin: is not a tty" annoyance as per
# https://github.com/SocialGeeks/vagrant-openstack/commit/d3ea0695e64ea2e905a67c1b7e12d794a1a29b97
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
#setup X-Forwarding
config.ssh.forward_x11 = true
# Provision basic tools
config.vm.provision :shell, :inline => $baseScript
config.vm.provision :shell, :path => "scripts/setup.sh", privileged: false
config.vm.provider "virtualbox" do |vb|
vb.customize [
"modifyvm", :id,
'--cableconnected1', 'on',
"--memory", 1024,
]
# Allow the creation of symlinks for nvm
# http://blog.liip.ch/archive/2012/07/25/vagrant-and-node-js-quick-tip.html
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant","1"]
end
end