Share via


Service Fabric CLI를 사용하여 애플리케이션 업데이트

이 샘플 스크립트에서는 기존 애플리케이션의 새 버전을 업로드한 다음, 배포된 애플리케이션을 새로운 비트로 업그레이드합니다.

Important

Service Fabric과 함께 사용되는 두 개의 CLI 유틸리티가 있습니다. Azure CLI를 사용하여 Azure 호스팅 Service Fabric 클러스터와 같은 Azure 리소스를 관리합니다. Service Fabric CLI를 사용하여 (호스팅되는 위치에 관계 없이) Service Fabric 클러스터에 직접 연결하고 클러스터, 애플리케이션 및 서비스를 관리합니다.

샘플 스크립트

#!/bin/bash

# Select cluster
sfctl cluster select \
    --endpoint http://svcfab1.westus2.cloudapp.azure.com:19080

# Upload the latest bits of an application
sfctl application upload --path ~/app_package_dir_2

# Provision the new application
sfctl application provision --application-type-build-path app_package_dir_2

# Upgrade an existing up with the new version
sfctl application upgrade --app-id TestApp --app-version 2.0.0 --parameters "{\"test\":\"value\"}" --mode Monitored

다음 단계

자세한 내용은 Service Fabric CLI 설명서를 참조하세요.

Azure Service Fabric에 대한 추가 Service Fabric CLI 샘플은 Service Fabric CLI 샘플에서 확인할 수 있습니다.