2017年5月28日日曜日

Google Cloud SDK インストール

theaucitron

Google Cloud SDK install

↓ここからアーカイブファイルをダウンロードします。
https://cloud.google.com/sdk/docs/quickstart-mac-os-x

解凍します。
$ sudo tar -xzvf Downloads/google-cloud-sdk-145.0.0-darwin-x86_64.tar.gz -C /usr/local


インストールします。
$ /usr/local/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: 145.0.0
The latest available version is: 156.0.0

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                   Components                                                   │
├──────────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│      Status      │                         Name                         │            ID            │    Size   │
├──────────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Update Available │ BigQuery Command Line Tool                           │ bq                       │   < 1 MiB │
│ Update Available │ Cloud SDK Core Libraries                             │ core                     │   6.1 MiB │
│ Update Available │ Cloud Storage Command Line Tool                      │ gsutil                   │   2.9 MiB │
│ Not Installed    │ App Engine Go Extensions                             │ app-engine-go            │  96.7 MiB │
│ Not Installed    │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.0 MiB │
│ Not Installed    │ Cloud Bigtable Emulator                              │ bigtable                 │   3.3 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    │   2.3 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          │ 132.2 MiB │
│ Not Installed    │ gcloud app PHP Extensions (Mac OS X)                 │ app-engine-php-darwin    │  21.9 MiB │
│ Not Installed    │ gcloud app Python Extensions                         │ app-engine-python        │   6.2 MiB │
│ Not Installed    │ kubectl                                              │ kubectl                  │  14.8 MiB │
│ Installed        │ Default set of gcloud commands                       │ gcloud                   │           │
└──────────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [145.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

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


Modify profile to update your $PATH and enable shell command 
completion? (Y/n)?  Y

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment.

Enter a path to an rc file to update, or leave blank to use 
[/Users/xxxxx/.bash_profile]:  
Backing up [/Users/xxxxx/.bash_profile] to [/Users/xxxxx/.bash_profile.backup].
[/Users/xxxxx/.bash_profile] has been updated.

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


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


シェルを再起動します。
$ exec -l $SHELL

SDKを初期化します。
$ sudo gcloud init
Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [default] are:
Your active configuration is: [default]

[core]
account = xxxxx@gmail.com
disable_usage_reporting = False

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings 
 [2] Create a new configuration
Please enter your numeric choice:  1

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.

Choose the account you would like use to perform operations for this 
configuration:
 [1] xxxxx@gmail.com
 [2] Log in with a new account
Please enter your numeric choice:  1

You are logged in as: [xxxxx@gmail.com].


This account has no projects. Please create one in developers console (https://console.developers.google.com/project) before running this command.

コンポーネントをアップデートします。
$ sudo gcloud components update
Your current Cloud SDK version is: 145.0.0
You will be upgraded to version: 156.0.0


以上、ローカルへのSDKインストールでしたー

0 件のコメント:

コメントを投稿