Deploy to Google App Engine with Cloud9 and git
29 Jul 2013
Last week Brad Abrams wrote a great article about using Cloud9 IDE and git to deploy to Google App Engine. We loved his post, so with permission, we’re reposting it in full below. Please see Cloud9 + Git == App Engine Nirvana for his original article.
Cloud9 + Git == App Engine Nirvana
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
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 password PASSWORD” >> ~/.netrc
git remote add appengine REPO
Note: The email in this case is the mail address you use to login to your Google App Engine account and the password is the auth-token generated from the admin console, it is not your google password, never type that into a third party tool. ‘REPO’ is the repository URL generated before.
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 “”
git push appengine master
And we are done!
What we have shown 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.
P.S. Read more about deployment from Cloud9 on our documentation site: Deploying Your Code.