Our app engine project uses google cloud sql database. Historically cloud SQL was a separate project, and app engine application had permissions to work with it.
Now Google uses a new google cloud console. We see 2 different projects with different project ids.
How can we merge the cloud SQL and app engine projects?
The DB size is about 25Gb and it is used every second so we can't move it to app engine project.
And we can't add app engine project source to Cloud SQL project, there is no App Engine link in new console.
Thanks
Related
I am building a backend for an application with Google App Engine and Cloud SQL.
I do have:
A webserver as a proxy in front of my API server which handles sessions (using Cloud SQL and memcache) and calls the API
An API server which has access to the resource in the Cloud SQL instance
oAuth server which also needs Cloud SQL and memcache for tokens etc.
So my questions: Do I need three Cloud SQL project, which all have their own replica? Or is it ok to have one Cloud SQL project and all three App Engine projects access this Cloud SQL instance through the Cloud SQL proxy?
All projects will be located in the us-central region.
Would love to hear some thoughts.
Thanks!
I’m adding this information as a formal answer for the community. All credit goes to Dan Cornilescu.
You do not need to create 3 different projects. You can have 3 Google App Engine services running and a single Cloud SQL instance in the same project. That seems to be the best option for your situation. Using multiple services within a single project has its advantages one of them being increased performance.
Note that you could also have multiple Cloud SQL instances running in the same project. You can follow this document that talks more about creating a Cloud SQL instance:
Creating Instances
In case you need more information about Google App Engine services, this is a good resource:
Microservices Architecture on Google App Engine
I have MySQL 1st generation database on Google Cloud SQL.
I am developing Web app with App Engine using Flask but unable to connect to databases which is on Cloud SQL.
Somebody knows if is it possible connect an application from Appengine to a mysql database hosted in compute engine?
I'm trying to do this with python and i have this error:
Can't create TCP/IP socket (-1)
I'm using SqlAlchemy ORM which use the next configuration:
create_engine('mysql+mysqldb://root#ip/database')
and locally works but when i deploy the application to appengine doesn't work.
Thanks
Google App Engine, by default, runs code in a sandboxed environment, meaning that certain aspects of the Python runtime environment are restricted, or respond differently than they would otherwise. One of these aspects is outbound network connectivity—while GAE supports sockets, there are certain restrictions, and sockets are only available for paid apps.
The recommended options for storing information in a GAE app include the App Engine Datastore, Google Cloud SQL, and Google Cloud Storage. Google Cloud SQL is MySQL, and works with SQLAlchemy, so that's probably your best option.
If you absolutely need to run your own MySQL server (rather than using Google Cloud SQL) and connect to it from a GAE app, the other option is to use the managed VM environment, which permits unrestricted network access (since it's essentially a Google Compute Engine VM with the App Engine runtime on top).
we are recently planning to build app for our customer. For this we are going on GAE for PHP.
for storage google offers google cloud sql. But this is bit costly compared to AWS RDS mysql.
Can we connect this app to AWS?
I'm trying to enable and create a Google Cloud SQL instance per: https://developers.google.com/cloud-sql/docs/before_you_begin#enroll
However, the "Cloud SQL" menu item does not appear when I open my project in Google Cloud Console as referenced in step #3.
I noticed that if I navigate to Cloud Development -> Push-to-deploy I get the error message: "Push-to-deploy is not available for this project because it is a legacy project."
How can I get Cloud SQL working with my project?
Cloud SQL Instances are not restricted to work only with AppEngine apps in the same project. You can just create a new project at https://cloud.google.com/console (which will have Cloud SQL enabled), and from that project create a new Cloud SQL Database. Just make sure you replace the default authorized AppEngine project with the old one on the Create screen.