-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vagrantfile
29 lines (25 loc) · 1012 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
(0..5).each do |n|
do_autostart = n <= 2
config.vm.define "node-#{n}", autostart: do_autostart do |c|
c.vm.hostname = "node-#{n}"
c.vm.network "private_network", ip: "192.168.222.1#{n}"
c.vm.provision :shell, :path => "scripts/vagrant/setup-routes.bash"
c.vm.provision :shell, :path => "scripts/vagrant/install-docker.bash"
c.vm.provision :shell, :path => "scripts/vagrant/install-cni-plugins.bash"
c.vm.provision :shell, :path => "scripts/install-tools"
c.vm.provision :shell, :path => "scripts/install-hab"
if n == 0
c.vm.provision :shell, :path => "scripts/install-hab-sup-service"
else
c.vm.provision :shell, :path => "scripts/install-hab-sup-service", :args => "--peer 192.168.222.1#{n-1}"
end
end
end
end