-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
35 lines (27 loc) · 837 Bytes
/
Vagrantfile
File metadata and controls
35 lines (27 loc) · 837 Bytes
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$num_instances = 2
$vm_memory = 2048
$vm_cpus = 2
Vagrant.configure("2") do |config|
config.vm.box_check_update = false
config.vm.synced_folder "./node-config", "/vagrant", type: "rsync"
(1..$num_instances).each do |i|
config.vm.define "node#{i}" do |node|
node.vm.box = "k8s-centos/7"
node.vm.hostname = "node#{i}"
node.ssh.username = 'root'
node.ssh.password = 'vagrant'
node.ssh.insert_key = 'true'
ip = "192.168.56.#{i+100}"
node.vm.network "private_network", ip: ip
node.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = $vm_memory
vb.cpus = $vm_cpus
vb.name = "node#{i}"
end
node.vm.provision "shell", path: "init-node.sh", args: [i, ip]
end
end
end