From 7a53c32a3b5cc65bfd1922103fd7ccee4ab17aac Mon Sep 17 00:00:00 2001 From: Aleksandr Didenko Date: Mon, 20 Jun 2016 14:42:46 +0200 Subject: [PATCH] Fix networks and add some debug tools - Create two networks: public (NATed) and private (isolated) - Add some debug tools to minion nodes --- Vagrantfile | 15 ++++++++++++++- bootstrap-node.sh | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 8960345ec..d9fae2828 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -68,8 +68,21 @@ Vagrant.configure("2") do |config| domain.disk_bus = "virtio" end + # Networks and interfaces ip = "#{$private_subnet}.#{i+10}" - test_vm.vm.network :private_network, :ip => "#{ip}" + pub_ip = "#{$public_subnet}.#{i+10}" + # "public" network with nat forwarding + test_vm.vm.network :private_network, + :ip => pub_ip, + :model_type => "e1000", + :libvirt__dhcp_enabled => false, + :libvirt__forward_mode => "nat" + # "private" isolated network + test_vm.vm.network :private_network, + :ip => ip, + :model_type => "e1000", + :libvirt__dhcp_enabled => false, + :libvirt__forward_mode => "none" # Provisioning config.vm.provision "file", source: "ssh", destination: "~/ssh" diff --git a/bootstrap-node.sh b/bootstrap-node.sh index a38e10b25..811ec0320 100755 --- a/bootstrap-node.sh +++ b/bootstrap-node.sh @@ -4,7 +4,7 @@ echo node > /var/tmp/role # Packages sudo apt-get --yes update sudo apt-get --yes upgrade -sudo apt-get --yes install screen vim telnet tcpdump python-pip +sudo apt-get --yes install screen vim telnet tcpdump python-pip traceroute iperf3 nmap ethtool # Pip sudo pip install kpm