1. curl https://sdk.cloud.google.com | bash
2. gcloud auth login (one time thing)
3. gcloud sql instances create db-master-1 1. curl https://sdk.cloud.google.com | bash
2. gcloud auth login (one time thing)
3. gcloud sql instances create db-master-1That's a royal pain in the arse to automate with something like ansible... AWS nailed it with a token & secret (not some horrible expiring oauth2 object).
And that's not to mention gsutils sleeping for a second or two every time it tells you there's an update.
It's like these guys have never heard of devops.
Updates are my problem; I don't expect software to sleep whenever they're available... because you never know, I might be running it in a loop under cron and it might just piss me off when I start to lose performance...
Also, if you are running stuff in Google Compute Engine, no auth flow is needed at all: there is a metadata service that you can connect to (and gcloud connects to by default) that provides credentials associated with the machine you're on.
> It's like these guys have never heard of devops.
:\ yeah...I can't imagine trying to automate a web login flow with ansible...but no one would ever suggest you do that.
(disclosure: I wrote most of the client-side auth code for gcloud)
curl * | bash
and should be discouraged. It's easy but it's like saying, hey I'm logged in as root all the time - it's easier. wget https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash
chmod 775 install_google_cloud_sdk.bash
./install_google_cloud_sdk.bash #!env bash
f () {
...code
...code
...code
}
f
Hence a partial stream will do nothing (syntax error, missing brace to be precise).Otherwise you might as well give up on downloading any software from the internet. Ever.
rm -rf ~/.config/google
and the connection gives out at
rm -rf ~/
Suddenly your script didn't install, and you've blown away your home directory. HTTP(S) is designed for reading documents, where it's OK if you can't read the document in its entirety.
That is if you don't do a
view ./configure
first and go through it. You do take a look at the configure scripts, don't you?Example: expat's autoconf script is over twenty two thousand lines long.