Cloud Life Sciences v2beta로 마이그레이션

Google Genomics는 이제 Cloud Life Sciences입니다. 이 페이지에서는 v2alpha1 버전의 Google Genomics에서 v2beta 버전의 Cloud Life Sciences로 마이그레이션하는 방법을 설명합니다.

지역화된 서비스인 Cloud Life Sciences

Google Genomics는 특정 Google Cloud 위치에서 실행할 수 없는 글로벌 서비스였습니다. Cloud Life Sciences API는 데이터의 지역적 니즈에 맞게 지역화된 서비스입니다. Cloud Life Sciences API가 실행되는 위치를 선택하면 실행할 작업의 메타데이터가 해당 위치에 저장됩니다.

Cloud Life Sciences API에 요청을 보내고 위치를 지정하는 방법에 대한 자세한 내용은 REST 및 RPC 경로를 참조하세요.

REST 및 RPC 경로

Cloud Life Sciences API에 대한 REST 및 RPC 경로가 다음과 같이 변경되었습니다.

  • 이제 모든 경로에 genomics.googleapis.com 대신 lifesciences.googleapis.com이 사용됩니다.
  • 이제는 모든 경로에서 Cloud Life Sciences API를 호출할 때 us-central1과 같은 Google Cloud 위치를 지정해야 합니다.

예를 들면 다음과 같습니다.

v2alpha1 Google Genomics:

GET https://genomics.googleapis.com/v2alpha1/projects/PROJECT_ID/operations/OPERATION_ID

v2beta Cloud Life Sciences API:

GET https://lifesciences.googleapis.com/v2beta/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID

리전 엔드포인트로 일괄 요청을 수행해야 합니다.

POST https://LOCATION-lifesciences.googleapis.com/batch

Google Cloud CLI 변경사항

이제 Cloud Life Sciences gcloud CLI 명령어에서 gcloud alpha genomics 대신 gcloud beta lifesciences가 사용됩니다. 예를 들면 다음과 같습니다.

v2alpha1 Google Genomics:

gcloud alpha genomics operations describe OPERATION_ID

v2beta Cloud Life Sciences API:

gcloud beta lifesciences operations describe OPERATION_ID

--cpu--memory 플래그가 삭제되었습니다. 대신 --machine-type 플래그를 사용하세요. 머신 유형을 선택할 때 메모리 양 및 CPU 코어 수를 지정할 수 있습니다.

IAM 변경사항

Cloud Life Sciences는 Cloud Genomics v2alpha1에 사용되는 genomics 네임스페이스 대신 lifesciences 네임스페이스의 다음 Identity and Access Management(IAM) 역할 및 권한을 사용합니다. 네임스페이스 변경사항 외에도 roles/genomics.pipelinesRunner 역할이 roles/lifesciences.workflowsRunner 역할로 대체되었고 genomics.pipelines.run 권한이 lifesciences.workflows.run 권한으로 대체되었습니다.

v2alpha1 Google Genomics:

역할 권한
roles/genomics.admin
  • genomics.*
roles/genomics.editor
  • genomics.datasets.create
  • genomics.datasets.delete
  • genomics.datasets.get
  • genomics.datasets.list
  • genomics.datasets.update
  • genomics.operations.*
roles/genomics.viewer
  • genomics.datasets.get
  • genomics.datasets.list
  • genomics.operations.get
  • genomics.operations.list
파이프라인 역할 권한
roles/genomics.pipelinesRunner
  • pipelines.run
  • projects.operations.cancel
  • projects.operations.get
  • projects.operations.list

v2beta Cloud Life Sciences API:

역할 권한
roles/lifesciences.admin
  • lifesciences.*
roles/lifesciences.editor
  • lifesciences.workflows.run
  • lifesciences.operations.cancel
  • lifesciences.operations.get
  • lifesciences.operations.list
roles/lifesciences.viewer
  • lifesciences.operations.get
  • lifesciences.operations.list
워크플로 역할 권한
roles/lifesciences.workflowsRunner
  • lifesciences.workflows.run
  • lifesciences.operations.cancel
  • lifesciences.operations.get
  • lifesciences.operations.list

마이그레이션 요청 및 응답

Google Genomics v2alpha1 요청을 Cloud Life Sciences API v2beta 요청으로 마이그레이션하는 과정은 주로 필드 이름 바꾸기와 요청 및 응답 내의 필드 구조 변경으로 이루어집니다.

다음 각 섹션에는 Cloud Life Sciences API 객체에 대한 정보와 Google Genomics v2alpha1 객체 및 Cloud Life Sciences API v2beta 객체의 차이점이 포함되어 있습니다.

Action

name 필드가 containerName으로 변경되었습니다.

Google Genomics v2alpha1Cloud Life Sciences v2beta

{
  "name": string
  ...
}

{
  "containerName": string
  ...
}

이전에는 Flag 객체의 값을 지정할 수 있도록 flags 필드가 enum이었습니다. 이제 이러한 값은 Action 객체의 필드입니다. 다음 샘플은 ActionignoreExitStatus 플래그를 설정할 때 요청을 마이그레이션하는 방법을 보여줍니다.

Google Genomics v2alpha1Cloud Life Sciences v2beta

{
  ...
  "flags": [
    "ignoreExitStatus"
  ]
  ...
}

{
  ...
  "ignoreExitStatus": true
  ...
}

Event

머신이 읽을 수 있는 이벤트 세부정보가 이제 protobuf.Any 유형 메시지가 아닌 oneof 내부의 특정 메시지 유형으로 저장됩니다. 기본 메시지 유형은 변경되지 않았습니다.

다음 샘플에서는 DelayedEvent를 구성할 때 요청을 마이그레이션하는 방법을 보여줍니다.

Google Genomics v2alpha1Cloud Life Sciences v2beta

{
  "timestamp": string,
  "description": string,
  "details": {
    "@type": string,
    field1: delayed
  }
}

{
  "timestamp": string,
  "description": string,
  "delayed": {
    "cause": string,
    "metrics": [
      string
    ]
  }
}

Network

name 필드가 network으로 변경되었습니다.

Google Genomics v2alpha1Cloud Life Sciences v2beta

{
  "network": {
    "name": string
  }
}

{
  "network": {
    "network": string
  }
}

Resources

Resources 객체에 더 이상 projectId 필드가 사용되지 않습니다. 대신 작업이 요청 URL에서 Google Cloud 프로젝트 ID를 검색합니다.

Google Genomics v2alpha1Cloud Life Sciences v2beta

{
  "projectId": string,
  "regions": [
    string
  ],
  ...
}

{
  "regions": [
    string
  ],
  ...
  "defaultContainerRegistryUri": string
}

operations.getoperations.list 응답

v2alpha1에서 projects.locations.operations.getprojects.locations.operations.list 메서드는 작업 이름에 Google Cloud 프로젝트 ID가 포함된 응답을 반환했습니다. v2beta에서는 응답에 있는 작업 이름에 프로젝트 ID 대신 Google Cloud 프로젝트 번호가 포함됩니다. 프로젝트 ID와 프로젝트 번호 사이의 차이에 대한 자세한 내용은 프로젝트 만들기 및 관리를 참조하세요.

Google Genomics v2alpha1Cloud Life Sciences v2beta


projects/PROJECT_ID/operations/OPERATION_ID


projects/PROJECT_NUMBER/locations/LOCATION/operations/OPERATION_ID

Cloud Life Sciences API에 요청을 제출할 때는 프로젝트 ID 또는 프로젝트 번호를 사용할 수 있습니다. 하지만 응답에는 항상 프로젝트 번호가 포함됩니다.