Saturday, September 9, 2017

Azure service fabric


Azure service fabric application contains
Application manifest : It contains the application metadata and the details about one or more services
Service manifest  : It contains details about the code, data and config
Settings.xml  : To provide the configuration values for the services

Service can be stateless or state full services. State full service can be further partitioned which can have further replica

Partition is done when there is huge amount of data to be highly sclalable

We can easily increase the instance of the service by specifying the instance count

Deploy azure service application
  • Create a package in VS
  • Upload the package to image store
  • Create a template or the application type 
  • Create the application or instance
  • Create the service instance 
Upgrade the application
  • Change the version of the manifest files
  • Update the package to image store
  • Run the application upgrade command 

Powershell to deploy the azure service fabric application

Connect-serviceFabricCluster -ConnectionEndpoint serverfabriccluster.southindia.cloudapp.azure.com:19000

Import-Module "$ENV:ProgramFiles\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1"

$path = "c:\users\girish\documents\visual studio 2015\Projects\stateful\stateful\pkg\Debug"

Copy-ServiceFabricApplicationPackage -ApplicationPackagePath $path -ApplicationPackagePathInImageStore MyApplicationV1 -ImageStoreConnectionString (Get-ImageStoreConnectionStringFromClusterManifest(Get-ServiceFabricClusterManifest)) -TimeoutSec 1800

Register-ServiceFabricApplicationType MyApplicationV1

Get-ServiceFabricApplicationType

New-ServiceFabricApplication fabric:/MyApp statefulType 1.0.0


Powershell to remove  the azure service fabric application 

Remove-ServiceFabricApplication fabric:/MyApp
Remove-ServiceFabricApplicationType statefulType 1.0.0


NodeTypes

Service Fabric is made up of Nodetypes which can be defined has a front end and back end and each node type will have its own subnet and each subnet can have it own NSG rules

Types of Application 

one classic application which will run as a guest executables
and the other microservice application which will use the service fabric programming model 

Durability: Azure service fabric uses VMSS which provides auto scaling but this does not mean we can get the scale required very faster. so we have durability which helps in provisioning the scale faster : To use the durabilty of silver, you can create it by ARM templates, By default broze and gold are available in the default azure template

Reliability is based on the number of replicas.To create the reliability tier of silver ,bronze, gold and platnium , we need to use the ARM templates









No comments:

Post a Comment