This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
71 lines (60 loc) · 1.85 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$LOAD_PATH.unshift File.join(File.dirname(__FILE__))
begin
require 'config/vagrant'
$microcloud_endpoint = TenxEngineer.endpoint
rescue LoadError
puts
puts "Unable to load per-user Vagrant configuration file (config/vagrant)!"
puts
end
Vagrant::Config.run do |config|
# default Vagrant box - 10xeng-precise32
config.vm.box = '10xeng-precise32' # '10xeng-precise32-zfs'
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
# define ports to forward to host
#config.vm.forward_port 9001, 9101
#config.vm.forward_port 9090, 9000
config.vm.forward_port 8000, 8000
config.vm.forward_port 443, 8443
# additional shared folders
# microcloud root for hostnode
config.vm.share_folder "10xeng_root", "/var/lib/10xeng", "."
# use for hostnode CLI tool development
config.vm.share_folder "cli", "/cli", "/Users/velniukas/dev/10xlabs-hostnode"
#config.vm.share_folder "compile", "/compile", "/Users/velniukas/dev/10xlabs-compile-service"
#
# chef-solo provisioner
#
config.vm.provision :chef_solo do |chef|
# shared components
chef.cookbooks_path = ['chef_repo/cookbooks']
chef.roles_path = 'chef_repo/roles'
# per project components
chef.data_bags_path = 'data_bags'
chef.log_level = :debug
# development env specific recipes
chef.add_recipe '10xlab::development'
# guest configuration
#chef.add_role 'microcloud'
chef.add_role 'hostnode'
# override configuration
chef.json = {
# location of Microcloud endpoint
:users =>
[
{
:id => "xxx",
:key => "test-key"
}
],
:microcloud => {
:endpoint => $microcloud_endpoint,
},
# hostnode configuration
"10xeng-node" => {
:token => "no token",
:id => "default"
}
}
end
end