Cloud9 + Git == App Engine Nirvana

UPDATE: Some of the details and screenshots are out of date in this post.  Please see the latest project documentation

https://developers.google.com/appengine/docs/push-to-deploy


With the recent preview launch of Source Push to Deploy in App Engine, Google has given every App Engine app it’s own git repo.  When you push to it, Google will automatically deploy that code to App Engine.

While that is cool in and of itself, what is even more cool is that git is a standard protocol that many tools can speak.   So it is now possible to have integration with App Engine from any tool that supports git.   Including popular cloud based IDE – Cloud9.

Here are the steps for using Cloud9 + git to deploy to App Engine.

Use Cloud9 to edit a Cloud Project

Go to Cloud9 and create a new workspace (choose the “Clone from URL” option). I’d  recommend https://github.com/GoogleCloudPlatform/appengine-guestbook-python as a simple frame for an AppEngine app.

This should drop you into the Cloud9 editor
.

Setup Push to Deploy  

Create a new App Engine application at cloud.google.com/console then enable Push-to-Deploy under App Engine in the Application Settings page. Leave this tab open to note the URL for your repo.

Configure Cloud9

Run these commands in your cloud9 console (making sure to replace your email address, auth-token, and repo-url):

echo "machine code.google.com login <email-address> password <auth-token>" >> ~/.netrc
git remote add appengine <repo-url>

Note: The password in this case is the auth-token generated from the admin console, it is not your google password, never type that into a third party tool.

Make a change

Then simply edit any file in the editor, the go back to the terminal and do a commit then a push.

git commit -a -m "<commit message>"
git push appengine master

And we are done!

What we have show is a 100% cloud based development and experience for building an app engine application.  This is powered by the standard git deployment support in App Engine and Cloud9.

Happy coding!

3 thoughts on “Cloud9 + Git == App Engine Nirvana

  1. Pingback: Deploy to Google App Engine with Cloud9 and git | Cloud9 IDE | Online IDE – Your code anywhere, anytime

  2. Pingback: Orion and Google App Engine Push-to-Deploy | Orion News