Deployment

A PowerShell script can be used to manually deploy a package to a Service Fabric cluster:

Connect-ServiceFabricCluster localhost:19000 

Write-Host 'Copying application package...'
Copy-ServiceFabricApplicationPackage -ApplicationPackagePath 'C:DevMultipleApplications' -ImageStoreConnectionString 'file:C:SfDevClusterDataImageStoreShare' -ApplicationPackagePathInImageStore 'nodeapp'

Write-Host 'Registering application type...'
Register-ServiceFabricApplicationType -ApplicationPathInImageStore 'nodeapp'

New-ServiceFabricApplication -ApplicationName 'fabric:/nodeapp' -ApplicationTypeName 'NodeAppType' -ApplicationTypeVersion 1.0

New-ServiceFabricService -ApplicationName 'fabric:/nodeapp' -ServiceName 'fabric:/nodeapp/nodeappservice' -ServiceTypeName 'NodeApp' -Stateless -PartitionSchemeSingleton -InstanceCount 1

The InstanceCount parameter in the preceding script specifies the number of instances of the application to be deployed in the cluster. This value can be set to -1 if the application needs to be deployed on every node of the Service Fabric cluster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.180.252