Package structure

Service Fabric expects the application to be packages in a specific directory structure. Let's take an example to understand this further:

|-- ApplicationPackageRoot 
|-- GuestService1Pkg
|-- Code
|-- existingapp.exe
|-- Config
|-- Settings.xml
|-- Data

|-- ServiceManifest.xml
|-- ApplicationManifest.xml

 ApplicationPackageRoot, is the root folder containing the application manifest file - ApplicationManifest.xml. Each sub directory under this folder specifies a service which is part of this application. In the preceding example, GuestService1Pkg is one such service. Every service folder in turn holds the service components. This includes three sub folders holding the code, configuration, and data. The Service folder also holds the service manifest file - ServiceManifest.xml. The Code directory contains the source code for the service. The Config directory contains a settings file - Settings.xml which store the service configuration. The Data folder stores transient data which is used by the service locally. This data is not replicated across service instances. The Config and Code folders are optional.

There are two ways to package a Service Fabric Guest Executable. The easiest way is to use Visual Studio template for Guest Executables. The other way is to package it manually. Let's take a look at both these options.

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

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