in Linux, PHP

Deploy google app engine : appcfg.py

Recommended VPS for your FreeBSD or Linux Server + Custom Iso Allowed (Free $20 credit for limited time, grab it now)

Deploy php script aka application to google app engine is interesting. I came from traditional ftp-ing (so 1999 hehehe), scp and cpanel. Google app engine provide 2 ways of deployment; through appcfg.py and via git. I’ll try to explore both options now.

Preparation

In this stage, application need to get register first to App Engine Administration Console. Visit this address to get it done :

https://appengine.google.com/

Selection_008

Choose google account to use for this purpose.

Selection_009

click “Create Application” button.

Selection_010

make sure to check name availability and quota application (max 10).

Selection_011

Google app engine will need grant access from your google account.

Selection_012

Click ‘Accept” button to get started.

 

Deployment using appcfg.py

$ google_appengine/appcfg.py –oauth2 update digitalfusi/

08:59 PM Application: difuphp; version: 1
08:59 PM Host: appengine.google.com
08:59 PM
Starting update of app: difuphp, version: 1
08:59 PM Getting current resource limits.
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=xxxxx6889yyy.apps.googleusercontent.com&access_type=offline

If your browser is on a different machine then exit and re-run this
application with the command-line parameter

–noauth_local_webserver

(process:3287): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0′ failed
Authentication successful.
09:01 PM Scanning files on local disk.
09:01 PM Cloning 2 application files.
09:01 PM Uploading 2 files and blobs.
09:01 PM Uploaded 2 files and blobs
09:01 PM Compilation starting.
09:01 PM Compilation completed.
09:01 PM Starting deployment.
09:01 PM Checking if deployment succeeded.
09:01 PM Deployment successful.
09:01 PM Checking if updated app version is serving.
09:01 PM Completed update of app: difuphp, version: 1

Testing the result by visit http://difuphp.appspot.com

Selection_013

appcfg.py is very straightforward command. Combine with oauth option I can upload all my php script to google infrastructure. Awesome.