由於Google Cloud Platform的更新如火如荼
介紹一下更新的指令:"gcloud components update"
也許在使用舊版執行指令時候有發現
其實sdk會提示要做更新的動作...
$ gcloud components update
The following components will be removed:
----------------------------------------------------
| App Engine SDK for Java | 1.8.6 | 144.29 MB |
| Big Query CLI | 2.0.16 | 1.38 MB |
| Cloud SDK Core | 2013.10.28 | 0.26 MB |
| Cloud SDK Core (Extras) | 2013.10.25 | 0.00 MB |
| Cloud Storage CLI | 3.37 | 1.77 MB |
| Compute Engine CLI | 1.10.0 | 0.43 MB |
----------------------------------------------------
The following components will be installed:
----------------------------------------------------
| App Engine SDK for Java | 1.8.7 | 144.70 MB |
| Big Query CLI | 2.0.17 | 1.38 MB |
| Cloud SDK Core | 2013.11.05 | 0.27 MB |
| Cloud SDK Core (Extras) | 2013.11.05 | 0.00 MB |
| Cloud Storage CLI | 3.37 | 1.77 MB |
| Compute Engine CLI | 1.11.0 | 0.44 MB |
----------------------------------------------------
Do you want to continue (Y/n)? Y
Creating update staging area...
Uninstalling core ... Done
Uninstalling core-nix ... Done
Uninstalling gcutil ... Done
...
然後也可以透過list的指令來列出目前安裝的個套件版本
$ gcloud components list
The following are the components available through the Google Cloud
SDK. You may choose to install one or more of the pre-configured
packages (which contain everything you need to get started), and/or
any of the individual components below.
-------------------------------------------------------------------------------
| Packages |
|-----------------------------------------------------------------------------|
| Status | Name | ID | Size |
|---------------+--------------------------------------+---------------+------|
| Not Installed | Cloud SDK for Go Developers (x86) | pkg-go-x86 | |
| Not Installed | Cloud SDK for Go Developers (x86_64) | pkg-go-x86_64 | |
| Not Installed | Cloud SDK for Python Developers | pkg-python | |
| Installed | Cloud SDK for Java Developers | pkg-java | |
-------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
| Individual Components |
|------------------------------------------------------------------------------------------------|
| Status | Name | ID | Size |
|---------------+------------------------------------------+-------------------------+-----------|
| Not Installed | App Engine Launcher Application for Mac | gae-python-launcher-mac | 4.94 MB |
| Not Installed | App Engine SDK for Go (Mac OS X, x86) | gae-go-darwin-x86 | 27.51 MB |
| Not Installed | App Engine SDK for Go (Mac OS X, x86_64) | gae-go-darwin-x86_64 | 27.75 MB |
| Not Installed | App Engine SDK for Python | gae-python | 37.01 MB |
| Installed | App Engine SDK for Java | gae-java | 144.70 MB |
| Installed | Big Query CLI | bq | 1.38 MB |
| Installed | Cloud SDK Core | core | 0.27 MB |
| Installed | Cloud Storage CLI | gsutil | 1.77 MB |
| Installed | Compute Engine CLI | gcutil | 0.44 MB |
--------------------------------------------------------------------------------------------------
To install new components or update existing ones, run:
$ gcloud components update [component ids]
其他gcloud的指令可以透過-h來檢視help page喔∼
$ gcloud -h
usage: gcloud.py [-h] {auth,components,config} ...
Google Cloud Platform CLI/API
positional arguments:
{auth,components,config}
auth Manage oauth2 credentials for the Google Cloud SDK.
components Install, update, or remove the tools in the Google
Cloud SDK.
config View and edit Google Cloud SDK properties.
optional arguments:
-h, --help show this help message and exit
留言
張貼留言