LoginSignup
2
4

More than 5 years have passed since last update.

gcloudをインストールして最新のコンポーネントを追加するまで

Last updated at Posted at 2017-11-28

概要

gcloudをインストールして最新のコンポーネントを追加するまでのメモ

:warning: 一部コマンドの実行結果まで載せてるので長め

gcloudをインストールする

参考

インストール

gzipをダウンロードして解凍する。
ダウンロードは参考ページからでもできる。


$ wget -O google-cloud-sdk-170.0.1-linux-x86_64.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-170.0.1-linux-x86_64.tar.gz?hl=ja
$ tar -zxf google-cloud-sdk-170.0.1-linux-x86_64.tar.gz

解凍したディレクトリ内にインストール用のシェルがあるので、それを実行する。


$ cd google-cloud-sdk
$ ./install.sh
Welcome to the Google Cloud SDK!

To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:

    gcloud config set disable_usage_reporting true

Do you want to help improve the Google Cloud SDK (Y/n)?  Y


Your current Cloud SDK version is: 170.0.1
The latest available version is: 180.0.1

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                   Components                                                   │
├──────────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│      Status      │                         Name                         │            ID            │    Size   │
├──────────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Update Available │ BigQuery Command Line Tool                           │ bq                       │   < 1 MiB │
│ Update Available │ Cloud SDK Core Libraries                             │ core                     │   7.5 MiB │
│ Update Available │ Cloud Storage Command Line Tool                      │ gsutil                   │   3.3 MiB │
│ Not Installed    │ App Engine Go Extensions                             │ app-engine-go            │  98.1 MiB │
│ Not Installed    │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.1 MiB │
│ Not Installed    │ Cloud Bigtable Emulator                              │ bigtable                 │   3.5 MiB │
│ Not Installed    │ Cloud Datalab Command Line Tool                      │ datalab                  │   < 1 MiB │
│ Not Installed    │ Cloud Datastore Emulator                             │ cloud-datastore-emulator │  17.7 MiB │
│ Not Installed    │ Cloud Datastore Emulator (Legacy)                    │ gcd-emulator             │  38.1 MiB │
│ Not Installed    │ Cloud Pub/Sub Emulator                               │ pubsub-emulator          │  33.2 MiB │
│ Not Installed    │ Emulator Reverse Proxy                               │ emulator-reverse-proxy   │  14.5 MiB │
│ Not Installed    │ Google Container Local Builder                       │ container-builder-local  │   3.7 MiB │
│ Not Installed    │ Google Container Registry's Docker credential helper │ docker-credential-gcr    │   2.2 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          │ 118.4 MiB │
│ Not Installed    │ gcloud app PHP Extensions                            │ app-engine-php           │           │
│ Not Installed    │ gcloud app Python Extensions                         │ app-engine-python        │   6.2 MiB │
│ Not Installed    │ kubectl                                              │ kubectl                  │  12.3 MiB │
└──────────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [170.0.1], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

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

==> Source [/home/*****/gcloud-work/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud.
==> Source [/home/*****/gcloud-work/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.

For more information on how to get started, please visit:
  https://cloud.google.com/sdk/docs/quickstarts

initコマンドによる初期化


$ ./google-cloud-sdk/bin/gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                                                                                                                                                                                          
Reachability Check passed.
Network diagnostic (1/1 checks) passed.

You must log in to continue. Would you like to log in (Y/n)?  Y

Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id=***********.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline


[10798:10842:1128/203245.592467:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.
Created new window in existing browser session.


Updates are available for some Cloud SDK components.  To install them,
please run:
  $ gcloud components update

You are logged in as: [****@****].

Pick cloud project to use: 
 [1] ****-*****-******
 [2] Create a new project
Please enter numeric choice or text value (must exactly match list 
item):  1

Your current project has been set to: [****-*****-******].

API [compute.googleapis.com] not enabled on project [************]. 
Would you like to enable and retry?  (Y/n)?  Y

Do you want to configure Google Compute Engine 
(https://cloud.google.com/compute) settings (Y/n)?  n

Created a default .boto configuration file at [/home/*****/.boto]. See this file and
[https://cloud.google.com/storage/docs/gsutil/commands/config] for more
information about configuring Google Cloud Storage.
Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use ****@**** by default
* Commands will reference project `****-*****-******` by default
Run `gcloud help config` to learn how to change individual settings

This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run `gcloud topic configurations` to learn more.

Some things to try next:

* Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command.
* Run `gcloud topic -h` to learn about advanced features of the SDK like arg files and output formatting

コンポーネントをアップデートする

参考

上記ページには↓のようなコマンドが載っているが、これを実行したらinstallコマンドではCOMPONENT-IDを指定しろを怒られるので、updateしてから対象のコンポーネントをinstallするようにしてみたら上手くいった。


gcloud components update beta &&
gcloud components install

アップデート

コンポーネントをアップデートする。


$ ./google-cloud-sdk/bin/gcloud components update beta
You have specified individual components to update.  If you are trying
 to install new components, use:
  $ gcloud components install beta

Do you want to run install instead (y/N)?  N



Your current Cloud SDK version is: 170.0.1
Installing components from version: 180.0.1

┌────────────────────────────────────────────────────────────────────────────┐
│                     These components will be updated.                      │
├─────────────────────────────────────────────────────┬────────────┬─────────┤
│                         Name                        │  Version   │   Size  │
├─────────────────────────────────────────────────────┼────────────┼─────────┤
│ BigQuery Command Line Tool                          │     2.0.27 │ < 1 MiB │
│ BigQuery Command Line Tool (Platform Specific)      │     2.0.26 │ < 1 MiB │
│ Cloud SDK Core Libraries                            │ 2017.11.20 │ 7.5 MiB │
│ Cloud SDK Core Libraries (Platform Specific)        │ 2017.09.15 │ < 1 MiB │
│ Cloud Storage Command Line Tool                     │       4.28 │ 3.3 MiB │
│ Cloud Storage Command Line Tool (Platform Specific) │       4.27 │ < 1 MiB │
│ gcloud cli dependencies                             │ 2017.11.10 │ 1.7 MiB │
│ gcloud cli dependencies                             │ 2017.10.20 │ 5.1 MiB │
└─────────────────────────────────────────────────────┴────────────┴─────────┘
┌─────────────────────────────────────────────┐
│     These components will be installed.     │
├──────────────────────┬────────────┬─────────┤
│         Name         │  Version   │   Size  │
├──────────────────────┼────────────┼─────────┤
│ gcloud Beta Commands │ 2017.09.15 │ < 1 MiB │
└──────────────────────┴────────────┴─────────┘

The following release notes are new in this upgrade.
Please read carefully for information about new features, breaking changes,
and bugs fixed.  The latest full release notes can be viewed at:
  https://cloud.google.com/sdk/release_notes

180.0.1 (2017-11-20)
      ▪ Hotfix for gcloud compute project-info add-metadata/remove-metadata
        crashes.

180.0.0 (2017-11-15)
  Breaking Changes
      ▪ **(REMOVED)** Removed the capability to deploy Endpoints
        configuration when using gcloud beta app deploy.

  Google Container Engine
      ▪ Updated Google Container Engine's kubectl from version 1.8.2 to
        1.8.3.

  Google Cloud SQL
      ▪ Updated gcloud sql instances import to show full source URI.

  Google App Engine
      ▪ Updated components to 1.9.63.
      ▪ Added deprecation warning in gcloud app deploy for Python apps using
        the library ssl 2.7. For information about this deprecation, see
        <https://cloud.google.com/appengine/docs/deprecations/python-ssl-27>.
      ▪ Fixed issue affecting the Go runtime in which gcloud app deploy
        failed at finding dependencies that are not required.
      ▪ Added --go_debugging flag to dev_appserver.py to enable delve
        debugging for the Go runtime.

  Google Cloud ML
      ▪ Made Google Cloud ML Engine scale tier BASIC_TPU available in gcloud
        command line tool.

  Google Cloud Deployment Manager
      ▪ Updated gcloud deployment-manger to use latest public API version.

179.0.0 (2017-11-08)
  Breaking Changes
      ▪ **(DEPRECATED)** Deprecated gcloud service-management in favor of
        gcloud endpoints and gcloud services. See help text for details.
      ▪ Removed the gcloud alpha bio command group.

  Google Container Engine
      ▪ Added the --enable-basic-auth flag to gcloud container clusters
        create.
      ▪ Added the --username, --enable-basic-auth, and --password flags to
        gcloud container clusters update. These allow a user to enable/disable
        basic auth on an existing cluster or change the username.

  Google Compute Engine
      ▪ Promote these commands to beta:
        ◆ gcloud beta compute instance-templates create-with-container
        ◆ gcloud beta compute instances create-with-container
        ◆ gcloud beta compute instances update-container
      ▪ Added alpha commands for creating, describing, listing, deleting,
        updating SSL policies and listing available SSL policy features:
        ◆ gcloud alpha compute ssl-policies create
        ◆ gcloud alpha compute ssl-policies describe
        ◆ gcloud alpha compute ssl-policies list
        ◆ gcloud alpha compute ssl-policies delete
        ◆ gcloud alpha compute ssl-policies update
        ◆ gcloud alpha compute ssl-policies list-available-features
      ▪ Added alpha commands for attaching SSL policies to Target HTTPS
        proxies and Target SSL proxies:
        ◆ gcloud alpha compute target-https-proxies create
        ◆ gcloud alpha compute target-https-proxies update
        ◆ gcloud alpha compute target-ssl-proxies create
        ◆ gcloud alpha compute target-ssl-proxies update

  Google App Engine
      ▪ Components updated to 1.9.59. Please visit the following release
        notes for details:
        ◆ Java - https://cloud.google.com/appengine/docs/java/release-notes

  Firebase Test Lab
      ▪ Added Firebase Test Lab support for testing Android apps that include
        a network profile setting. Run tests as follows:

        gcloud firebase test android run \
          --network-profile=LTE  # or LTE-poor, HSPA, etc.

  Cloud PubSub
      ▪ Added the following commands to the gcloud beta pubsub topics and
        gcloud beta pubsub subscriptions groups, which enable managing IAM
        policies:
        ◆ set-iam-policy
        ◆ get-iam-policy
        ◆ add-iam-policy-binding
        ◆ remove-iam-policy-binding
      ▪ Added labels flags (--labels, --<update|remove>-labels) to gcloud
        pubsub <topics|subscriptions|snapshots> <update|create> in release
        tracks where these commands exist. Use these labels to organize your
        Google Cloud Pub/Sub subscriptions.

  Cloud Machine Learning
      ▪ All gcloud ml commands in all release tracks can now be used with
        standard user credentials (no longer requires a service account). For
        this to work, you must have the appropriate ML API enabled on your
        current gcloud project.

178.0.0 (2017-11-01)
  Google App Engine
      ▪ The Java development server for Standard is now available as
        java_dev_appserver.sh (java_dev_appserver.cmd for Windows). It is
        equivalent to the dev_appserver.sh/cmd from the Java Standalone App
        Engine SDK.

  Google Cloud Datastore Emulator
      ▪ Cloud Datastore Emulator version changed from 1.3 to 1.3.0 for gcloud
        emulator package compatibility, with no other changes.

  Google Compute Engine
      ▪ Added --async flag to gcloud computes instances stop command. Added
        wait polling for synchronous cases.
      ▪ Promoted compute instance-templates create-with-container, compute
        instances create-with-container, and compute instances update-container
        commands to beta.
      ▪ Promoted --deletion-protection flag in gcloud compute instances
        create/update to GA.
      ▪ Added source-service-accounts and target-service-accounts in gcloud
        compute firewall-rules {describe, list, create, update} commands.

  Google Container Engine
      ▪ Updated Google Container Engine's kubectl from version 1.7.6 to 1.8.2
      ▪ Removed --wait flag in container node-pools delete. Please use
        --async instead.
      ▪ Added warning prompt to be displayed when using gcloud alpha/beta
        container clusters, to avoid failure due to incorrect configuration.

  Google Cloud SQL
      ▪ gcloud sql database create now returns with non-zero exit code on
        database creation failure.
      ▪ Added beta sql import csv, to support importing data from CSV files
        into Cloud SQL instances.
      ▪ Added beta sql import sql, with the eventual goal of replacing sql
        instances import.
      ▪ gcloud beta sql instances create and gcloud beta sql instances patch
        commands now support the --availability-type flag, for use in toggling
        high availability on Postgres instances.

  Google Cloud Spanner
      ▪ Promoted the Spanner Databases Sessions command group to GA.

177.0.0 (2017-10-25)
  Breaking Changes
      ▪ **(BETA - DEPRECATED)** The --include-ignored-file flag of gcloud
        beta functions deploy is now deprecated. Added support for using a
        .gcloudignore file instead.
      ▪ The gcloud pubsub <snapshots|subscriptions|topics> <create|update>
        and gcloud pubsub subscriptions update commands have been updated:
        ◆ These now throw an exception when any of the API requests fail. The
          exception contains the list of failed requests.
        ◆ These now only output the resources corresponding to successful
          requests.
        ◆ The success and reason fields have been removed from the output of
          these commands.

  Google Cloud Endpoints
      ▪ gcloud endpoints and gcloud services are now generally available.

  Google App Engine
      ▪ gcloud app deploy now uses a new runtime build pipeline to deploy
        apps for Python. This enables more robust and flexible deployments in
        some cases. To revert to the legacy builder, run gcloud config set
        app/use_runtime_builders false from the command line.
      ▪ Go 1.8 is now generally available and the default Go runtime.
      ▪ Google App Engine components have been updated to 1.9.62. Please
        visit the following release notes for details:
        ◆ Python -
          https://cloud.google.com/appengine/docs/python/release-notes

  Google Compute Engine
      ▪ (ALPHA) Added support to update the default network tier on a Compute
        Engine project: gcloud alpha compute project-info update
        --default-network-tier DEFAULT_NETWORK_TIER.

  Google Cloud SQL
      ▪ (BETA) Added gcloud beta sql export csv to support exporting data
        from a Cloud SQL instance to a CSV file.
      ▪ (BETA) Added gcloud beta sql export sql with the eventual goal of
        replacing gcloud sql instances export.

  Google Cloud Storage
      ▪ Updated gsutil component to 4.28

176.0.0 (2017-10-18)
  Breaking Changes
      ▪ (DEPRECATED) Deprecated the switch-mode command from gcloud compute
        networks, replaced by the update --switch-to-custom-subnet-mode
        command.
      ▪ The --force flag is removed from gcloud source repos delete.

  Google Cloud SDK
      ▪ On 64-bit Windows platforms Google Cloud SDK will use 64-bit python
        version 2.7.13. Previously it was using 32-bit version. Existing
        Windows installations using Cloud SDK with included python will see
        their python swapped for new version when upgrading to this release.

  Google Compute Engine
      ▪ CPU Platform Selection is now generally available. The
        --min-cpu-platform flag can now be used in the following commands to
        set the minimum desired CPU Platform of the virtual machine instance.
        ◆ gcloud compute instances create
        ◆ gcloud compute instances update
        ◆ gcloud compute instance-templates create
      ▪ gcloud beta compute os-login commands are now available for using
        Google Compute Engine OS Login.
      ▪ gcloud compute images create now has a --guest-os-features flag for
        enabling specific OS supported features.
      ▪ Added alpha support for labels for the gcloud compute
        target-vpn-gateways update command.
      ▪ Added static internal IP reservation to gcloud compute addresses
        create. Users can now:
        ◆ reserve a specific address and then associate it with a specific
          resource
        ◆ specify an ephemeral internal IP address for a resource and then
          promote the address

  Google App Engine
      ▪ Components updated to 1.9.58. Please visit the following release
        notes for details:
        ◆ Java - https://cloud.google.com/appengine/docs/java/release-notes

  Google Container Engine
      ▪ Added the --node-taints flag to gcloud container clusters create and
        gcloud container node-pools create in beta to support Kubernetes
        taints.

  Firebase Test Lab
      ▪ The --use-orchestrator flag for gcloud firebase test android run is
        now generally available.

  Google Cloud Spanner
      ▪ The following commands are now available in beta:
        ◆ gcloud spanner databases sessions list (to list active sessions in
          a Spanner database)
        ◆ gcloud spanner databases sessions delete (to delete an active
          session in a Spanner database)

  Google Cloud Dataflow
      ▪ The --region flag has been added to all gcloud dataflow commands to
        support Dataflow Regional Endpoints.
        ◆ Most commands will function without the --region flag, and will
          continue to default to us-central1 without the flag.
        ◆ The jobs list command will default to listing jobs from all regions
          unless the --region flag is specified, at which point it will only
          query that regional endpoint.
        ◆ Added a --staging-location flag to the jobs run command to permit
          running of templates where the template is location-only readable,
          not writeable.

  Google Cloud Container Builder Local Builder
      ▪ Updated container-builder-local to version 0.2.5. This:
        ◆ Adds a flag to export workspace to host

  Google Cloud Datastore Emulator
      ▪ Updated cloud-datastore-emulator to version 1.3. Cloud Datastore
        emulator now supports ID reservation in the Cloud Datastore V1 API.

175.0.0 (2017-10-11)
  Breaking Changes
      ▪ Behavior of --segments flag for all gcloud ml video detect- commands
        changed. The flag now accepts a list of duration pair strings (e.g.
        0:1m40s,3m50s:5m10.232265s) instead of pairs of microseconds.
        Microseconds can still be specified using fractional seconds. For
        example, 0.000569s represents 569 microseconds.
      ▪ The --mode flag for the gcloud compute networks create command has
        been deprecated. Please use the --subnet-mode flag instead.
      ▪ The output of the gcloud container images describe command has been
        updated to be more consistent with other commands.

  Google Compute Engine
      ▪ gcloud compute networks update is now generally available.
      ▪ --bgp-routing-mode and --subnet-mode flags added to gcloud compute
        networks create.
      ▪ Ability to configure reverse DNS (PTR) records for instances through
        the gcloud beta compute instances create --public-ptr- flags and the
        gcloud beta compute instances update-access-config command now
        available.

  Google App Engine
      ▪ gcloud app firewall-rules is now generally available.

  Google Cloud Resource Manager
      ▪ gcloud projects create --folder is now generally available. This
        command enables creation of projects within folders.

  Google Cloud KMS
      ▪ gcloud kms update is now generally available.

  Google Cloud Video Intelligence
      ▪ gcloud beta ml video detect-explicit-content is now available.

  Google Cloud Datalab
      ▪ Updated the datalab component to the 20171003 release. Changes in
        that release are documented here
        (https://github.com/googledatalab/datalab/issues/1716).

  Google Cloud Deployment Manager
      ▪ The --credential flag for gcloud alpha deployment-manager deployments
        create/update commands is now available. Using this flag, a custom
        service account can be provided as the deployment credential.

  Google Cloud SDK
      ▪ Nested command line argument groups have been enabled. The groups are
        clearly labelled and indented in --help documents. Also, argument group
        conflict error messaging is uniform across all gcloud commands.

174.0.0 (2017-10-04)
  Google App Engine
      ▪ App Engine components updated to 1.9.61. Please visit the following
        release notes for details:
        https://cloud.google.com/appengine/docs/python/release-notes
      ▪ The App Engine flexible environment now defaults to Python 3.6 when
        Python 3 is requested. To revert to Python 3.5, specify python_version:
        3.5 in the runtime_config element of your `app.yaml` configuration file
        (https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml)
      ▪ The aspnetcore runtime is now available using gcloud app deploy in
        the GA track. It remains available via the beta track as well. See
        https://cloud.google.com/appengine/docs/flexible/dotnet/ for more
        details.
      ▪ Auto-generated app.yaml for Go under Flexible no longer contains
        api_version (which is for the Standard only).

  Google Compute Engine
      ▪ Adding/Removing IP alias ranges are now supported in gcloud beta
        compute instances network-interfaces update. Subnetwork secondary
        ranges can be modified using gcloud beta compute networks subnets
        update.
      ▪ Add gcloud alpha compute sign-url for generating Cloud CDN Signed
        URLs.
      ▪ Add --signed-url-cache-max-age flag to the following alpha commands
        related to Cloud CDN Signed URL:
        ◆ gcloud alpha compute backend-buckets create
        ◆ gcloud alpha compute backend-buckets update
        ◆ gcloud alpha compute backend-services create
        ◆ gcloud alpha compute backend-services update
      ▪ Add alpha commands for adding and deleting Cloud CDN Signed URL keys
        to backend buckets and services:
        ◆ gcloud alpha compute backend-buckets add-signed-url-key
        ◆ gcloud alpha compute backend-buckets delete-signed-url-key
        ◆ gcloud alpha compute backend-services add-signed-url-key
        ◆ gcloud alpha compute backend-services delete-signed-url-key

  Google Cloud Dataproc
      ▪ Added gcloud beta dataproc workflow-templates group for managing
        Dataproc Workflow Templates.

173.0.0 (2017-09-27)
  Google App Engine
      ▪ Add build tag for Go 1.9 to go-app-stager
      ▪ Fixed build tags when using dev_appserver.py with the Go 1.8 beta

  Google Cloud Dataproc
      ▪ Added gcloud beta dataproc clusters get-iam-policy and gcloud beta
        dataproc clusters set-iam-policy commands to manage IAM permissions on
        a cluster.

  Google Cloud IOT
      ▪ gcloud iot is now in public beta.
      ▪ The --enable-device boolean flag for beta iot device create/update is
        now deprecated and renamed to --blocked.
      ▪ Added --enable-http-config flag to beta iot registries create/update.
      ▪ Added new flag --state-pubsub-topic flag to beta iot registries
        create/update
      ▪ Added two new key types for iot device credentials and renamed
        existing types.
      ▪ Added --metadata[-from-file] flag to beta iot devices create/update.
      ▪ Added beta iot registries credentials command group and added the
        --public-key-path flag to beta iot registries create.
      ▪ Added beta iot devices states list surface.

  Google Compute Engine
      ▪ Fix validation in gcloud compute routers update-interface to disallow
        --mask-length to be specified without --ip-address.
      ▪ Add --zones flag to beta compute instance-groups managed create
        command.

  Google Container Engine
      ▪ The --enable-network-policy flag is now available in the gcloud beta
        container clusters update command. To use this command on an existing
        cluster, first run gcloud beta container clusters update
        --update-addons network-policy=ENABLED.
      ▪ Added --maintenance-window flag to gcloud beta container clusters
        create and gcloud beta container clusters update.
      ▪ Updated Google Container Engine's kubectl from version 1.7.5 to
        1.7.6.
      ▪ The --enable-autoupgrade flag is now GA, available for gcloud
        container cluster create, gcloud container node-pools create and gcloud
        container node-pools update commands.

  Google Container Registry
      ▪ gcloud auth configure-docker is now in BETA. This is the new
        preferred method to configure gcloud/docker integration.

  Google Cloud Machine Learning Engine
      ▪ Added --summarize flag to gcloud ml-engine jobs describe command.
        Prints job resource in human readable table format.

  Google Cloud Machine Learning Language
      ▪ gcloud ml language analyze-entity-sentiment is now in GA

172.0.1 (2017-09-21)
  Google Cloud Service Management
      ▪ Fixing crash in gcloud service-management deploy

172.0.0 (2017-09-20)
  Google App Engine
      ▪ gcloud app update is now available.
      ▪ gcloud app deploy now uses a new runtime build pipeline to deploy
        apps for runtime: java. This enables more robust and flexible
        deployments in some cases. Consult the runtime release notes for your
        language at https://cloud.google.com/appengine/docs/flexible/ for more
        details. To revert to the legacy builder, you can set the
        app/use_runtime_builders config to false.
      ▪ Updated App Engine Java components to version 1.9.56. For more
        details, see the release notes at:
        https://cloud.google.com/appengine/docs/java/release-notes.

  Google Container Registry
      ▪ gcloud container images describe is now available.
      ▪ gcloud alpha container images describe now has additional
        functionality for whitelisted users.
      ▪ Fixed a timestamp issue in gcloud container images list-tags.

  Google Compute Engine
      ▪ Added support for Cloud KMS keys with Disks, Snapshots, Images, and
        Instances.
      ▪ Added the --autoscaling-config-file flag to gcloud beta compute
        instance-groups managed set-autoscaling.

  Firebase Test Lab
      ▪ Added the --no-record-video and --no-performance-metrics flags to
        gcloud firebase test android run. This supports running tests without
        recording video and/or performance metrics. Disabling these options may
        reduce test post-processing time.

  Google Cloud Service Management
      ▪ Commands in gcloud service-management will soon be deprecated.
        ◆ The preferred commands to list, enable, and disable services are
          now under gcloud <alpha|beta> services.
        ◆ The preferred commands to produce services for consumption are now
          under gcloud <alpha|beta> endpoints services.

  Google Cloud SQL
      ▪ Fixed the --async flag in gcloud sql backups delete to work as
        expected.

  Google Cloud BigQuery CLI
      ▪ Updated the bq command-line tool to version 2.0.26.
      ▪ Added support for Data Transfer Service commands. You can now do the
        following:
        ◆ Transfer config: Show, List, Add, Delete, Edit
        ◆ Transfer run: Show, List, Schedule, Delete
        ◆ Transfer log: List
      ▪ Added support for customer-managed encryption keys with Cloud KMS.
        You can specify your Cloud KMS crypto key in the following operations:
        ◆ A query that creates a destination table: bq query
          --destination_kms_key {key name}.
        ◆ A load job that creates a destination table: bq load
          --destination_kms_key {key name}.
        ◆ When creating a new table: bq mk --destination_kms_key {key name}.
      ▪ Partitioned tables can now be created using the query and load
        commands.
        ◆ Use the --time_partitioning_xxx flags and the --destination_table
          flag to write or load data into a new partitioned table.

  Google Cloud Container Builder Local Builder
      ▪ Updated container-builder-local to version 0.2.3. This:
        ◆ Upgrades server docker to version 17.06.1.
        ◆ Adds the --no-source flag and related tests.
        ◆ Always pulls the latest gcr.io/cloud-builders/metadata container.
        ◆ Increases the limit on encrypted secrets to 100.

171.0.0 (2017-09-13)
  Breaking changes
      ▪ **(MODIFIED)** beta functions deploy will set deployment-tool label
        to cli-gcloud. Manually setting labels starting with "deployment" will
        no longer be allowed.

  Google Cloud SDK
      ▪ Implemented command line TAB completion cache using sqlite. You can
        use the gcloud meta cache list command to view the cache.

  Google App Engine
      ▪ Updated App Engine components for Python to version 1.9.60. Please
        visit the release notes for details:
        <https://cloud.google.com/appengine/docs/python/release-notes>.
      ▪ Updated App Engine components for Java to version 1.9.55. Please
        visit the following release notes for details:
        <https://cloud.google.com/appengine/docs/java/release-notes>.
      ▪ Improved client-side traffic split validation in gcloud app services
        set-traffic.
      ▪ Promoted gcloud app ssl-certificates command group to GA and beta.
      ▪ Promoted gcloud app domain-mappings command group to GA and beta.
      ▪ Promoted gcloud app domains command group to GA.
      ▪ Promoted gcloud app update command to GA.

  Google Cloud Compute Engine
      ▪ Promoted gcloud compute commitments command group to GA.

  Google Cloud Source Repositories
      ▪ gcloud source repos commands now accept slashes / in repository
        names.

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

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area                             ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: BigQuery Command Line Tool                 ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: BigQuery Command Line Tool (Platform Sp... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud SDK Core Libraries                   ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud SDK Core Libraries (Platform Spec... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud Storage Command Line Tool            ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Cloud Storage Command Line Tool (Platfo... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: gcloud cli dependencies                    ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: gcloud-deps (Linux, x86_64)                ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool                   ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool (Platform Spec... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud SDK Core Libraries                     ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud SDK Core Libraries (Platform Specific) ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool              ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud Beta Commands                         ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation          ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done.                                                                                                                                                                                                     

==> Start a new shell for the changes to take effect.


Update done!

コンポーネントのインストール状況を確認する。
StatusNot Installedなものがあるので、これをインストールする。


$ ./google-cloud-sdk/bin/gcloud components list

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

┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                  Components                                                 │
├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│     Status    │                         Name                         │            ID            │    Size   │
├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Not Installed │ App Engine Go Extensions                             │ app-engine-go            │  98.1 MiB │
│ Not Installed │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.1 MiB │
│ Not Installed │ Cloud Bigtable Emulator                              │ bigtable                 │   3.5 MiB │
│ Not Installed │ Cloud Datalab Command Line Tool                      │ datalab                  │   < 1 MiB │
│ Not Installed │ Cloud Datastore Emulator                             │ cloud-datastore-emulator │  17.7 MiB │
│ Not Installed │ Cloud Datastore Emulator (Legacy)                    │ gcd-emulator             │  38.1 MiB │
│ Not Installed │ Cloud Pub/Sub Emulator                               │ pubsub-emulator          │  33.2 MiB │
│ Not Installed │ Emulator Reverse Proxy                               │ emulator-reverse-proxy   │  14.5 MiB │
│ Not Installed │ Google Container Local Builder                       │ container-builder-local  │   3.7 MiB │
│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr    │   2.2 MiB │
│ Not Installed │ gcloud Alpha Commands                                │ alpha                    │   < 1 MiB │
│ Not Installed │ gcloud app Java Extensions                           │ app-engine-java          │ 118.4 MiB │
│ Not Installed │ gcloud app PHP Extensions                            │ app-engine-php           │           │
│ Not Installed │ gcloud app Python Extensions                         │ app-engine-python        │   6.2 MiB │
│ Not Installed │ kubectl                                              │ kubectl                  │  12.3 MiB │
│ Installed     │ BigQuery Command Line Tool                           │ bq                       │   < 1 MiB │
│ Installed     │ Cloud SDK Core Libraries                             │ core                     │   7.5 MiB │
│ Installed     │ Cloud Storage Command Line Tool                      │ gsutil                   │   3.3 MiB │
│ Installed     │ gcloud Beta Commands                                 │ beta                     │   < 1 MiB │
└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [180.0.1], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

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

上記の結果、Not Installedなコンポーネントをインストールする。
とりあえず対象のコンポーネントIDを愚直に並べたが、Not Installedなものを一律インストールする方法とかあるのかな?


$ ./google-cloud-sdk/bin/gcloud components install app-engine-go cbt bigtable datalab cloud-datastore-emulator gcd-emulator pubsub-emulator emulator-reverse-proxy container-builder-local docker-credential-gcr alpha app-engine-java app-engine-php app-engine-python kubectl bq core gsutil beta


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

┌──────────────────────────────────────────────────────────────────────────────────┐
│                       These components will be installed.                        │
├──────────────────────────────────────────────────────┬───────────────┬───────────┤
│                         Name                         │    Version    │    Size   │
├──────────────────────────────────────────────────────┼───────────────┼───────────┤
│ App Engine Go Extensions                             │        1.9.61 │  98.1 MiB │
│ App Engine Go Extensions                             │               │           │
│ Cloud Bigtable Command Line Tool                     │               │           │
│ Cloud Bigtable Command Line Tool                     │         0.2.2 │   4.1 MiB │
│ Cloud Bigtable Emulator                              │               │           │
│ Cloud Bigtable Emulator                              │    2017.09.15 │   3.5 MiB │
│ Cloud Datalab Command Line Tool                      │      20171003 │   < 1 MiB │
│ Cloud Datalab Command Line Tool (Platform Specific)  │      20170818 │   < 1 MiB │
│ Cloud Datastore Emulator                             │         1.3.0 │  17.7 MiB │
│ Cloud Datastore Emulator (Legacy)                    │ v1beta3-1.0.0 │  38.1 MiB │
│ Cloud Pub/Sub Emulator                               │    2017.09.15 │  33.2 MiB │
│ Emulator Reverse Proxy                               │               │           │
│ Emulator Reverse Proxy                               │         0.0.1 │  14.5 MiB │
│ Google Container Local Builder                       │         0.2.5 │   3.7 MiB │
│ Google Container Local Builder                       │               │           │
│ Google Container Registry's Docker credential helper │               │           │
│ Google Container Registry's Docker credential helper │         1.4.1 │   2.2 MiB │
│ gcloud Alpha Commands                                │    2017.09.15 │   < 1 MiB │
│ gcloud app Java Extensions                           │        1.9.59 │ 118.4 MiB │
│ gcloud app PHP Extensions                            │               │           │
│ gcloud app Python Extensions                         │        1.9.63 │   6.2 MiB │
│ kubectl                                              │               │           │
│ kubectl                                              │         1.8.3 │  12.3 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 Extensions                     ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: App Engine Go Extensions                     ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Bigtable Command Line Tool             ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Bigtable Command Line Tool             ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Bigtable Emulator                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Bigtable Emulator                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Datalab Command Line Tool              ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Datalab Command Line Tool (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Datastore Emulator                     ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Datastore Emulator (Legacy)            ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Pub/Sub Emulator                       ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Emulator Reverse Proxy                       ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Emulator Reverse Proxy                       ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Google Container Local Builder               ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Google Container Local Builder               ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Google Container Registry's Docker creden... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Google Container Registry's Docker creden... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud Alpha Commands                        ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app Java Extensions                   ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app PHP Extensions                    ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud app Python Extensions                 ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl                                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl                                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation          ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done.                                                                                                                                                                                                     

Update done!

改めてコンポーネントのインストール状況を確認してみると、全てInstalledになっていることがわかる。


$ ./google-cloud-sdk/bin/gcloud components list

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

┌─────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                Components                                               │
├───────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│   Status  │                         Name                         │            ID            │    Size   │
├───────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Installed │ App Engine Go Extensions                             │ app-engine-go            │  98.1 MiB │
│ Installed │ BigQuery Command Line Tool                           │ bq                       │   < 1 MiB │
│ Installed │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.1 MiB │
│ Installed │ Cloud Bigtable Emulator                              │ bigtable                 │   3.5 MiB │
│ Installed │ Cloud Datalab Command Line Tool                      │ datalab                  │   < 1 MiB │
│ Installed │ Cloud Datastore Emulator                             │ cloud-datastore-emulator │  17.7 MiB │
│ Installed │ Cloud Datastore Emulator (Legacy)                    │ gcd-emulator             │  38.1 MiB │
│ Installed │ Cloud Pub/Sub Emulator                               │ pubsub-emulator          │  33.2 MiB │
│ Installed │ Cloud SDK Core Libraries                             │ core                     │   7.5 MiB │
│ Installed │ Cloud Storage Command Line Tool                      │ gsutil                   │   3.3 MiB │
│ Installed │ Emulator Reverse Proxy                               │ emulator-reverse-proxy   │  14.5 MiB │
│ Installed │ Google Container Local Builder                       │ container-builder-local  │   3.7 MiB │
│ Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr    │   2.2 MiB │
│ Installed │ gcloud Alpha Commands                                │ alpha                    │   < 1 MiB │
│ Installed │ gcloud Beta Commands                                 │ beta                     │   < 1 MiB │
│ Installed │ gcloud app Java Extensions                           │ app-engine-java          │ 118.4 MiB │
│ Installed │ gcloud app PHP Extensions                            │ app-engine-php           │           │
│ Installed │ gcloud app Python Extensions                         │ app-engine-python        │   6.2 MiB │
│ Installed │ kubectl                                              │ kubectl                  │  12.3 MiB │
└───────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [180.0.1], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [180.0.1], run:
  $ gcloud components update
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4