Announcement

Collapse
No announcement yet.

Simple method for hosting multiple users on a single FTC App Inventor host

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple method for hosting multiple users on a single FTC App Inventor host

    Hello App Inventor,

    We recently figured out an easy way to serve a copy of App Inventor from one computer to multiple clients on the same network. This reduces the friction between us and coding, which is great. Some of our team members also had no alternatives as they use Chromebooks. We thought it would be reasonable to share our method.

    What we did is as follows:

    1. Install VirtualBox on a suitable computer with a reasonably fast WiFi card. Import the latest .ova appliance and set it up as per the instructions. Make sure it works in the default mode. Then, turn off the VM and go to its network settings in VirtualBox. Disable everything but Adapter 1, and change it to "bridged adapter." Make sure the name of the adapter is the name of your wireless card.

    2. Turn on the VM, and replace instances of "eth1" to "eth0" in the file ip50 in /usr/bin in the VM; this lets you still see the correct IP. Credit for this goes to dmssargent (http://ftcforum.usfirst.org/showthre...ntor-Appliance).

    3. Use an Android phone's hotspot mode to create a small-area LAN, named something like appInventorWiFi. Lock it with a WPA2 password. We found that it's possible to use the hotspot mode with mobile data off, but data has to be on while the hotspot is being enabled. Alternatively, you could use a separate application on the host computer, but we found this was the fastest method. The phone we used had no problem routing ~10 users.

    4. Connect the hosting computer to the hotspot, check that the IP address on the VM's lower bar is something like 192.168.43.236 and port is 8888. If the host OS asks, make sure that VirtualBox is allowed to communicate on public networks.

    5. Have your team members join appInventorWiFi and go to 192.168.43.236:8888 in their browsers. Ensure that they use unique usernames so they don't edit each others' files directly. Before you finish meetings, instruct them to download their project files (.aia) and rename them to something meaningful so they can edit them at home or somewhere else. They should remain stored on the VM essentially permanently.


    If the webpage doesn't work, or the VM shows something like 10.0.2.15 on the taskbar, then you should restart the VM while on the appInventorWiFi network or check your adapter settings.

    As a note to Tom Eng, your work is greatly appreciated. It would be good to know where userfiles in the server are stored in the VM, so we can copy them out and restore them whenever there's an update to the .ova.

    Best of luck,

    Paul H
    GHS Robotics

  • #2
    I spy a mysterious file at "/home/ftc/ai/appinventor-sources/appinventor/appengine/build/war/WEB-INF/appengine-generated," see if you can find the user keystores.

    Comment


    • #3
      Hosting App Inventor

      Originally posted by ghsrobotics View Post
      Hello App Inventor,

      2. Turn on the VM, and replace instances of "eth1" to "eth0" in the file ip50 in /usr/bin in the VM; this lets you still see the correct IP. Credit for this goes to dmssargent (http://ftcforum.usfirst.org/showthre...ntor-Appliance).

      GHS Robotics
      Thank you so much for posting these instructions! Can you clarify step 2 a bit? I found the file in the File Manager, opened it with Mousepad, and replaced one instance of "eth1" with "eth0". However, when I try to save, it says "Permission Denied". Is there a different way to do this?

      Thanks for all your help!
      Norm
      Team 5431

      Comment


      • #4
        You need to go into an elevated account to do that. Open nano or vim or mouse pad by prefixing here command "sudo." Sorry to be so brief, but tell me if you need a more in depth version, or you should be able to Google the command to help you.

        Relevant XKCD https://xkcd.com/149/:

        Comment

        Working...
        X