LoginSignup
0
1

More than 3 years have passed since last update.

Cloud SDKインストール手順(macOS)

Last updated at Posted at 2019-09-18

目的

  • 要件を達成するための手順を記述する。
  • 今後同様のことをするための備忘録とする。

要件

やりたいことは以下の通り。

  • 端末からCLIベースでコンポーネントを操作できるようにする。

環境

  • OS : macOS 10.14.6

手順

Cloud SDKインストール

公式ドキュメントサイトを見ながら進めていく。

  • curl https://sdk.cloud.google.com | bashを入力。
  • 途中でいくつか質問されるがYを入力する。
  • シェルを再起動する。exec -l $SHELL
  • gcloud環境を初期化する。gcloud init
    • 自身のアカウントを尋ねられるので、ログインする。(ブラウザに遷移する)
    • すでにプロジェクトを作成している場合にはプロジェクトを尋ねられるので、好きな方を選択する。
Pick cloud project to use:
 [1] project 1
 [2] project 2
 [3] Create a new project
Please enter numeric choice or text value (must exactly match list
item):  2
  • リージョンを設定するか聞かれるので、必要であれば選択する。
Do you want to configure a default Compute Region and Zone? (Y/n)?  Y
Which Google Compute Engine zone would you like to use as project
default?
If you do not specify a zone via a command line flag while working
with Compute Engine resources, the default is assumed.
 [1] us-east1-b
 [2] us-east1-c
 [3] us-east1-d
 [4] us-east4-c
 [5] us-east4-b
 [6] us-east4-a
 [7] us-central1-c
 [8] us-central1-a
 [9] us-central1-f
 [10] us-central1-b
 [11] us-west1-b
 [12] us-west1-c
 [13] us-west1-a
 [14] europe-west4-a
 [15] europe-west4-b
 [16] europe-west4-c
...

以上。

0
1
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
0
1