Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
This sample script uploads a new version of an existing application, and then upgrades a deployed application with the new bits.
Important
There are two CLI utilities used to interact with Service Fabric. Azure CLI is used to manage Azure resources, such as an Azure-hosted Service Fabric cluster. Service Fabric CLI is used to directly connect to the Service Fabric cluster (regardless of where it's hosted) and manage the cluster, applications, and services.
Exemplo de script
#!/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
Próximos passos
Para obter mais informações, consulte a documentação da CLI do Service Fabric.
Exemplos adicionais de CLI do Service Fabric para o Azure Service Fabric podem ser encontrados nos exemplos de CLI do Service Fabric.