템플릿을 사용한 Dataproc 클러스터 만들기

이 페이지에서는 인라인 Google API 탐색기 템플릿을 사용하여 Dataproc 클러스터를 만들기 위해 Dataproc API를 호출하는 방법을 보여줍니다.

클러스터를 만드는 기타 방법은 다음을 참조하세요.

시작하기 전에

  1. Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
  2. In the Google Cloud console, on the project selector page, select or create 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that you have the permissions required to complete this guide.

  4. Verify that billing is enabled for your Google Cloud project.

  5. Enable the Dataproc API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

  6. In the Google Cloud console, on the project selector page, select or create 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  7. Verify that you have the permissions required to complete this guide.

  8. Verify that billing is enabled for your Google Cloud project.

  9. Enable the Dataproc API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

필요한 역할

이 페이지의 예시를 실행하려면 특정 IAM 역할이 필요합니다. 조직 정책에 따라 이러한 역할이 이미 부여되었을 수 있습니다. 역할 부여를 확인하려면 역할을 부여해야 하나요?를 참고하세요.

역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참고하세요.

사용자 역할

Dataproc 클러스터를 만드는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.

서비스 계정 역할

Compute Engine 기본 서비스 계정에 Dataproc 클러스터를 만드는 데 필요한 권한이 있는지 확인하려면 관리자에게 프로젝트에 대한 Dataproc 작업자 (roles/dataproc.worker) IAM 역할을 Compute Engine 기본 서비스 계정에 부여해 달라고 요청하세요.

클러스터 만들기

Dataproc 작업을 실행하려면 이를 실행할 가상 머신의 클러스터를 만들어야 합니다. 프로젝트에서 Dataproc 클러스터를 만들기 위해 Google API 탐색기의 API 사용해 보기 템플릿을 작성하고 실행합니다.

  1. 요청 파라미터:

    1. projectId를 삽입합니다.
    2. 클러스터의 리전을 지정합니다('us-central1' 수락 또는 바꾸기). 이 빠른 시작에서는 리전 내에 영역을 지정하지 않으므로 Dataproc 자동 영역 배치가 클러스터를 만들 리전 내에서 영역을 선택합니다.
  2. 요청 본문:

    1. clusterName을 지정합니다('example-cluster' 수락 또는 바꾸기). 작업 제출 또는 클러스터 업데이트와 같은 클러스터 상호작용 작업에 이 이름을 사용하게 됩니다.
  3. 실행을 클릭합니다. API 템플릿을 처음 실행하면 Google 계정을 선택하여 로그인한 다음 Google API 탐색기가 사용자 계정에 액세스할 수 있도록 승인하라는 메시지가 표시될 수 있습니다. 요청이 성공하면 JSON 응답은 클러스터 만들기가 대기 중임을 나타냅니다.

  4. 클러스터 만들기를 확인하려면 Google Cloud 콘솔에서 Dataproc 클러스터 페이지를 엽니다. 클러스터 프로비저닝이 완료되면 클러스터 상태가 '실행 중'으로 표시됩니다.

삭제

이 페이지에서 사용한 리소스 비용이 Google Cloud 계정에 청구되지 않도록 하려면 다음 단계를 수행합니다.

  1. 다른 빠른 시작을 살펴보거나 다른 작업을 실행하는 데 더 이상 클러스터가 필요하지 않은 경우 API 탐색기, Google Cloud 콘솔, gcloud CLI gcloud 명령줄 도구 또는 Cloud 클라이언트 라이브러리를 사용하여 클러스터를 삭제합니다.

다음 단계