0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【gcloud】あっという間に gcloud コマンドを使えるようにする方法

Posted at

業務中に Google Cloud Functions のデプロイをやらなアカンとなって導入した。
詰まりポイントとかぶっちゃけないけど、備忘録的に記事にしておく(決して投稿数稼ぎではない

尚、Mac での作業を前提としています。

以下、手順

公式ドキュメントに沿って進める。

まず、Python を使用していることを確認します。

MAC ~ % python3 -V
Python 3.11.6

サポートされているバージョンは Python 3.8~3.12 です。

Cloud クライアントライブラリ をダウンロードします。
マシンのハードウェア名を以下コマンドで確認の上、適切なものを選択し、ダウンロードしてください。

MAC ~ % uname -m 
x86_64

自分の場合はこれをダウンロード

image.png

落としてきたら、システム上の任意の場所に展開します。

あとはインストールスクリプトを実行するだけ。

./google-cloud-sdk/install.sh

いくつか問いがあるのですが、
Modify profile to update your $PATH and enable shell command completion?
という感じで、PATH を更新するか聞かれるので、こだわりなければ、Yes しておきましょう。

これも必要に応じてですが、初期設定などしておいてもいいかもです。

gcloud init

--helpオプションなど実行してみて、gcloudコマンドが生えているか確認しましょう。

gcloud --help

お疲れ様でした。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?