roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

[💡FEATURE REQUEST]: Google Cloud SQL inside Roadrunner Server

Open dac514 opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Right now, to access Google Cloud SQL I run two Dockers inside a Kubernetes pod (my app, and gcr.io/cloudsql-docker/gce-proxy) Instead, I would like the proxy to be available as a service such as service/metrics or broker/sqs inside roadrunner server.

Describe the solution you'd like

When I start cloud-sql proxy I get:

2020/12/08 14:29:38 Listening on 127.0.0.1:3306 for foo:us-east1:bar-56ea8f
2020/12/08 14:29:38 Ready for new connections

Then, PHP uses typical pdo/mysql connect functions to talk to the proxy. As far as PHP is concerned, the proxy is MySQL.

Cloudsql-proxy README says:

You can run Cloud SQL proxy directly from a Go program. If your program is written in Go you can use the Cloud SQL Proxy as a library, avoiding the need to start the Proxy as a companion process.

Compiling the proxy into roadrunner's main.go, somehow, would simplify deployment.

Additional context

https://github.com/GoogleCloudPlatform/cloudsql-proxy/tree/master/proxy https://github.com/GoogleCloudPlatform/cloudsql-proxy/blob/master/tests/mysql_test.go https://github.com/GoogleCloudPlatform/cloudsql-proxy/tree/master/tests

dac514 avatar Dec 10 '20 15:12 dac514

Hi @connerbw. Thanks for the request. It will be very easy to add a new plugin after we will release the 2.0 version with the new plugin system. So, let's return to the discussion after 2.0.

rustatian avatar Dec 10 '20 16:12 rustatian

Hey @connerbw 👋🏻 Good old ticket 😃

I'm still not sure, how to implement this feature inside the RR. Do you mean, to send SQL to the RR plugin which then sends the data to the actual Google platform?

rustatian avatar Mar 24 '23 15:03 rustatian

It's OK. I don't need this anymore.

dac514 avatar Apr 13 '23 00:04 dac514

Got it, sorry for taking so long to implement 😢

rustatian avatar Apr 13 '23 08:04 rustatian