인스턴스 만들기 및 액세스
Secure Source Manager 인스턴스를 만들고 웹 인터페이스에 액세스하여 저장소를 만들고 사용자 액세스 권한을 부여할 준비를 합니다.
시작하기 전에
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
Install the Google Cloud CLI.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.
gcloud init
-
Create or select a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Create a Google Cloud project:
gcloud projects create PROJECT_ID
Replace
PROJECT_ID
with a name for the Google Cloud project you are creating. -
Select the Google Cloud project that you created:
gcloud config set project PROJECT_ID
Replace
PROJECT_ID
with your Google Cloud project name.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Secure Source Manager API:
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles.gcloud services enable securesourcemanager.googleapis.com
-
Install the Google Cloud CLI.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.
gcloud init
-
Create or select a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Create a Google Cloud project:
gcloud projects create PROJECT_ID
Replace
PROJECT_ID
with a name for the Google Cloud project you are creating. -
Select the Google Cloud project that you created:
gcloud config set project PROJECT_ID
Replace
PROJECT_ID
with your Google Cloud project name.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Secure Source Manager API:
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles.gcloud services enable securesourcemanager.googleapis.com
beta
Google Cloud CLI 구성요소를 설치합니다.gcloud components install beta
다음 명령어를 실행하여
us-central1
위치에my-instance
라는 이름의 인스턴스를 만듭니다. gcloud CLI에 인증하라는 메시지가 표시될 수 있습니다.gcloud beta source-manager instances create my-instance \ --region=us-central1
각 항목의 의미는 다음과 같습니다.
my-instance
은 인스턴스의 이름입니다.us-central1
은 인스턴스를 만들 리전입니다.
장기 실행 인스턴스 생성 작업이 시작됩니다. 출력은 다음과 유사합니다.
Create request issued for [my-instance]. done: false metadata: '@type': type.googleapis.com/google.cloud.securesourcemanager.v1.OperationMetadata apiVersion: v1 createTime: '2023-02-27T20:57:52.315609549Z' requestedCancellation: false target: projects/PROJECT_ID/locations/us-central1/instances/my-instance verb: create name: projects/PROJECT_ID/locations/us-central1/operations/operation-1234567894561-5ec69948c0f2b-60dd727f-a9b97a2e
각 항목의 의미는 다음과 같습니다.
projects/PROJECT_ID/locations/us-central1/operations/operation-1234567894561-5ec69948c0f2b-60dd727f-a9b97a2e
은OPERATION_NAME
입니다.PROJECT_ID
는 프로젝트 ID입니다.
인스턴스를 만드는 데 최대 60분이 걸립니다.
작업 상태를 확인하는 데 사용해야 하므로
OPERATION_NAME
을 기록해 둡니다.다음 명령어를 실행하여
create
작업의 상태를 확인합니다.gcloud beta source-manager operations describe OPERATION_NAME \ --region=us-central1
다음을 바꿉니다.
OPERATION_NAME
을 생성 명령어 응답의 작업 이름으로 바꿉니다.
인스턴스가 준비되면 다음과 비슷한 응답이 표시됩니다.
{ "name": "projects/PROJECT_ID/locations/us-central1/operations/operation-123456789012-5ec69948c0f2b-60dd727f-a9b97a2e", "metadata": { "@type": "type.googleapis.com/google.cloud.securesourcemanager.v1.OperationMetadata", "createTime": "2022-11-01T14:31:32.420469714Z", "endTime": "2022-11-01T14:48:34.140378114Z", "target": "projects/PROJECT_ID/locations/us-central1/instances/my-instance", "verb": "create", "requestedCancellation": false, "apiVersion": "v1" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.securesourcemanager.v1.Instance", "name": "projects/PROJECT_ID/locations/us-central1/instances/my-instance", "createTime": "2022-11-01T14:31:32.416413630Z", "updateTime": "2022-11-01T14:31:32.416413630Z" }, "state": "ACTIVE", "hostConfig": { "html": "my-instance-098765432109.us-central1.sourcemanager.dev", "api": "my-instance-098765432109-api.us-central1.sourcemanager.dev", "gitHttp": "my-instance-098765432109-git.us-central1.sourcemanager.dev" } } }
각 항목의 의미는 다음과 같습니다.
my-instance-098765432109.us-central1.sourcemanager.dev
는 인스턴스 HTML URL입니다.PROJECT_ID
는 프로젝트 ID입니다.
성공적으로 생성된 확인 상태 명령에서 HTML URL을 복사합니다. 웹브라우저를 통해 인스턴스에 액세스하려면 이 URL이 필요합니다.
인스턴스의 HTML URL을 가져오려면 다음 명령어를 다시 실행합니다.
gcloud beta source-manager operations describe OPERATION_NAME \ --region=us-central1
gcloud beta source-manager operations describe
명령어의 성공적인 응답에서 HTML URL을 복사하여 브라우저 주소 표시줄에 붙여넣습니다.sourcemanager.dev
에 Google Cloud 계정에 대한 액세스 권한을 부여할지 묻는 OAuth 2.0 화면이 표시됩니다.허용 버튼을 클릭합니다.
Secure Source Manager 웹 인터페이스가 열립니다. 웹 인터페이스에서 저장소와 연결된 모든 문제 및 풀 요청을 만들고 볼 수 있습니다.
필요한 역할
Secure Source Manager 인스턴스를 만드는 데 필요한 권한을 얻으려면 관리자에게 Google Cloud 프로젝트에 대한 인스턴스 소유자 (roles/securesourcemanager.instanceOwner
) IAM 역할을 부여해 달라고 요청하세요.
Secure Source Manager 역할은 주 구성원에게 부여될 때까지 Google Cloud 콘솔에 표시되지 않습니다. Secure Source Manager 역할을 처음 부여하려면 IAM 역할 부여 및 취소를 참고하세요.
인스턴스 만들기
인스턴스 액세스
인스턴스가 생성되면 브라우저를 사용하여 웹 인터페이스를 통해 인스턴스에 액세스할 수 있습니다.
삭제
이 페이지에서 사용한 리소스 비용이 Google Cloud 계정에 청구되지 않도록 하려면 리소스가 포함된 Google Cloud 프로젝트를 삭제합니다.
Delete a Google Cloud project:
gcloud projects delete PROJECT_ID