gcloud Installation on Windows 11 - New Configuration

Page content

개요

재설치

  • 재설치의 마지막 화면은 다음과 같다.
  • Pick configuration to use, Section에서 2번을 선택한다.

Untitled

  • 이후 CMD 화면이 팝업화가 된다.
Welcome to the Google Cloud CLI! Run "gcloud -h" to get the list of available commands.
---
Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [default] are:
accessibility:
  screen_reader: 'True'
compute:
  region: asia-northeast3
  zone: asia-northeast3-a
core:
  account: your_existing@gmail.com
  disable_usage_reporting: 'False'
  project: mulcampfp

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings
 [2] Create a new configuration
Please enter your numeric choice:  2
  • 이번에는 Enter configuration name이 있다. 이 때, 접속하고자 하는 [mulcamp-project-abc] 프로젝트를 입력한다.
  • 이 때, 참고하고자 하는 프로젝트 정보에서 Project ID와 매칭되는 것을 선택한다.
Enter configuration name. Names start with a lower case letter and contain only lower case letters a-z, digits 0-9, and
hyphens '-':  mulcamp-project-abc
Your current configuration has been set to: [mulcamp-project-abc]
  • 기존 이메일 주소를 선택하거나 또는 다른 이메일을 선택한다. 필자는 1번으로 선택하였다.
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 passed (1/1 checks passed).

Choose the account you would like to use to perform operations for this configuration:
 [1] your_email@gmail.com
 [2] Log in with a new account
Please enter your numeric choice: 1
  • 로그인 이후에는 기존 이메일 계정에 있는 프로젝트 목록이 활성화 될 것이다.

Untitled

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

Pick cloud project to use:
 [1] chickenbot-a185e
 [2] encoded-phalanx-420600
 [3] streamlit-gitaction-403105
 [4] streamlit-project-416601
 [5] Enter a project ID
 [6] Create a new project
Please enter numeric choice or text value (must exactly match list item): 2
  • 그 후에 Compute Region and Zone에서 서울과 관련이 지역을 선택한다.
  • 필자는 53을 선택하였다.
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
...
 [50] asia-northeast2-a
Did not print [72] options.
Too many options [122]. Enter "list" at prompt to print choices fully.
Please enter numeric choice or text value (must exactly match list item):  list
 [1] us-east1-b
 [2] us-east1-c
...
 [53] asia-northeast3-a
 [54] asia-northeast3-b
 [55] asia-northeast3-c
 ...
 [120] us-west4-b
 [121] us-west4-c
 [122] Do not set default zone
Please enter numeric choice or text value (must exactly match list item):  53

명령어 확인

  • 새로운 명령 프롬프트를 열고 명령어를 실행한다.
Microsoft Windows [Version 10.0.22631.3447]
(c) Microsoft Corporation. All rights reserved.

C:\Users\j2hoo>gcloud --version
Google Cloud SDK 472.0.0
beta 2024.04.12
bq 2.1.4
core 2024.04.12
gcloud-crc32c 1.0.0
gsutil 5.27

C:\Users\j2hoo>
  • 이번에는 계정에 생성된 프로젝트를 조회한다.
C:\Users\j2hoo>gcloud projects list
PROJECT_ID: chickenbot-a185e
NAME: ChickenBot
PROJECT_NUMBER: 436767427808

PROJECT_ID: encoded-phalanx-420600
NAME: mulcamp-project-abc
PROJECT_NUMBER: 810789245378

PROJECT_ID: streamlit-gitaction-403105
NAME: streamlit-gitaction
PROJECT_NUMBER: 999454698889

PROJECT_ID: streamlit-project-416601
NAME: streamlit-project
PROJECT_NUMBER: 713036136978

SSH 접속

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host AWSSSH
    HostName 15.22.1.1 # External IP 주소
    User tutor # Username
    Port 22 # 포트번호
    IdentityFile ~/.ssh/Q-tutor.pem # 파일 주소

Host mulcampGCP # 이름
    HostName 34.64.120.16 # External IP 주소
    IdentityFile C:/Users/yourname/.ssh/openssh # External IP 주소
    User your_account # GCP 계정