Created
March 31, 2022 09:22
-
-
Save double-p/9a3c5cf20e1cacd565f001e6886fdd68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the MYTINK_BRIDGEDEV as it comes from 'VBoxManage list bridgedifs|grep USB' e.g. | |
export MYTINK_BRIDGEDEV="en13: APPLE USB Ethernet Adapter" | |
diff --git deploy/compose/.env deploy/compose/.env | |
index 3ee4f7c..4ce5fa7 100644 | |
--- deploy/compose/.env | |
+++ deploy/compose/.env | |
@@ -9,5 +9,5 @@ TINKERBELL_HARDWARE_MANIFEST=/manifests/hardware/hardware.json | |
TINKERBELL_TEMPLATE_MANIFEST=/manifests/template/ubuntu.yaml | |
TINKERBELL_CLIENT_IP=192.168.56.43 | |
-TINKERBELL_CLIENT_MAC=08:00:27:9e:f5:3a | |
+TINKERBELL_CLIENT_MAC=0c:c4:7a:df:31:d4 | |
TINKERBELL_HOST_IP=192.168.56.4 | |
diff --git deploy/compose/create-tink-records/manifests/template/ubuntu.yaml deploy/compose/create-tink-records/manifests/template/ubuntu.yaml | |
index 0b50bc9..cdb7ea4 100644 | |
--- deploy/compose/create-tink-records/manifests/template/ubuntu.yaml | |
+++ deploy/compose/create-tink-records/manifests/template/ubuntu.yaml | |
@@ -74,9 +74,14 @@ tasks: | |
renderer: networkd | |
ethernets: | |
id0: | |
+ routes: | |
+ - to: 0.0.0.0/0 | |
+ via: 192.168.56.4 | |
match: | |
- name: en* | |
+ name: eno1 | |
dhcp4: true | |
+ dhcp4-overrides: | |
+ use-routes: false | |
UID: 0 | |
GID: 0 | |
MODE: 0644 | |
diff --git deploy/vagrant/Vagrantfile deploy/vagrant/Vagrantfile | |
index 52a0883..17c1da4 100644 | |
--- deploy/vagrant/Vagrantfile | |
+++ deploy/vagrant/Vagrantfile | |
@@ -18,7 +18,7 @@ Vagrant.configure("2") do |config| | |
config.vm.define "provisioner" do |provisioner| | |
provisioner.vm.box = "generic/ubuntu2004" | |
provisioner.vm.synced_folder "../compose/", "/vagrant/compose/" | |
- provisioner.vm.network "private_network", ip: PROVISIONER_IP, | |
+ provisioner.vm.network "public_network", ip: PROVISIONER_IP, bridge: ENV['MYTINK_BRIDGEDEV'], | |
libvirt__network_name: "tink_network", | |
libvirt__host_ip: "192.168.56.1", | |
libvirt__netmask: "255.255.255.0", | |
@@ -77,6 +77,13 @@ Vagrant.configure("2") do |config| | |
compose_version: "1.29.2", | |
yml: "/vagrant/compose/docker-compose.yml", | |
run: "always" | |
+ | |
+ provisioner.vm.provision "shell", name: "iptables", inline: <<-SCRIPT.gsub(/^ {6}/, "") | |
+ set -x | |
+ /usr/sbin/iptables --policy FORWARD ACCEPT | |
+ /usr/sbin/iptables -t nat -A POSTROUTING -s #{MACHINE1_IP} -j MASQUERADE | |
+ SCRIPT | |
+ | |
end | |
config.vm.define :machine1, autostart: false do |machine1| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment