Share via


az sf managed-application

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

Commands

Name Description Type Status
az sf managed-application create

Create a new managed application on an Azure Service Fabric managed cluster.

Core GA
az sf managed-application delete

Delete a managed application.

Core GA
az sf managed-application list

List managed applications of a given managed cluster.

Core GA
az sf managed-application show

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

Core GA
az sf managed-application update

Update a Azure Service Fabric managed application.

Core GA

az sf managed-application create

Create a new managed application on an Azure Service Fabric managed cluster.

az sf managed-application create --application-name
                                 --application-type-name
                                 --application-type-version
                                 --cluster-name
                                 --resource-group
                                 [--application-parameters]
                                 [--package-url]
                                 [--tags]

Examples

Create managed 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 managed-application create -g testRG -c testCluster --application-name testApp --application-type-name TestAppType \
  --application-type-version v1 --application-parameters key0=value0 --tags key1=value1

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

az sf managed-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.

--package-url

Specify the url of the application package sfpkg file.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

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 managed-application delete

Delete a managed application.

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

Examples

Delete managed application.

az sf managed-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 managed-application list

List managed applications of a given managed cluster.

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

Examples

List managed applications for a given managed cluster.

az sf managed-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 managed-application show

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

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

Examples

Get managed application.

az sf managed-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 managed-application update

Update a Azure Service Fabric managed application.

This allows for updating the tags, the application parameters, value is the application UpgradePolicy and/or upgrade the application type version which will trigger an application upgrade.

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

Examples

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

az sf managed-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 managed application service type health policy map.

az sf managed-application update -g testRG -c testCluster --application-name testApp --service-type-health-policy-map  "ServiceTypeName01"="5,10,5" "ServiceTypeName02"="5,5,5"

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.

--close-duration --instance-close-delay-duration --instance-close-duration

Specify the duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.

--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-percent-unhealthy-apps --max-percent-unhealthy-deployed-applications --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-percent-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 from 0 to 100.

--max-percent-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 from 0 to 100.

--max-percent-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 from 0 to 100.

--recreate-application

Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.

Accepted values: false, true
Default value: False
--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 key/value pairs in the following format: "ServiceTypeName"="MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices". for example: --service-type-health-policy-map "ServiceTypeName01"="5,10,5" "ServiceTypeName02"="5,5,5".

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--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-mode

Specify the mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.

Accepted values: Monitored, UnmonitoredAuto
--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.