Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Packaging SF service into a single file

I am working through how to automate the build and deploy of my Service Fabric app. Currently I'm working on the package step and while it is creating files within the pkg subfolder it is always creating a folder hierarchy of files, not a true package in a single file. I would swear I've seem a .SFPKG file (or something similarly named) that has everything in one file (a zip maybe?). Is there some way to to create such a file with msbuild?

Here's the command line I'm using currently:

msbuild myservice.sfproj "/p:Configuration=Dev;Platform=AnyCPU" /t:Package /consoleloggerparameters:verbosity=minimal /maxcpucount

I'm concerned about not having a single file because it seems inefficient in sending a new package up to my clusters, and it's harder for me to manage a bunch of files on a build automation server.

like image 393
BrettRobi Avatar asked Aug 25 '16 22:08

BrettRobi


People also ask

How do I create a Sfpkg file?

To create an sfpkg file, start with a folder that contains the original application package, compressed or not. Then, use any utility to zip the folder with the extension ". sfpkg". For example, use ZipFile.

What is service executable Guest fabric?

Guest executables are treated by Service Fabric like stateless services. As a result, they are placed on nodes in a cluster, based on availability and other metrics. This article describes how to package and deploy a guest executable to a Service Fabric cluster, by using Visual Studio or a command-line utility.

How does fabric service work?

Service Fabric can deploy applications in seconds, at high density with hundreds or thousands of applications or containers per machine. With Service Fabric, you can mix both services in processes and services in containers in the same application.


1 Answers

I believe you read about the .sfpkg at https://azure.microsoft.com/documentation/articles/service-fabric-get-started-with-a-local-cluster

Note that internally we do not yet support provisioning a .sfpkg file. This is a feature that will be coming in soon (date TBD). Instead, we upload each file in the application package.

Update (SF 6.1 - April 2018)

Since 6.1 it is possible to create a ZIP file (*.sfpkg) and upload it to an external store. Service Fabric executes a GET operation to download the sfpkg application package. For more infos see https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-package-apps#create-an-sfpkg

NOTE: This only works with external provisioning, the Azure image store still doesn't support sfpkg files.

like image 80
Oana Platon Avatar answered Jan 03 '23 23:01

Oana Platon