Setting up an Appspot Instance to use Google Cloud Store (GCS)
You can comment on this document
Creating an Appspot/Cloud Platform instance
Create a Cloud Platform account
Creating an application within the project
Setting up a cloud storage bucket
Running an App Inventor server
Historical information on the API transition
When you follow the information in this document, you should make sure you are signed in to only one Google account. If you are signed into multiple accounts, you might get the error "Failed to load" with a tracking number.
If you had an appspot account, it will have been migrated to Google Cloud Platform, but you still need to start the free trial.
TODO
You can now follow the instructions in How to build App Inventor from the MIT sources. The command line (no line break) to deploy a server is:
appcfg.sh -A <PROJECT-ID> --oauth2 update appinventor/appengine/build/war
You may get a permissions error if you recently connected to App Engine with a different Google account. To force re-authentication:
appcfg.sh -A <PROJECT-ID> --no_cookies --oauth2 update appinventor/appengine/build/war
If using Google Cloud SDK, you will need to run the following command:
gcloud app deploy --project=<PROJECT-ID> --version=1 \ appengine/build/appengine-web.xml
Effective May 20, 2015 newly created Appspot instances may not use the “files” API. Unfortunately, until that date, the files API was how we accessed the Blobstore from App Engine. By default, when you installed from the “master” branch, App Inventor was configured to use Blobstore via the files API.
Starting May 20, the supported alternative is to use the Google Cloud Store (GCS) instead of the Blobstore.
The App Inventor master branch as of 5/29/2015 (this commit) supports the use of GCS. Every Appspot instance created since around the end of February 2014 has a GCS “bucket” created automatically for it. We will now use this bucket by default.
You may find yourself in one of three situations:
We are currently working on code to migrate old objects from the blobstore to the GCS bucket. We’ll make an announcement on the Open Source group when it is done (and update this document as well).
Update (July 2015)
Google recently changed its policy and now requires you to start a free trial with Google App Engine before you’re allowed to create a GCS bucket. To create a bucket, first navigate to https://console.developers.google.com/project and select your Appspot project. Then, in the sidebar, select Storage > Cloud Storage > Browser. On this page you should see a link to start your free trial on Appspot. Once you’ve finished signing up, navigate back to the “Browser” page. You should now see a button that says “Create Bucket”. Click it to create your default GCS bucket.
Modify the end of components/src/com/google/appinventor/components/common/YaVersion.java to set the following variables:
Set COMPANION_UPDATE_URL = "/companions/MITAI2Companion.asc"
Set COMPANION_UPDATE_URL1 = "/companions/MITAI2Companion.apk"
Set COMPANION_UPDATE_EMULATOR_URL = "/companions/Emulator.asc"
Run the following commands from the appinventor directory:
appinventor$ mkdir -p docs/companions/
appinventor$ ant PlayApp PlayAppExtras Emulator # builds the companion variants
appinventor$ cp build/buildserver/MITAI2Companion-full.apk docs/companions/MITAI2Companion.apk
appinventor$ openssl base64 < build/buildserver/MITAI2Companion-full.apk | tr -d '\n' > docs/companions/MITAI2Companion.asc
appinventor$ openssl base64 < build/buildserver/Emulator.apk | tr -d '\n' > docs/companions/Emulator.asc
appinventor$ ant noplay # builds the appengine package