To get goAgent working on Linux, you need two components: the Google App Engine SDK for Python and the goAgent package. Extract both, then place the goAgent folder inside the google_appengine directory. The expected layout is:
~/google_appengine/goagent-goagent-d488f2
The archive name can vary; use the folder you actually extracted and adjust the command paths accordingly. Have a Google Application ID ready, plus its two-step verification password. This password is used during deployment instead of the normal account password.
Edit ~/google_appengine/goagent-goagent-d488f2/local/proxy.ini. Fill in the correct appid, and change the profile from the default google_cn to google_hk.
From the google_appengine directory, upload the server component:
aquan@edge ~/google_appengine $ python appcfg.py update goagent-goagent-d4488f2/server/python/
07:03 PM Host: appengine.google.com
07:03 PM Application: wrchiublog; version: 1
07:03 PM
Starting update of app: wrchiublog, version: 1
07:03 PM Getting current resource limits.
Email: [email protected] // enter Google ID here
Password for [email protected]: // enter the two-step verification password here, not the account password
07:04 PM Scanning files on local disk.
07:04 PM Cloning 1 static file.
07:04 PM Cloning 6 application files.
07:04 PM Uploading 1 files and blobs.
07:04 PM Uploaded 1 files and blobs
07:04 PM Compilation starting.
07:04 PM Compilation completed.
07:04 PM Starting deployment.
07:04 PM Checking if deployment succeeded.
07:04 PM Deployment successful.
07:04 PM Checking if updated app version is serving.
07:04 PM Completed update of app: wrchiublog, version: 1
When the upload prompts for email and password, use the Google ID and the two-step verification password. After the deployment finishes, start the local proxy from ~/google_appengine/goagent-goagent-d488f2/local/:
$ python proxy.py&
If the upload fails with a YAML parsing error, check server/python/app.yaml. The failure typically appears as:
aquan@edge ~/google_appengine $ python appcfg.py update goagent-goagent-d4488f2/server/python/
07:00 PM Host: appengine.google.com
Error parsing yaml file:
Unable to assign value 'your_appid' to attribute 'application':
Value 'your_appid' for application does not match expression '^(?:(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{0,99}[a-z\d])$'
in "goagent-goagent-d4488f2/server/python/app.yaml", line 1, column 14
Replace your_appid in goagent-goagent-d4488f2/server/python/app.yaml with the real application ID, then run the update again. Once that upload succeeds and the local proxy is running, the Linux setup is complete.