Setting up an Appspot Instance to use Google Cloud Store (GCS)

You can comment on this document

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:

  1. If you are about to create an Appspot instance, and you use code from our master branch after 5/29/2015 (reference above), you should be fine. All should just work. You’re done…
  2. If you created your instance after February of 2014 you likely already have a GCS bucket, you should update your code to be based on our latest master branch. Once you deploy this code, all new objects will be written to GCS while older objects will still reside in the Blobstore (which is a problem, which we need to address, read on…).
  3. If you created your Appspot instance prior to February of 2014, you may not yet have a default GCS bucket, but you can create one from the Google App Engine console. You must be an “owner” of your application, not just a “developer.” If you are an owner, then go to the bottom of the “Application Settings” page (it is one of the links on the left hand side of the page under “Administration.” At the bottom of the Application Settings page there is a section labeled “Cloud Integration” under which there is a “Create” button. Click that button! It should then create your default GCS bucket and our latest master branch code will work. Note: If you upgrade to our latest master branch (which sets use.gcs=true in appengine-web.xml) and you do NOT have a bucket, you will get 500 errors. The App Engine log should make it clear that you don’t have a bucket!

Old Objects

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 at well).

Update (July 2015)

Google recently changed it’s 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 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.