Cloud World

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 25 July 2013

Google App Engine: Hello World using Push-to-Deploy

Posted on 14:35 by Unknown
Ever wished you could deploy to Google App Engine with the same standard tools you use to version your code? Now you can. With the Push-to-Deploy feature you can get your code onto App Engine using git and bypassing the SDK. Here is a quick example on how to clone a sample app from an existing public repository and deploy it as your own App Engine application.



Prerequisites: If you don’t have the git tool installed, get it here.



Setting up your Push-to-Deploy repository:



1. Go to the Google Cloud Console and create a project (this also creates an App Engine app) or use an existing one



2. In the App Engine Admin Console for your app (App Engine, select app, then click Application Settings on left nav bar), enable Source Push-to-deploy



3. Obtain and copy both the auth token by clicking on the link, and the repo URL that is displayed in the box:



4. In order to avoid having to type the password on each deployment, you can store the credentials locally. For this, locate your netrc file:



On Windows

Make sure there is a file named _netrc in your home directory. Also check that the HOME environment variable exists and that it points to your home directory:



$ setx HOME %USERPROFILE%


On Mac or Linux

Make sure there is a file named .netrc in your home directory.



5. Set the contents of the netrc file:

Use the auth token from step 3 (shown as <auth-token> below) and the email address from your Google account. The file should contain one line that looks like this:



machine code.google.com login <email-address> password <auth-token>


Creating/cloning an app and deploying:



6. Clone an App Engine project (example from Github)



Get to the OS prompt (Terminal on Mac, cmd on Windows), navigate to a directory where you would like to store the sample app’s source code (e.g. cd ~/Desktop), and clone the App Engine Guestbook app repository:



$ git clone https://github.com/GoogleCloudPlatform/appengine-helloworld-python.git




7. Edit the app.yaml file with the new application id

The previous step downloaded the source code for the sample Hello World app. Navigate to that folder.



$ cd appengine-helloworld-python


Open the app.yaml file and change the “application” field to the project name or app id from step 1



8. Initialize local git repo, and set up remote repo (<repo-url> obtained in step 3). In the same directory that contains the source code, and on the terminal prompt type:



$ git remote add appengine <repo-url>


The steps above initialize your local repo, add all the files to it, commit them, and set up an alias to the remote repo we will be pushing to



9. Deploy your app:

$ git push appengine master


And that’s it! The sample app is ready to serve at http://<your-app-id>.appspot.com.



Using this feature simplifies the deployment process by allowing you to use the standard git tool instead of our SDK. We hope you find this functionality useful and look forward to your comments and feedback.



-Posted by Sachin Kotwani, Product Manager
Email ThisBlogThis!Share to XShare to Facebook
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Tutorial: Adding a cloud backend to your application with Android Studio
    Android Studio lets you easily add a cloud backend to your application, right from your IDE. A backend allows you to implement functionality...
  • A Day in the Cloud, new articles on scaling, and fresh open source projects for App Engine
    The latest release of Python SDK 1.2.3, which introduced the Task Queue API and integrated support for Django 1.0, may have received a lot ...
  • New Admin Console Release
    Posted by Marzia Niccolai, App Engine Team Today we've released some new features in our Admin Console to make it easier for you to mana...
  • JPA/JDO Java Persistence Tips - The Year In Review
    If you’re developing a Java application on App Engine you probably already know that you can use JPA and JDO, both standard Java persistence...
  • The new Cloud Console: designed for developers
    In June, we unveiled the new Google Cloud Console , bringing together all of Google’s APIs, Services, and Infrastructure in a single interfa...
  • Best practices for App Engine: memcache and eventual vs. strong consistency
    We have published two new articles about best practices for App Engine. Are you aware of the best ways to keep Memcache and Datastore in syn...
  • Pushing Updates with the Channel API
    If you've been watching Best Buy closely, you already know that Best Buy is constantly trying to come up with new and creative ways to...
  • Outfit 7’s Talking Friends built on Google App Engine, recently hit one billion downloads
    Today’s guest blogger is Igor Lautar, senior director of technology at Outfit7 (Ekipa2 subsidiary), one of the fastest-growing media enterta...
  • Bridging Mobile Backend as a Service to Enterprise Systems with Google App Engine and Kinvey
    The following post was contributed by Ivan Stoyanov , VP of Engineering for Kinvey, a mobile Backend as a Service provider and Google Cloud ...
  • Easy Performance Profiling with Appstats
    Since App Engine debuted 2 years ago, we’ve written extensively about best practices for writing scalable apps on App Engine. We make writ...

Categories

  • 1.1.2
  • agile
  • android
  • Announcements
  • api
  • app engine
  • appengine
  • batch
  • bicycle
  • bigquery
  • canoe
  • casestudy
  • cloud
  • Cloud Datastore
  • cloud endpoints
  • cloud sql
  • cloud storage
  • cloud-storage
  • community
  • Compute Engine
  • conferences
  • customer
  • datastore
  • delete
  • developer days
  • developer-insights
  • devfests
  • django
  • email
  • entity group
  • events
  • getting started
  • google
  • googlenew
  • gps
  • green
  • Guest Blog
  • hadoop
  • html5
  • index
  • io2010
  • IO2013
  • java
  • kaazing
  • location
  • mapreduce
  • norex
  • open source
  • partner
  • payment
  • paypal
  • pipeline
  • put
  • python
  • rental
  • research project
  • solutions
  • support
  • sustainability
  • taskqueue
  • technical
  • toolkit
  • twilio
  • video
  • websockets
  • workflows

Blog Archive

  • ▼  2013 (143)
    • ►  December (33)
    • ►  November (15)
    • ►  October (17)
    • ►  September (13)
    • ►  August (4)
    • ▼  July (15)
      • How Safari Books Online uses Google BigQuery for b...
      • Multi-Channel Chat with Twilio and Google App Engine
      • Google App Engine: Hello World using Push-to-Deploy
      • SendGrid gives App Engine developers a simple way ...
      • Create dynamic web projects in Eclipse
      • New in Google Cloud Storage: auto-delete, regional...
      • Dedicated memcache preview now available on Google...
      • Google App Engine 1.8.2 released
      • Help us improve Google Cloud Platform by participa...
      • Get up and Running with Cassandra on Google Comput...
      • Lock-in, what lock-in?
      • Development in the Cloud with Codenvy and Google C...
      • See how to test drive Virtual Machines on Google C...
      • IT Operations Management for Google Compute Engine...
      • Google App Engine takes the pain out of sending iO...
    • ►  June (12)
    • ►  May (15)
    • ►  April (4)
    • ►  March (4)
    • ►  February (9)
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (2)
    • ►  October (8)
    • ►  September (2)
    • ►  August (3)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (5)
    • ►  February (3)
    • ►  January (5)
  • ►  2011 (46)
    • ►  December (3)
    • ►  November (4)
    • ►  October (4)
    • ►  September (5)
    • ►  August (3)
    • ►  July (4)
    • ►  June (3)
    • ►  May (8)
    • ►  April (2)
    • ►  March (5)
    • ►  February (3)
    • ►  January (2)
  • ►  2010 (38)
    • ►  December (2)
    • ►  October (2)
    • ►  September (1)
    • ►  August (5)
    • ►  July (5)
    • ►  June (6)
    • ►  May (3)
    • ►  April (5)
    • ►  March (5)
    • ►  February (2)
    • ►  January (2)
  • ►  2009 (47)
    • ►  December (4)
    • ►  November (3)
    • ►  October (6)
    • ►  September (5)
    • ►  August (3)
    • ►  July (3)
    • ►  June (4)
    • ►  May (3)
    • ►  April (5)
    • ►  March (3)
    • ►  February (7)
    • ►  January (1)
  • ►  2008 (46)
    • ►  December (4)
    • ►  November (3)
    • ►  October (10)
    • ►  September (5)
    • ►  August (6)
    • ►  July (4)
    • ►  June (2)
    • ►  May (5)
    • ►  April (7)
Powered by Blogger.

About Me

Unknown
View my complete profile