-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
39 lines (34 loc) · 1.41 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
# -*- 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|
script = <<SCRIPT
apt-get -y update
apt-get -y install gcc rake bison git make libnl-dev
if [ ! -d /usr/local/src/mruby ]; then
git clone https://github.com/mruby/mruby/ /usr/local/src/mruby
fi
cd /usr/local/src/mruby
cp -a /vagrant/.vagrant_default.gembox /usr/local/src/mruby/mrbgems/default.gembox
SCRIPT
config.vm.define :trusty do |c|
c.vm.hostname = 'mruby-ipvs-trusty'
c.vm.synced_folder ".", "/vagrant", type: "rsync" if ENV['WERCKER']
c.vm.hostname += "-#{ENV['WERCKER_BUILD_ID']}" if ENV['WERCKER_BUILD_ID']
c.vm.provider :virtualbox do |_, override|
override.vm.box = 'ubuntu/trusty64'
config.vm.provision 'shell', inline: script
end
c.vm.provider :digital_ocean do |provider, override|
override.ssh.private_key_path = '~/.ssh/id_rsa.vagrant'
override.vm.box = 'digital_ocean'
override.vm.box_url = 'https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box'
provider.ssh_key_name = ENV['WERCKER'] ? 'vagrant/wercker/mruby-ipvs' : 'Vagrant'
provider.token = ENV['DIGITALOCEAN_TOKEN']
provider.image = 'ubuntu-14-04-x64' # ubuntu
provider.region = 'nyc3'
provider.size = '512mb'
end
end
end