שתף באמצעות


az sf application

Manage applications running on an Azure Service Fabric cluster. Only support ARM deployed applications.

Commands

Name Description Type Status
az sf application certificate

Manage the certificate of an application.

Core GA
az sf application certificate add

Add a new certificate to the Virtual Machine Scale Sets that make up the cluster to be used by hosted applications.

Core GA
az sf application create

Create a new application on an Azure Service Fabric cluster.

Core GA
az sf application delete

Delete an application.

Core GA
az sf application list

List applications of a given cluster.

Core GA
az sf application show

Show the properties of an application on an Azure Service Fabric cluster.

Core GA
az sf application update

Update a Azure Service Fabric application. This allows updating the application parameters and/or upgrade the application type version which will trigger an application upgrade.

Core GA

az sf application create

Create a new application on an Azure Service Fabric cluster.

az sf application create --application-name
                         --application-type-name
                         --application-type-version
                         --cluster-name
                         --resource-group
                         [--application-parameters]
                         [--max-nodes]
                         [--min-nodes]
                         [--package-url]

Examples

Create application "testApp" with parameters. The application type "TestAppType" version "v1" should already exist in the cluster, and the application parameters should be defined in the application manifest.

az sf application create -g testRG -c testCluster --application-name testApp --application-type-name TestAppType \
  --application-type-version v1 --application-parameters key0=value0

Create application "testApp" and app type version using the package url provided.

az sf application create -g testRG -c testCluster --application-name testApp --application-type-name TestAppType \
  --application-type-version v1 --package-url "https://sftestapp.blob.core.windows.net/sftestapp/testApp_1.0.sfpkg" \
    --application-parameters key0=value0

Required Parameters

--application-name --name

Specify the application name.

--application-type-name --type-name

Specify the application type name.

--application-type-version --version

Specify the application type version.

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--application-parameters --parameters

Specify the application parameters as key/value pairs. These parameters must exist in the application manifest. for example: --application-parameters param1=value1 param2=value2.

--max-nodes --maximum-nodes

Specify the maximum number of nodes on which to place an application. The value of this parameter must be a non-negative integer. The default value is 0, which indicates the application can be placed on any number of nodes in the cluster.

--min-nodes --minimum-nodes

Specify the minimum number of nodes where Service Fabric will reserve capacity for this application, this does not mean that the application is guaranteed to have replicas on all those nodes. The value of this parameter must be a non-negative integer. Default value for this is zero, which means no capacity is reserved for the application.

--package-url

Specify the url of the application package sfpkg file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sf application delete

Delete an application.

az sf application delete --application-name
                         --cluster-name
                         --resource-group

Examples

Delete application.

az sf application delete -g testRG -c testCluster --application-name testApp

Required Parameters

--application-name --name

Specify the application name.

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sf application list

List applications of a given cluster.

az sf application list --cluster-name
                       --resource-group

Examples

List applications for a given cluster.

az sf application list -g testRG -c testCluster

Required Parameters

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sf application show

Show the properties of an application on an Azure Service Fabric cluster.

az sf application show --application-name
                       --cluster-name
                       --resource-group

Examples

Get application.

az sf application show -g testRG -c testCluster --application-name testApp

Required Parameters

--application-name --name

Specify the application name.

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sf application update

Update a Azure Service Fabric application. This allows updating the application parameters and/or upgrade the application type version which will trigger an application upgrade.

az sf application update --application-name
                         --cluster-name
                         --resource-group
                         [--application-parameters]
                         [--application-type-version]
                         [--consider-warning-as-error {false, true}]
                         [--failure-action {Manual, Rollback}]
                         [--force-restart {false, true}]
                         [--hc-retry-timeout]
                         [--hc-stable-duration]
                         [--hc-wait-duration]
                         [--max-nodes]
                         [--max-porcent-unhealthy-apps]
                         [--max-porcent-unhealthy-partitions]
                         [--max-porcent-unhealthy-replicas]
                         [--max-porcent-unhealthy-services]
                         [--min-nodes]
                         [--rep-check-timeout]
                         [--service-type-health-policy-map]
                         [--ud-timeout]
                         [--upgrade-timeout]

Examples

Update application parameters and upgrade policy values and app type version to v2.

az sf application update -g testRG -c testCluster --application-name testApp --application-type-version v2 \
  --application-parameters key0=value0 --health-check-stable-duration 0 --health-check-wait-duration 0 --health-check-retry-timeout 0 \
    --upgrade-domain-timeout 5000 --upgrade-timeout 7000 --failure-action Rollback --upgrade-replica-set-check-timeout 300 --force-restart

Update application minimum and maximum nodes.

az sf application update -g testRG -c testCluster --application-name testApp --minimum-nodes 1 --maximum-nodes 3

Required Parameters

--application-name --name

Specify the application name.

--cluster-name -c

Specify the name of the cluster, if not given it will be same as resource group name.

--resource-group -g

Specify the resource group name. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--application-parameters --parameters

Specify the application parameters as key/value pairs. These parameters must exist in the application manifest. for example: --application-parameters param1=value1 param2=value2.

--application-type-version --version

Specify the application type version.

--consider-warning-as-error --warning-as-error

Indicates whether to treat a warning health event as an error event during health evaluation.

Accepted values: false, true
Default value: False
--failure-action

Specify the action to take if the monitored upgrade fails. The acceptable values for this parameter are Rollback or Manual.

Accepted values: Manual, Rollback
--force-restart

Indicates that the service host restarts even if the upgrade is a configuration-only change.

Accepted values: false, true
Default value: False
--hc-retry-timeout --health-check-retry-timeout

Specify the duration, in seconds, after which Service Fabric retries the health check if the previous health check fails.

--hc-stable-duration --health-check-stable-duration

Specify the duration, in seconds, that Service Fabric waits in order to verify that the application is stable before moving to the next upgrade domain or completing the upgrade. This wait duration prevents undetected changes of health right after the health check is performed.

--hc-wait-duration --health-check-wait-duration

Specify the duration, in seconds, that Service Fabric waits before it performs the initial health check after it finishes the upgrade on the upgrade domain.

--max-nodes --maximum-nodes

Specify the maximum number of nodes on which to place an application. The value of this parameter must be a non-negative integer. The default value is 0, which indicates the application can be placed on any number of nodes in the cluster.

--max-porcent-unhealthy-apps --max-unhealthy-apps

Specify the maximum percentage of the application instances deployed on the nodes in the cluster that have a health state of error before the application health state for the cluster is error. Allowed values are form 0 to 100.

--max-porcent-unhealthy-partitions --max-unhealthy-parts

Specify the maximum percent of unhelthy partitions per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.

--max-porcent-unhealthy-replicas --max-unhealthy-reps

Specify the maximum percent of unhelthy replicas per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.

--max-porcent-unhealthy-services --max-unhealthy-servs

Specify the maximum percent of unhelthy services allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.

--min-nodes --minimum-nodes

Specify the minimum number of nodes where Service Fabric will reserve capacity for this application, this does not mean that the application is guaranteed to have replicas on all those nodes. The value of this parameter must be a non-negative integer. Default value for this is zero, which means no capacity is reserved for the application.

--rep-check-timeout --replica-check-timeout --upgrade-replica-set-check-timeout

Specify the maximum time, in seconds, that Service Fabric waits for a service to reconfigure into a safe state, if not already in a safe state, before Service Fabric proceeds with the upgrade.

--service-type-health-policy-map --service-type-policy

Specify the map of the health policy to use for different service types as a hash table in the following format: {"ServiceTypeName" : "MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices"}. For example: @{ "ServiceTypeName01" = "5,10,5"; "ServiceTypeName02" = "5,5,5" }.

--ud-timeout --upgrade-domain-timeout

Specify the maximum time, in seconds, that Service Fabric takes to upgrade a single upgrade domain. After this period, the upgrade fails.

--upgrade-timeout

Specify the maximum time, in seconds, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.