From 930f417a9f6bd3b0e8640ba9ce6f1e895ff68303 Mon Sep 17 00:00:00 2001 From: Tom Staubitz Date: Fri, 30 Dec 2016 09:48:21 +0100 Subject: [PATCH] Added setup instructions for adding a host-only network adapter. This is required so that codeocean on the VM can connect back to openHPI on the host machine. --- debian_installer/setup_debian_vm.sh | 57 ++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/debian_installer/setup_debian_vm.sh b/debian_installer/setup_debian_vm.sh index 1fdb628a..a06c7484 100644 --- a/debian_installer/setup_debian_vm.sh +++ b/debian_installer/setup_debian_vm.sh @@ -78,12 +78,67 @@ debian_installer/setup_debian_7_create_tables.sh # Protocol TCP Host port 3030, guest port 3000, name CodeOcean, other left blank. # That's all! # Start Puma server on VM -# rails s -p 3000 +# rails s -p 8080 # To connect to Ruby app use #http://127.0.0.1:3030 +#The following is required so that CodeOcean can connect back to openHPI local + +# Setup a second networking interface +# 1. Host-only vboxnet0 (ip-address: 192.168.59.104) +# 2. NAT with all the portforwarding stuff as described above + +# Edit /etc/network/interfaces in Guest machine: +# 1. check for available interfaces: +# ls /sys/class/net ===> docker0 eth0 eth1 lo + +# 2. edit network configuration: +# sudoedit /etc/network/interfaces +# and add the following lines: + +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +source /etc/network/interfaces.d/* + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +# allow-hotplug eth0 +# iface eth0 inet dhcp + +#Host-only interface +auto eth0 +iface eth0 inet static + address 192.168.59.104 + netmask 255.255.255.0 + network 192.168.59.0 + broadcast 192.168.59.255 + +#NAT interface +auto eth1 +iface eth1 inet dhcp + +# See also: +# http://askubuntu.com/questions/293816/in-virtualbox-how-do-i-set-up-host-only-virtual-machines-that-can-access-the-in + +# !!!!!Attention!!!!!!!! +# Start openHPI Local as: +# http://{host.ip}:3000/ +# e.g. http://192.168.178.33:3000/ +# set LTI Provider in course as: +# http://192.168.59.104:3030/lti/launch + +# Access VBox with static IP and port-forwarding +# SSH: +# ssh -p 3022 debian@192.168.59.104 +# CodeOcean: +# http://192.168.59.104:3030 + #TODO production: # require passwd for sudo again. # cd /etc/sudoers.d