-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
44 lines (38 loc) · 1.69 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "alfa" do |machine|
machine.vm.box = "hashicorp/bionic64"
machine.vm.hostname = "alfa"
machine.vm.network "forwarded_port", guest: 8686, host: 18686, host_ip: "127.0.0.1"
machine.vm.network "private_network", ip: "192.168.33.10"
machine.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
machine.vm.provision "file", source: "./build/alfa", destination: "networks"
machine.vm.provision "shell", inline: <<-SHELL
cat networks/example-network/tinc.conf | grep Name
sudo systemd-run --unit tinc-web-boot -p WorkingDirectory=`pwd` --no-block ./tinc-web-boot run --dev --headless --bind 0.0.0.0:8686
SHELL
end
config.vm.define "beta" do |machine|
machine.vm.box = "hashicorp/bionic64"
machine.vm.hostname = "beta"
machine.vm.network "forwarded_port", guest: 8686, host: 28686, host_ip: "127.0.0.1"
machine.vm.network "private_network", ip: "192.168.33.20"
machine.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
machine.vm.provision "file", source: "./build/beta", destination: "networks"
machine.vm.provision "shell", inline: <<-SHELL
cat networks/example-network/tinc.conf | grep Name
sudo systemd-run --unit tinc-web-boot -p WorkingDirectory=`pwd` --no-block ./tinc-web-boot run --dev --headless --bind 0.0.0.0:8686
SHELL
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y tinc
sudo systemctl stop tinc-web-boot || echo "not started"
SHELL
config.vm.provision "file", source: "./build/tinc-web-boot", destination: "tinc-web-boot"
end