forked from FreeRADIUS/www.freeradius.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
114 lines (97 loc) · 2.99 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# -*- mode: ruby -*-
# vi: set ft=ruby :
# To get the required box image and install required vagrant
# plugins, do:
#
# vagrant box add debian/stretch64
# vagrant plugin install vagrant-vbguest
#
# To build the virtual machine do
#
# vagrant up
#
# from this directory. Then you can
#
# vagrant ssh
#
# to get a shell. The web site files are all availabl in /vagrant,
# and nginx is configured to serve from /srv/www/www.freeradius.org
# (a symlink to the jekyll _site directory).
#
# Ports are forwarded so you can connect to
#
# http://localhost/
#
# on your host machine and you should be away. Or if you
#
# cd /vagrant
# jekyll serve
#
# you can also view the site on
#
# http://localhost:4000/
#
# To get rid of the virtual machine simply do
#
# vagrant destroy
#
# or you can halt it with "vagrant halt" and return later with
# "vagrant up".
# 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|
config.vm.define :frorg do |frorg|
# Set a hostname
#
frorg.vm.hostname = "frorg"
# Ruby and related components in jessie and trusty are just too
# old to work, but stretch is good.
#
frorg.vm.box = "debian/stretch64"
# Cache installed debian packages between rebuilds
#
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
frorg.vm.network "private_network", type: "dhcp"
# For nginx
#
frorg.vm.network "forwarded_port", guest: 80, host: 80, host_ip: "127.0.0.1"
frorg.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# In case "jekyll serve" is used
#
frorg.vm.network "forwarded_port", guest: 4000, host: 4000, host_ip: "127.0.0.1"
# Copy the infrastructure git repo in for reference only.
#
frorg.vm.synced_folder ".", "/vagrant", type: "nfs"
frorg.vm.synced_folder "../infrastructure", "/srv/infrastructure", type: "rsync"
frorg.vm.synced_folder "../freeradius-server", "/srv/freeradius-server", type: "rsync"
# Set memory available (though not tested in virtualbox yet)
#
frorg.vm.provider :virtualbox do |vb|
vb.memory = 1024
end
frorg.vm.provider :libvirt do |vm|
vm.memory = 1024
end
# Sort out locales
#
frorg.vm.provision "shell", inline: <<-SHELL
sed -i -e 's/# \(en_GB.UTF-8 UTF-8\)$/\1/' /etc/locale.gen
sed -i -e 's/# \(en_CA.UTF-8 UTF-8\)$/\1/' /etc/locale.gen
locale-gen
SHELL
# Everything else is provisioned with salt. The config is
# based on the live server salt configs, but dependencies
# makes it hard to actually use them so these are independent.
#
frorg.vm.provision :salt do |salt|
salt.minion_config = "_vagrant/minion"
salt.run_highstate = true
salt.install_type = "stable"
salt.verbose = true
end
end
end