Uncategorized

Installing Google App Engine gcloud on Linux

If followed the Google recommended steps described on Google for installing the Google App Engine SDK, chances are that it failed just after when you tried to install kubectl or something else like goapp or the java cmds. If you have found this post on google search, chances are that you are stuck with the error:

ERROR: (gcloud.components.update) The component manager is disabled for this installation\

 

If you have followed the installation instructions for  Ubuntu (and others) Linux distributions come with the google cloud SDK installed through the local package manager, but is a trap, and doesn’t contain everything you will need to get things done.

kubectl is missing on the default instalation, together with many others.

$ gcloud components list

Your current Cloud SDK version is: 154.0.1
The latest available version is: 154.0.1

┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Components │
├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│ Status │ Name │ ID │ Size │
├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Not Installed │ App Engine Go Extensions │ app-engine-go │ 47.9 MiB │
│ Not Installed │ Bigtable Command Line Tool │ cbt │ 3.9 MiB │
│ Not Installed │ Cloud Datalab Command Line Tool │ datalab │ < 1 MiB │
│ Not Installed │ Cloud Datastore Emulator │ cloud-datastore-emulator │ 15.4 MiB │
│ Not Installed │ Cloud Datastore Emulator (Legacy) │ gcd-emulator │ 38.1 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator │ pubsub-emulator │ 21.0 MiB │
│ Not Installed │ Emulator Reverse Proxy │ emulator-reverse-proxy │ 14.5 MiB │
│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr │ 3.4 MiB │
│ Not Installed │ gcloud Alpha Commands │ alpha │ < 1 MiB │
│ Not Installed │ gcloud Beta Commands │ beta │ < 1 MiB │
│ Not Installed │ gcloud app Java Extensions │ app-engine-java │ 128.6 MiB │
│ Not Installed │ gcloud app Python Extensions │ app-engine-python │ 6.1 MiB │
│ Not Installed │ kubectl │ kubectl │ 14.9 MiB │
│ Installed │ BigQuery Command Line Tool │ bq │ < 1 MiB │
│ Installed │ Cloud SDK Core Libraries │ core │ 6.0 MiB │
│ Installed │ Cloud Storage Command Line Tool │ gsutil │ 2.9 MiB │
│ Installed │ Default set of gcloud commands │ gcloud │ │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [154.0.1], run:
 $ gcloud components install COMPONENT_ID
 $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [154.0.1], run:
 $ gcloud components update

 

And if you try to use the recommended way to install anything, it will fail and argue something with very little sense like: ERROR: (gcloud.components.update) The component manager is disabled for this installation

 

In order to get this sorted out, the solution is fairly easy. You will have to remove the google recommended way of installing the Google Cloud SDK  and proceed with the following steps:

sudo apt-get update
sudo apt-get remove google-cloud-sdk
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init
gcloud components list

Optionally you can run the one liner command :

sudo apt-get remove google-cloud-sdk && curl -sSL https://sdk.cloud.google.com | bash -

 

After installing and initializing the gcloud, you are finally able to install and Get yourself a full-blown Cloud SDK installation:

$ gcloud components install kubectl


Your current Cloud SDK version is: 154.0.1
Installing components from version: 154.0.1

┌──────────────────────────────────────────────┐
│ These components will be installed. │
├─────────────────────────┬─────────┬──────────┤
│ Name │ Version │ Size │
├─────────────────────────┼─────────┼──────────┤
│ kubectl │ │ │
│ kubectl (Linux, x86_64) │ 1.6.2 │ 14.9 MiB │
└─────────────────────────┴─────────┴──────────┘

For the latest full release notes, please visit:
 https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)? y

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl (Linux, x86_64) ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done. 

Update done

 

Installing Google App Engine for Golang

gcloud components install app-engine-go


Your current Cloud SDK version is: 154.0.1
Installing components from version: 154.0.1

┌────────────────────────────────────────────────────┐
│ These components will be installed. │
├───────────────────────────────┬─────────┬──────────┤
│ Name │ Version │ Size │
├───────────────────────────────┼─────────┼──────────┤
│ App Engine Go (Linux, x86_64) │ 1.9.50 │ 47.9 MiB │
│ App Engine Go Extensions │ │ │
│ gcloud app Python Extensions │ 1.9.52 │ 6.1 MiB │
└───────────────────────────────┴─────────┴──────────┘

For the latest full release notes, please visit:
 https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)? y

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: App Engine Go (Linux, x86_64) ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: App Engine Go Extensions ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app Python Extensions ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done. 

Update done!

 

Installing Google App Engine for Java

$ gcloud components install app-engine-java


Your current Cloud SDK version is: 154.0.1
Installing components from version: 154.0.1

┌──────────────────────────────────────────────────┐
│ These components will be installed. │
├────────────────────────────┬─────────┬───────────┤
│ Name │ Version │ Size │
├────────────────────────────┼─────────┼───────────┤
│ gcloud app Java Extensions │ 1.9.51 │ 128.6 MiB │
└────────────────────────────┴─────────┴───────────┘

For the latest full release notes, please visit:
 https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)? y

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app Java Extensions ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done. 

Update done!

 

I hope it helps.

Cheers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s