Share via


Start-ServiceFabricComposeDeploymentUpgrade

PREVIEW. Upgrades a Service Fabric compose deployment with a new compose file.

Syntax

UnmonitoredAuto (Default)

Start-ServiceFabricComposeDeploymentUpgrade
    [-DeploymentName] <String>
    [-Compose] <String>
    [[-RegistryUserName] <String>]
    [[-RegistryPassword] <String>]
    [[-UpgradeReplicaSetCheckTimeoutSec] <UInt32>]
    [-PasswordEncrypted]
    [-ForceRestart]
    [-UnmonitoredAuto]
    [-Force]
    [-TimeoutSec <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UnmonitoredManual

Start-ServiceFabricComposeDeploymentUpgrade
    [-DeploymentName] <String>
    [-Compose] <String>
    [[-RegistryUserName] <String>]
    [[-RegistryPassword] <String>]
    [[-UpgradeReplicaSetCheckTimeoutSec] <UInt32>]
    [-PasswordEncrypted]
    [-ForceRestart]
    [-UnmonitoredManual]
    [-Force]
    [-TimeoutSec <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Monitored

Start-ServiceFabricComposeDeploymentUpgrade
    [-DeploymentName] <String>
    [-Compose] <String>
    [[-RegistryUserName] <String>]
    [[-RegistryPassword] <String>]
    [[-UpgradeReplicaSetCheckTimeoutSec] <UInt32>]
    -FailureAction <UpgradeFailureAction>
    [-PasswordEncrypted]
    [-ForceRestart]
    [-Monitored]
    [-HealthCheckRetryTimeoutSec <UInt32>]
    [-HealthCheckWaitDurationSec <UInt32>]
    [-HealthCheckStableDurationSec <UInt32>]
    [-UpgradeDomainTimeoutSec <UInt32>]
    [-UpgradeTimeoutSec <UInt32>]
    [-ConsiderWarningAsError <Boolean>]
    [-DefaultServiceTypeHealthPolicy <String>]
    [-MaxPercentUnhealthyDeployedApplications <Byte>]
    [-ServiceTypeHealthPolicyMap <Hashtable>]
    [-Force]
    [-TimeoutSec <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet is in PREVIEW and is subject to change in the next release(s). There is no compatibility guarantee.

The Start-ServiceFabricComposeDeploymentUpgrade cmdlet upgrades a Service Fabric compose deployment. This cmdlet starts the upgrade on the cluster.

Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

For guidance of Service Fabric compose deployment, please refer to: Compose deployment in Service Fabric

Examples

Example 1: Upgrade a compose deployment

PS C:\> Start-ServiceFabricComposeDeploymentUpgrade -DeploymentName mydeployment -Compose docker-compose.yml -Monitored -FailureAction Rollback

The command performs an monitored automatic upgrade on compose deployment named mydeployment from compose file docker-compose.yml. The upgrade will rollback if monitored upgrade fails. There is no need to register application type beforehand.

Parameters

-Compose

Specifies the file path to a target compose file which describes the Service Fabric compose deployment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConsiderWarningAsError

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

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultServiceTypeHealthPolicy

Specifies the health policy for the default service type to use for the monitored upgrade in the format MaxPercentUnhealthyPartitionsPerService, MaxPercentUnhealthyReplicasPerPartition, MaxPercentUnhealthyServices. For example, 5,10,15 indicates the following values:

  • MaxPercentUnhealthyPartitionsPerService = 5
  • MaxPercentUnhealthyReplicasPerPartition = 10
  • MaxPercentUnhealthyServices = 15

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeploymentName

Specifies the name of compose deployment. The cmdlet upgrades the compose deployment with this name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FailureAction

Specifies the action to take if the monitored upgrade fails. The acceptable values for this parameter are:

  • Rollback
  • Manual

Parameter properties

Type:UpgradeFailureAction
Default value:None
Accepted values:Invalid, Rollback, Manual
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Indicates that this cmdlet skips the warning message and forces the upgrade.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceRestart

Indicates that all the containers in the compose file should be recreated even if the service descriptions didn't change in the new compose file.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HealthCheckRetryTimeoutSec

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

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HealthCheckStableDurationSec

Specifies the duration, in seconds, that Service Fabric waits in order to verify that the application which compose deployment deployed 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.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HealthCheckWaitDurationSec

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

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPercentUnhealthyDeployedApplications

Specifies 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.

Parameter properties

Type:Byte
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Monitored

Indicates that the upgrade mode is monitored. After the cmdlet finishes an upgrade for an upgrade ___domain, if the health of the upgrade ___domain and the cluster meet the health policies that you define, Service Fabric upgrades the next upgrade ___domain. If the upgrade ___domain or cluster fails to meet health policies, the upgrade fails and Service Fabric rolls back the upgrade for the upgrade ___domain or reverts to manual mode per the policy specified. This is the recommended mode for compose deployment upgrades in a production environment.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PasswordEncrypted

Indicates if RegistryPassword is encrypted by Invoke-ServiceFabricEncryptText.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RegistryPassword

Indicates the password of container registry. If this parmameter is provided, RegistryUserName needs to be provided together.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RegistryUserName

Indicates the username of container registry. If this parmameter is provided, RegistryPassword needs to be provided together.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceTypeHealthPolicyMap

Specifies 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" }

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UnmonitoredAuto

Indicates that the upgrade mode is unmonitored automatic. After Service Fabric upgrades an upgrade ___domain, Service Fabric upgrades the next upgrade ___domain irrespective of the application health state. This mode is not recommended for production, and is only useful during development of a compose deployment.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UnmonitoredAuto
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UnmonitoredManual

Indicates that the upgrade mode is unmonitored manual. After Service Fabric upgrades an upgrade ___domain, it waits for you to upgrade the next upgrade ___domain by using the Resume-ServiceFabricApplicationUpgrade cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

UnmonitoredManual
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpgradeDomainTimeoutSec

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

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpgradeReplicaSetCheckTimeoutSec

Specifies the maximum time 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.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:6
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpgradeTimeoutSec

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

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Monitored
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object