$100 reward to get a simple web2py app runnnig on GAE with Google Cloud SQL

99 views
Skip to first unread message

Tom Campbell

unread,
Dec 12, 2015, 10:05:04 PM12/12/15
to web2py-users
I want to get a minimal web2py app running on Google Application Engine, using Google Cloud SQL as the backing store. Have not succeeded. Obviously because I have a much bigger app running locally and want to get that up and running.

If anyone can show me how to do this via Skype, a well-written text file, tin can on a string, whatever, I'd happily pay $100 via PayPal, check, or credit card. It will be a tiny web2py app that I write and the catch is you'll have to sit with me online until I repeat the process once. I'm in Seattle time, so GMT-8.



Massimo Di Pierro

unread,
Dec 18, 2015, 3:00:11 AM12/18/15
to web2py-users
Instead of the reward please try these instructions (which work for me) and then write a blog post or a new section in the online book. :-)

1) install mysql (on mac "brew install mysql")
2) start mysql (on mac "mysql.server start")
3) sudo mysql
mysql> CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'foo';
mysql> CREATE DATABASE mydatabase;
mysql> GRANT INSERTON *.* TO 'testuser'@'localhost' IDENTIFIED BY 'foo';
4) download the trunk web2py and trunk dal

5) copy web2py/examples/app.yaml web2py/app.yaml and call your app "myappname"

6) copy web2py/handlers/gaehandler.py web2py/gaehandler.py

7) make a new app called test which is a clone of welcome and create a new model file which contains:

db1 = DAL('google:sql://testuser:yourappname/mydatabase')

8) start web2py with:

    dev_appserver.py ./ --mysql_user=testuser --mysql_password=foo


I just did all the steps and it works for me. I had to comment two lines in the google sql adapter because they removed the charset argument from the connector.

Massimo

Tom Campbell

unread,
Dec 19, 2015, 2:02:39 AM12/19/15
to web2py-users
Thank you! Soon as I get back I can't wait!

Tom Campbell

unread,
Dec 19, 2015, 3:59:32 AM12/19/15
to web2py-users
IT WORKS! Cannot tell you what a relief that was.

I will absolutely write it up in a web2pyslice, a blog post, and a book section!

THANK YOU
Reply all
Reply to author
Forward
0 new messages