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

  • 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 ...
  • Cube Slam meets Google Cloud Platform
    The Google Creative Lab team has built another fun Chrome Experiment called Cube Slam . Cube Slam connects players into a three dimensional,...
  • GDC’13: Learn how to build games on Google Cloud Platform
    At the Game Developers Conference last month, we held a day of sessions showing developers how to take advantage of Google Cloud Platform ...
  • The BugSense hybrid app: experiences using Clojure on Google App Engine
    Today’s post comes to us from Jon Vlachogiannis and Panos Papadopoulos , founders of BugSense , a mobile error analytics service. We hope y...
  • Update on Datastore Auto IDs
    In the upcoming Google App Engine 1.8.1 release, the  Datastore default auto ID policy in production will switch to scattered IDs to impro...
  • Cloud SQL API: YOU get a database! And YOU get a database! And YOU get a database!
    Google Cloud SQL lets developers host their MySQL databases on Google Cloud Platform. We take care of replicating the data, backups, update...
  • International Offline Disk Import now available with new disk-upload centers in Japan, India and Switzerland
    Google Cloud Platform customers have told us that transferring large data sets (in the hundreds of terabytes and beyond) can be expensive a...
  • Get started at no cost with a faster, larger Google Cloud SQL database
    You want your application to be fast. Databases play a big role in your overall application speed and end-users’ experience. Reads and write...
  • Using Google Compute Engine with open source software
    With the recent announcement that Google Compute Engine is now Generally Available, we thought you might also like to know about the many p...
  • 2013 Year in review: making Google Compute Engine Generally Available
    2013 was a busy year for Google Cloud Platform. Watch this space: each day, a different Googler who works on Cloud Platform will be sharing ...

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