New-​Service​Fabric​Compose​Application

This cmdlet is for PREVIEW feature and is subject to change in the next release(s). There is no compatibility guarantee. Creates a Service Fabric compose application deployment. For guidance of Service Fabric compose application deployment, please refer to: Compose Application support in Service Fabric (https://docs.microsoft.com/azure/service-fabric/service-fabric-docker-compose)

Syntax

New-ServiceFabricComposeApplication
   [-ApplicationName] <Uri>
   [-Compose] <String>
   [-PasswordEncrypted]
   [-RegistryPassword <String>]
   [-RegistryUserName <String>]
   [-TimeoutSec <Int32>]
   [<CommonParameters>]

Description

The New-ServiceFabricComposeApplication cmdlet creates a Service Fabric compose application deployment from a compose file.

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

Examples

Example 1: Create a compose application deployment

PS C:\> New-ServiceFabricComposeApplication -ApplicationName fabric:/composedeployment -Compose docker-compose.yaml

This command creates a compose application deployment named fabric:/composedeployment from compose file docker-compose.yaml. There is no need to register application type beforehand.

Example 2: Create a compose application deployment with registry credential

PS C:\> New-ServiceFabricComposeApplication -ApplicationName fabric:/composedeployment -Compose docker-compose.yaml -RegistryUserName "username" -RegistryPassword "password""

This command creates a compose application deployment named fabric:/composedeployment from compose file docker-compose.yaml. It also provides credential to container registry. There is no need to register application type beforehand.

Required Parameters

-ApplicationName

Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. The cmdlet creates a Service Fabric compose application deployment with this name.

Type:Uri
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Compose

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

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-PasswordEncrypted

Indicates if RegistryPassword is encrypted by Invoke-ServiceFabricEncryptText .

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RegistryPassword

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RegistryUserName

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TimeoutSec

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

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

System.Object

This cmdlet returns a Microsoft.ServiceFabric.Preview.Client.Description.ComposeApplicationDescription object for a Service Fabric compose application.