리소스 관리

SaaS 제작자 또는 플랫폼 관리자는 App Lifecycle Manager를 사용하여 배포 후 SaaS 제품, 단위 종류, 단위를 검사하고 업데이트하여 리전, 라벨, 기본 출시 버전, 유지보수 고정을 조정할 수 있습니다. 이러한 업데이트는 인프라 프로비저닝을 트리거하지 않고 구성 메타데이터를 변경합니다. 인프라 변경사항을 출시하려면 SaaS 제품 업데이트를 참조하세요. 개념적 배경은 App Lifecycle Manager 개요를 참조하세요.

시작하기 전에

  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. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  4. Enable the App Lifecycle Manager API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  5. Install the Google Cloud CLI.

  6. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  7. To initialize the gcloud CLI, run the following command:

    gcloud init
  8. 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

  9. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  10. Enable the App Lifecycle Manager API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  11. Install the Google Cloud CLI.

  12. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  13. To initialize the gcloud CLI, run the following command:

    gcloud init

필요한 역할

App Lifecycle Manager 리소스를 보고 업데이트하는 데 필요한 권한을 얻으려면 관리자에게 프로젝트에 대한 다음 IAM 역할을 부여해 달라고 요청하세요.

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

커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.

리소스 검사

리소스를 수정하기 전에 구성, 위치, 라벨을 검사하여 수정할 수 있는 속성을 확인합니다. 다음 옵션 중 하나를 선택합니다.

콘솔

  1. Google Cloud 콘솔에서 SaaS 솔루션 페이지로 이동합니다.

    SaaS 제품으로 이동

  2. SaaS 제품 이름을 클릭하거나 탐색 메뉴에서 단위 종류 또는 단위를 선택하고 리소스 이름을 클릭합니다.

gcloud

gcloud app-lifecycle-manager saas list 명령어를 사용하여 SaaS 제품을 나열합니다.

gcloud app-lifecycle-manager saas list --location=LOCATION

LOCATION을 리소스 위치(예: global 또는 us-central1)로 바꿉니다.

gcloud app-lifecycle-manager saas describe 명령어를 사용하여 특정 SaaS 제품을 설명합니다.

gcloud app-lifecycle-manager saas describe \
    SAAS_OFFERING_NAME --location=LOCATION

다음을 바꿉니다.

  • SAAS_OFFERING_NAME: SaaS 제품의 이름
  • LOCATION: 리소스 위치(예: global 또는 us-central1)

gcloud app-lifecycle-manager unit-kinds list 명령어를 사용하여 단위 종류를 나열합니다.

gcloud app-lifecycle-manager unit-kinds list --location=LOCATION

LOCATION을 리소스 위치(예: global 또는 us-central1)로 바꿉니다.

gcloud app-lifecycle-manager units list 명령어를 사용하여 단위를 나열합니다.

gcloud app-lifecycle-manager units list --location=LOCATION

LOCATION을 리전 위치(예: us-central1)로 바꿉니다. 단위는 리전 위치에만 저장되며 global에 복제되지 않습니다.

개별 단위 종류 또는 단위를 검사하려면 gcloud app-lifecycle-manager unit-kinds describe 명령어 또는 gcloud app-lifecycle-manager units describe 명령어를 사용합니다.

SaaS 제품 수정

SaaS 제품에 대해 사용 가능한 리전, 라벨, 연결된 Application Design Center 복합 템플릿을 업데이트할 수 있습니다. 리소스 이름과 상위 위치는 변경할 수 없습니다. 다음 옵션 중 하나를 선택합니다.

콘솔

  1. Google Cloud 콘솔에서 SaaS 솔루션 페이지로 이동합니다.

    SaaS 제품으로 이동

  2. 이름 열에서 업데이트할 SaaS 솔루션을 클릭합니다.

  3. SaaS 솔루션 세부정보 페이지에서 수정을 클릭합니다.

  4. 리전 목록에서 리전을 선택하거나 선택 해제하고 확인을 클릭하거나 라벨 섹션에서 키-값 쌍을 추가, 수정, 삭제합니다.

  5. 저장을 클릭합니다.

gcloud

gcloud app-lifecycle-manager saas update 명령어를 사용하여 SaaS 제품의 리전 또는 라벨을 업데이트합니다.

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --add-locations=name=REGION \
    --update-labels=KEY=VALUE

다음을 바꿉니다.

  • SAAS_OFFERING_NAME: SaaS 제품의 이름
  • LOCATION: SaaS 제품의 위치
  • REGION: 추가할 Google Cloud 리전(예: europe-west1)
  • KEY: 추가하거나 업데이트할 라벨 키
  • VALUE: 추가하거나 업데이트할 라벨 값

위치 또는 라벨을 삭제하려면 --remove-locations=name=REGION 또는 --remove-labels=KEY을 전달합니다.

새 템플릿 연결

SaaS 제품에 연결된 App Design Center 복합 템플릿이 없으면 기존 템플릿을 연결하거나 새 템플릿을 만듭니다.

콘솔

  1. SaaS 제품 세부정보 페이지의 연결된 애플리케이션 템플릿에서 기존 템플릿 연결을 클릭하여 기존 템플릿을 선택하거나 새 템플릿 만들기를 클릭하여 App Design Center에서 템플릿을 설계합니다.
  2. 메시지에 따라 템플릿을 SaaS 제품에 연결합니다.

gcloud

전체 리소스 이름을 gcloud app-lifecycle-manager saas update를 사용하여 --application-template에 전달하여 소스 리전의 복합 템플릿을 연결합니다.

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID

다음을 바꿉니다.

  • SAAS_OFFERING_NAME: SaaS 제품의 이름
  • LOCATION: SaaS 제품의 소스 리전
  • PROJECT_ID: Google Cloud 프로젝트 ID입니다.
  • SPACE: 앱 디자인 센터 스페이스 ID
  • TEMPLATE_ID: 복합 템플릿 ID

연결된 템플릿 업데이트

App Design Center 복합 템플릿이 이미 연결된 경우 템플릿 버전을 업데이트하거나, 디자인 캔버스에서 템플릿을 수정하거나, 종속 항목을 업데이트하거나, 템플릿 연결을 해제할 수 있습니다.

콘솔

  1. 연결된 애플리케이션 템플릿의 SaaS 제품 세부정보 페이지에서 템플릿 관리를 클릭합니다.
  2. 다음 옵션 중 하나를 선택합니다.
    • 템플릿 버전 업데이트: 업데이트할 최신 템플릿 버전을 선택하고 템플릿 재동기화를 트리거합니다.
    • 캔버스에서 구성: App Design Center 캔버스에서 템플릿을 열어 구성요소와 구성을 수정합니다.
    • 종속 항목 수정: 템플릿 세부정보를 열어 종속 항목을 업데이트합니다.
    • 템플릿 연결 해제: 가져온 리소스를 삭제하지 않고 템플릿과 SaaS 제품 간의 연결을 삭제합니다.

gcloud

전체 버전 리소스 이름을 gcloud app-lifecycle-manager saas update를 사용하여 --application-template-revision에 전달하여 소스 리전에서 연결된 템플릿 버전을 전환합니다.

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template-revision=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID/revisions/REVISION_ID

다음을 바꿉니다.

  • SAAS_OFFERING_NAME: SaaS 제품의 이름
  • LOCATION: SaaS 제품의 소스 리전
  • PROJECT_ID: Google Cloud 프로젝트 ID입니다.
  • SPACE: 앱 디자인 센터 스페이스 ID
  • TEMPLATE_ID: 복합 템플릿 ID
  • REVISION_ID: 템플릿 버전 ID

템플릿 버전을 변경하면 메타데이터 전용 업데이트가 아닌 템플릿 재동기화가 트리거됩니다.

단위 종류 수정

Google Cloud 콘솔에서 또는 Google Cloud CLI를 사용하여 단위 종류의 기본 출시 버전과 라벨을 업데이트할 수 있습니다. 단위 종류 이름, 상위 SaaS 제품, 종속 항목은 변경할 수 없습니다. 복합 템플릿에서 가져온 단위 종류의 경우 App Design Center에서 종속 항목과 변수 매핑을 관리합니다. 다음 옵션 중 하나를 선택합니다.

콘솔

  1. Google Cloud 콘솔에서 단위 종류 페이지로 이동합니다.

    단위 종류로 이동

  2. 이름 열에서 업데이트할 단위 종류를 클릭합니다.

  3. 단위 종류 세부정보 페이지에서 수정을 클릭합니다.

  4. 기본 출시 버전 목록에서 출시 버전 또는 기본 출시 버전 없음을 선택하고 라벨 섹션에서 라벨을 업데이트합니다.

  5. 저장을 클릭합니다.

gcloud

gcloud app-lifecycle-manager unit-kinds update 명령어를 사용하여 단위 종류를 업데이트합니다.

gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --location=LOCATION \
    --default-release=RELEASE_NAME \
    --update-labels=KEY=VALUE

다음을 바꿉니다.

  • UNIT_KIND_NAME: 단위 종류의 이름
  • LOCATION: 단위 종류의 위치
  • RELEASE_NAME: 단위의 기본 출시 이름
  • KEY: 추가하거나 업데이트할 라벨 키
  • VALUE: 추가하거나 업데이트할 라벨 값

기본 출시 버전을 설정 해제하려면 UNIT_KIND_NAME 바로 뒤에 --clear-default-release 플래그를 전달합니다.

gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --clear-default-release \
    --location=LOCATION

단위 수정

인프라 프로비저닝을 트리거하지 않고도 단위의 라벨, 테넌트 연결, 유지보수 고정 설정을 업데이트할 수 있습니다. 단위 이름, 단위 종류, 관리 모드는 생성 후 변경할 수 없습니다. 단위를 테넌트와 연결하거나 테넌트를 재할당하려면 단위를 테넌트와 연결을 참조하거나 --tenant를 gcloud app-lifecycle-manager units update에 전달합니다. 다음 옵션 중 하나를 선택합니다.

콘솔

  1. Google Cloud 콘솔에서 단위 페이지로 이동합니다.

    단위로 이동

  2. 이름 열에서 업데이트할 단위를 클릭합니다.

  3. 단위 세부정보 페이지에서 수정을 클릭합니다.

  4. 라벨 섹션에서 키-값 쌍을 업데이트하거나 단위 고정 섹션에서 고정 기한 필드에 미래 날짜와 시간을 입력합니다. 단위를 고정 해제하려면 날짜 지우기를 클릭합니다.

  5. 저장을 클릭합니다.

gcloud

gcloud app-lifecycle-manager units update 명령어를 사용하여 단위의 라벨을 업데이트하거나 현재 출시 버전을 고정합니다.

gcloud app-lifecycle-manager units update UNIT_NAME \
    --location=LOCATION \
    --update-labels=KEY=VALUE \
    --maintenance-pinned-until-time=PINNED_UNTIL_TIME

다음을 바꿉니다.

  • UNIT_NAME: 단위 이름
  • LOCATION: 기기 위치
  • KEY: 추가하거나 업데이트할 라벨 키
  • VALUE: 추가하거나 업데이트할 라벨 값
  • PINNED_UNTIL_TIME: 출시에서 단위 업그레이드를 건너뛰는 미래의 RFC 3339 타임스탬프(예: 2099-12-31T23:59:59Z)

단위 고정을 해제하려면 --maintenance-pinned-until-time=1970-01-01T00:00:00Z과 같은 이전 타임스탬프를 전달합니다.

리소스 업데이트 확인

Google Cloud 콘솔의 리소스 세부정보 페이지에서 변경사항을 확인하거나 gcloud CLI를 사용하여 업데이트된 리소스를 설명합니다.

gcloud app-lifecycle-manager units describe UNIT_NAME \
    --location=LOCATION

다음을 바꿉니다.

  • UNIT_NAME: 단위 이름
  • LOCATION: 기기 위치

다음 단계