-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
22 lines (19 loc) · 845 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
config.ssh.insert_key = false
config.ssh.private_key_path = "~/.vagrant.d/insecure_private_key"
config.vm.provision "file", source: "~/.vagrant.d/insecure_private_key", destination: "/home/vagrant/.ssh/id_rsa"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
chmod 600 $HOME/.ssh/id_rsa
SHELL
config.vm.define "calico-node1" do |node|
node.vm.network :private_network, ip: "192.168.22.10"
node.vm.network :forwarded_port, guest: 22, host: 2210, host_ip: '127.0.0.1', id: "ssh"
end
config.vm.define "calico-node2" do |node|
node.vm.network :private_network, ip: "192.168.22.11"
node.vm.network :forwarded_port, guest: 22, host: 2211, host_ip: '127.0.0.1', id: "ssh"
end
end