cloud-sql-proxy icon indicating copy to clipboard operation
cloud-sql-proxy copied to clipboard

Publish v2 Proxy via Homebrew

Open mattes opened this issue 9 years ago • 33 comments

Is someone working on a brew formula?

mattes avatar Jun 10 '17 20:06 mattes

Not sure what that is :)

Carrotman42 avatar Jun 10 '17 20:06 Carrotman42

https://brew.sh/

mattes avatar Jun 10 '17 22:06 mattes

After thinking about it more, there are some obstacles:

  • cloudsql-proxy either looks at GOOGLE_APPLICATION_CREDENTIALS env variable or at the flag -credential_file.
  • When using/installing gcloud, neither the env variable is set nor is there a service account key file.

So gcloud and cloudsql-proxy are not compatible as of today, I believe.

Ultimately, it would be really nice if the proxy would be available with:

gcloud sql instances proxy <instance>

mattes avatar Jun 10 '17 22:06 mattes

If you don't set the env variable or the flag, the Proxy will still get the authentication used in gcloud if you have run gcloud auth login

Carrotman42 avatar Jun 11 '17 02:06 Carrotman42

word! just tried again, no idea what I was doing wrong before.

mattes avatar Jun 11 '17 02:06 mattes

I have zero experience with homebrew, but if you would like to submit a formula I would be very gracious!

Carrotman42 avatar Jun 14 '17 17:06 Carrotman42

I will look into this prob within the next days.

mattes avatar Jun 14 '17 18:06 mattes

Any updates? If not we can leave the issue open as a feature request for anyone who finds the time, but this isn't something I will be able to spend time on personally.

Carrotman42 avatar Aug 16 '17 18:08 Carrotman42

Priorities shifted unfortunately. I'm not actively looking into this right now.

mattes avatar Aug 16 '17 18:08 mattes

Closing - this issue hasn't been updated for over 6 months and appears to be abandoned.

kurtisvg avatar Jul 16 '18 16:07 kurtisvg

I know this issue is outdated, but just in case anyone wonders how to install cloud_sql_proxy via brew it is possible now by using gcloud:

  • brew cask install google-cloud-sdk
  • gcloud components install cloud_sql_proxy

EDIT: You can then find the binary in: /usr/local/google-cloud-sdk/bin/cloud_sql_proxy

andrmueller avatar Nov 04 '19 08:11 andrmueller

A follow up on @andrmueller point; The binaries are now stored in

/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin

liam-mclaughlin avatar Jan 31 '20 11:01 liam-mclaughlin

This seems to be installing an old version (1.13, latest is 1.17). Am I doing something wrong? I tried running gcloud components update but it still wants to install 1.13.

jgonera avatar Aug 25 '20 16:08 jgonera

@jgonera Unfortunately the gcloud version being outdated is a known issue - see #408

kurtisvg avatar Aug 25 '20 16:08 kurtisvg

Hello I actually might need some similar help with /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/cloud_sql_proxy -instances= server info

When i run this i get: No such file or directory anyone know what the issue might be?

Stoicdata avatar Nov 05 '20 14:11 Stoicdata

Was any work done on this?

AlexandreCassagne avatar Nov 18 '21 18:11 AlexandreCassagne

Never mind. Just saw the last message! Good day.

AlexandreCassagne avatar Nov 18 '21 18:11 AlexandreCassagne

There is an unofficial brew formula here: https://github.com/tclass/homebrew-cloud_sql_proxy.

However, it compiles from source which requires Go. It remains easiest to just download the latest version from the Releases page.

enocom avatar Nov 18 '21 18:11 enocom

another A follow-up on @andrmueller point; The binaries are now here:

/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/cloud_sql_proxy

erdemkeren avatar Jun 09 '23 11:06 erdemkeren

Re-opening as this would make life easier for lots of folks. Seems worth pursuing, although I can't promise a timeline presently.

enocom avatar Jun 09 '23 15:06 enocom