Service Fabric (*.xml) Nodes and Attributes Documentation - azure-service-fabric

From where I can find the documentation which describes all the service fabric configuration XML nodes and attributes? And explains how they can be used?
XML I mean ServiceManifests, Settings, PublishProfiles, ApplicationParameters etc...
Or is there any?

Publish profiles are described in Publish an application to a remote cluster by using Visual Studio. Application parameters are described in Manage application parameters for multiple environments.
Right now, ServiceFabricServiceModel.xsd is the only doc that lists all the settings for ServiceManifest.xml and ApplicationManifest.xml. ServiceFabricServiceModel.xsd is laid down by the Service Fabric SDK and Tools installer are described in C:\Program Files\Microsoft SDKs\Service Fabric\schemas. We're working to improve the descriptions in the .xsd file. Several of our articles on azure.microsoft.com have examples of settings in the application and service manifest.
Hope that helps.

you could find some information here:
https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-services-configuration/
And some piece of information here: https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-resource-manager-cluster-description/

Related

Service Fabric .NET Framework services and ApplicationInsights.config endpoints for Azure gov

I have a service fabric application that hosts api’s with app insights enabled. The api services are .Net framework 4.8 webapi projects and they are native fabric stateless and stateful services. I don’t use the app insights service fabric specific packages, but do have the standard app insights for webapi packages. I have always been in Azure commercial and logs have worked just fine there.
Now that we are in azure gov, the only way to point a .Net Framework app to the gov app insights endpoints is by modifying the ApplicationInsights.config file.
So I’ve modified the file as per msdn, verified it is deployed with the fabric deploy package and its there next to the rest of the dlls on the vms. Yet my services still won’t log to azure gov app insight instances. Nothing is coming through. We set the instrumentation key programmatically, not in applicationinsights.config, could that be an issue? I noticed some of the msdn examples showed instrumentationkey being included in the config file, but would think that is optional.
Had anyone had experience pointing .net 4.8 fabric services to gov app insights?
When using a government cloud, you need to use a connection string instead of an instrumentation key.
Important
Sovereign clouds, such as Azure Government, require the use of the
Application Insights connection string
(APPLICATIONINSIGHTS_CONNECTION_STRING) instead of the instrumentation
key. To learn more, see the APPLICATIONINSIGHTS_CONNECTION_STRING
reference.
More info here and here.
This ended up being an issue with my gov configuration file. The MSDN document wasn't very clear on where the new config sections go. It made it look like they are all nested under the top level node of the config file. Turns out the TelementyChannel override has to go inside the default TelemenySinks node. I contacted microsoft on github about clarifying this in their docs.
Link to the unclear documentation
https://learn.microsoft.com/en-us/azure/azure-monitor/app/custom-endpoints?tabs=net
Link to github issue to get it fixed
https://github.com/MicrosoftDocs/azure-docs/issues/80066

Develop a Service Fabric Web Application without redeploying after each file change

I have stateless .net core 2 Fabric Service Web Application creating using one of the templates that comes with Service Fabric SDK. It is a real pain to develop since I have to do a full deploy before I can see any changes to code/html/script. In my case that operation takes more than 5 minutes.
I have looked at this article that states how it can be done by running the web app from the commandline.
That article is based on Net Core RC2. Does anyone has an updated example on how to do this?
https://dzone.com/articles/aspnet-core-with-kestrel-and-service-fabric
Together with Azure Developer Support i found a solution to speed up the development process
I Fabric Explorer you need to find the node where you Web Application is running. I my case that is _Node_0
By SF SDK design, local SF published file is under C:\SfDevCluster\Data_App\ this folder. In my environment, the website file path is C:\SfDevCluster\Data_App_Node_0\Application1Type_App1\Web1Pkg.Code.1.0.0\wwwroot\lib\bootstrap\dist
So you can also find your HTML, CSS, JS and other static resources under below path:
C:\SfDevCluster\Data_App[node_id][application_type_and_instance_name][service_type_and_version]\
You can just modify the files in this folder, then the change will immediately apply to your local test web browser. Please notice if your service is hosted by micro-service running in several nodes, you may need to modify all nodes files because load balancer may access any folder files randomly.

Overriding custom service fabric application parameters

We have now come to the point in our Service Fabric application development where we need to add a custom parameter that can be overridden at run time (as described in https://azure.microsoft.com/en-us/documentation/articles/service-fabric-manage-multiple-environment-app-configuration/). We're still in the development stage...no azure production environment, yet, so this question mainly concerns running the service fabric cluster from visual studio or thru a powershell script in a VM. I know that Deploy-FabricApplication.ps1 is ran during debug and per its usage instructions in that file I can override custom parameters. However, I can't seem to figure out where I do that in Visual Studio so that when different developers start a debug session they can set the custom parameter value to whatever makes sense in their dev environment. Any ideas? We have a task to research how to better handle secrets storage but we're not quite there, yet.
You can add multiple publish profiles (optionally without checking them in). One for every developer if needed.
For secrets: you can encrypt settings and/or use Azure Key Vault combined with a Service Principal, similar to what is shown here.

How to setup and configure service fabric clusters?

I am reading the docs about service fabric and was also interested to review how to setup a cluster with multiple VM's, but so far I can only guess based on the devclustersetup.ps1 / it's xml file, but I didn't see any docs on it which explains the various configurations and/or API's.
What I would need is how to set up a simple cluster, how to add/remove nodes, monitoring, setting up resource constraints per node etc so I can setup a sample cluster and test few things.
So far I've done these:
installed VC runtime ( as web pi installer fails without it )
installed service fabric and the SDK ( got the installer out of the web pi installers )
tried to change the sample xml, adding multiple hosts, but then with that I ran into the IPv6 only issue in my setup ( see my other question ), so it didnt work out
Thanks
We are working on NanoServer support for Service Fabric. (I am unable to respond to the comment asking about it because I apparently don't have enough points).
Setting up a multi-machine cluster is not supported at this time so you won't find any documentation explaining how to do it.
There will be a public preview of the service in Azure later this year and the platform will be available as part of Windows Server 2016 for on-premise deployments. As those options become available, there will be plenty of guidance explaining how to setup and manage your cluster.
UPDATE: 2016-03-31
Standalone installation on-prem or in another cloud is now available in public preview for Windows Server 2012 R2 and up.

Deploy WEB Service Consumer module

We have recently added some functionality to our web site that requires adding a service reference to an api in an external domain. Adding the reference to a VS2008 project createed a sub-folder in the "Service References" folder and added 18 files to that folder that appear to represent the classes in the api. The api provider also had me add custom binding and client references to system.serviceModel in my web.config file.
Do I have to deploy that entire folder with its 18 files to my production site to use the web service? Does some of it get compiled into my project dll? I can find all kinds of references to deploying a service, but not what is necessary to deploy a service consumption module.
Sorry for short, but I don't have the answer for you. But you can get this answer yourself. This is the only way Iwould get the answer. Deploy it without them, see if it works. If it doesn't deploy with. If it works, then you know.
The good news is that I have to deploy absolutely no files from the project have to be deployed to the production site. Everything the web service consumer application needs gets compiled into the application assembly.