Summary of Setting Up Your Own Private App Inventor Server For Your School

#“Summary of Setting Up Your Own Private App Inventor Server For Your School”

It turns out that the setup of a private App Inventor server is easier than I thought. If you are used to Amazon EC2, it’ll be a doddle for you. The Google App Engine bit is absolutely trivial. Full MIT documentation is here.

  1. Go to appengine.google.com and sign-up with a GMail/GApps address.
  2. Create an App. This only means giving the App an name.You'll have to confirm your identity by SMS from Google. We used a variation of the name of our school as the app name so that our private App Inventor will be accessible at http://nameofourschool.appspot.com
  3. Download and install the latest Oracle/SUN JDKon your PC
  4. Download the App Engine Java SDK
  5. Unzip it to somewhere like c:\apps\appengine-java-sdk-1.6.1
  6. Download the latest App Inventor zip (currently Dec 20th 2011)
  7. Unzip
  8. Then un-gzip and un-tar theappinventor-Dec-20.tgz contained within. (Use 7-Zip for all these different archive formats if you are on a Windows PC)
  9. Navigate down into the the directory tree created by all this unzipping and copy the appinventor sub-directory you find so that it is at something like c:\apps\appinventor
  10. Now you need to setup a Build Server if you want to be able to download the Apps onto real phones. I did this on Amazon EC2
    1. Go to Amazon AWS and Sign-Up for a new account
    2. You will have to provide a Credit Card but it won't be charged
    3. You will be verified by an automated phone call
    4. Once the account is fully live, go to the AWS Console and make sure you are viewing EC2 instances in EU-West (Ireland)
    5. Create a new Amazon Linux AMI Micro 32-Bit Instance in Ireland using their new Quick Wizard. (Go for 32-bit to save hassle)
    6. This is free for a year so you don't have to worry about cost. Maybe a tenner a month after that?
    7. Grab the PEM SSH Key and do the usual messing to convert it to a Putty ppk file so that you can SSH to the instance.
    8. SSH to the instance
    9. Grab that App Inventor zip from Step 6 using wget on the EC2 instance
    10. Do all the unzipping etc again, but this time you want the other file contained within (for-BuildServer.tgz). Un-tar and un-gzip thatfor-BuildServer.tgz file
    11. I found that the OpenJDK that comes pre-configured on the Amazon Linux instances threw an error when I tried to build using it. So I installed the Oracle/SUN JDK instead
      1. Go tohttp://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html
      2. It appears Java 1.7 has issues with signing the Apps. So you have to use the older 1.6 instead
      3. Go tohttp://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html
      4. Download the 32-bit RPM bin for Linux using wget on the instance
      5. sudo sh thenameofthefile.rpm.bin
      6. sudo alternatives --install /usr/bin/java java /usr/java/latest/bin/java 1500
      7. sudo alternatives --set java /usr/java/latest/bin/java
    12. Now you can run the build server by going to the for-BuildServer directory you created in Step J above and just running./launch-buildserver
    13. In the AWS Console, Open up port 9990 in the security groups
    14. Copy the public DNS name of your server from the AWS console
  11. Now back on your Windows machine, go to c:\apps\appinventor\war\WEB-INF\appengine-web.xml
    1. Change localhost in<property name="build.server.host" value="localhost:9990" /> to the public DNS name of your build server
    2. Change<property name="use.whitelist" value="false"/> to be true
    3. Save the file
  12. Now editc:\apps\appinventor\war\whitelist and add the GMail/GApps addresses of every account that you are allowing to use this App Inventor instance. In our case that it me, 2 teachers and 30 pairs of kids, all using the school Parent's Association GApps email addresses that I created.
  13. In a Windows Command Prompt, cd to the c:\apps\appengine (or whatever) directory and then enter c:\apps\appengine-java-sdk-1.6.1\bin\appcfg.cmd -A myapplicationID update war (where myapplicationID is obviously the name you picked in Step 2)
  14. The last step builds and uploads App Inventor to App Engine and runs it. If, after a few minutes, you get a Success message then you are in business! Just go to http://nameofyourapp.appspot.com and you can login with your GMail/GApps account and start using App Inventor just like on the original Google site.
As I said in the last post, the only major concern is what number of simultaneous users will kick us out of the free tier on App Engine. Also, if lots of people are packaging Apps for phones, the Micro EC2 instance will take an age to build them. This isn't a huge issue for us as we spend 99% of our time either using the emulator or a live non-packaged debug session on the phones.

Shout if you have any questions or comments.

My next App Inventor post will be a status report on how the pilot in our school is going.

Conor O'Neill

Tech guy who likes running slowly

Bandon, Cork, Ireland https://conoroneill.net