Pages

Showing posts with label engine. Show all posts
Showing posts with label engine. Show all posts

Sunday, March 16, 2014

Google App Engine Hello World using Push to Deploy

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
Read More..

Saturday, March 15, 2014

Happy Holidays from the App Engine team 1 4 0 SDK released

App Engine version 1.4.0. is here! It’s our most significant release of the year for the App Engine SDK, including a number of very big features that we know developers have been eagerly awaiting:



  • The Channel API - A bi-directional channel for communicating directly with user browsers by pushing notifications directly to the JavaScript running on the client, eliminating the need for polling. This service makes it easy to build real-time applications such as multi-player games, chat rooms, or any collaboration centric app and is built on the same Google infrastructure that powers Google Talk.

  • Always On - For high-priority applications with low or variable traffic, you can now reserve instances via App Engines Always On feature. Always On is a premium feature costing $9 per month which reserves three instances of your application, never turning them off, even if the application has no traffic. This mitigates the impact of loading requests on applications that have small or variable amounts of traffic.

Screenshot of the Instances page in the App Engine Admin Console with Always On enabled.
  • Warm Up Requests - This feature reduces time to serve requests by anticipating the need for more instances and loading them before user traffic is sent to the new instance. It can be enabled for all applications through app.yaml or appengine-web.xml and is enabled by default for applications that have purchased Always On. Once enabled, warm up requests will be sent whenever possible to load new instances of your application before it begins serving user traffic.


As well, we’ve spent a lot of time this release on reducing or removing the limitations of some of App Engine’s existing APIs



  • No more 30-second limit for background work - With this release, we’ve significantly raised this limit for offline requests from Task Queue and Cron: you can now run for up to 10 minutes without interruption.

  • Increased API Call Size Limits - A new API architecture has allowed us to start lifting the 1MB size limits on many of the App Engine APIs. To start, the following APIs have been changed:

    • Response size limits for URLFetch have been raised from 1MB to 32MB.

    • Memcache batch get/put can now also do up to 32MB requests.

    • Image API requests and response size limits have been raised from 1MB to 32MB.

    • Mail API outgoing attachments have been increased from 1MB to 10MB


As you can imagine, some of these changes drastically expand the scope of applications that can be easily built using App Engine so download the SDK while it’s hot!


Keep an eye out for more blog posts on how you can take advantage of the new features to build your apps very soon. And we’ve got a few more big features coming very soon, such as a High Replication Datastore, so keep an eye on the App Engine roadmap and stay tuned.



Read More..