service-fabric | Service Fabric is a distributed systems platform | Continuous Deployment library
kandi X-RAY | service-fabric Summary
kandi X-RAY | service-fabric Summary
Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale. Service Fabric runs on Windows and Linux, on any cloud, any datacenter, across geographic regions, or on your laptop.Service Fabric represents the next-generation platform for building and managing these enterprise-class, tier-1, cloud-scale applications running in containers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of service-fabric
service-fabric Key Features
service-fabric Examples and Code Snippets
Community Discussions
Trending Discussions on service-fabric
QUESTION
I am having a Service Fabric stateless app.
Using the following code for ServiceInstanceListener:
...ANSWER
Answered 2021-Sep-23 at 06:37You can modify your code like this:
QUESTION
Is there a way to get an Azure AD Service Principal ID with an in-built ARM template function? I'm looking for the ARM equivalent of Get-AzADServicePrincipal -DisplayName "Azure Service Fabric Resource Provider"
and drawing a blank.
Context: I'm following a tutorial on deploying a Service Fabric managed cluster using an existing load balancer, and the tutorial requests that you run a powershell command to get the resource provider's service principal ID and then hard-code said ID in the ARM template. This ID is expected to vary by tenant, and the same template will be deployed to multiple tenants.
...ANSWER
Answered 2021-Sep-14 at 10:38We can use Resource Provider Namespace as Microsoft.ServiceFabric
Also, can use in the below way to get the principle id, just need to pass few parameters.
QUESTION
Is it possible to get a list of Operating Systems supported by Azure Service Fabric cluster in the PowerShell or Azure CLI?
Azure CLI documentationOfficial Azure CLI documentation provides list of available OS: --os {UbuntuServer1604, WindowsServer1709, WindowsServer1709withContainers, WindowsServer1803withContainers, WindowsServer1809withContainers, WindowsServer2012R2Datacenter, WindowsServer2016Datacenter, WindowsServer2016DatacenterwithContainers, WindowsServer2019Datacenter, WindowsServer2019DatacenterwithContainers}
Azure PortalPortal has updated list of OS:
Service Fabric documentationOfficial documentation provides a table of supported OS versions. link
ProblemsThe documentation looks outdated and it is difficult to determine the value of a parameter for the Azure CLI command from the parameter name.
I want to use "WindowsServer datacenter-core-1909-with-containers" but can't figure out the --os parameter value to achieve it.
...ANSWER
Answered 2021-May-06 at 02:38Unfortunately, PowerShell and CLI both don't support OS WindowsServer datacenter-core-1909-with-containers
, it is clear in the doc.
For the latest powershell New-AzServiceFabricCluster
:
For the latest CLI az sf cluster create
:
QUESTION
For GDPR reasons, I need to ensure that I don't store customer data which I no longer need. When looking at Service Fabric Actors, I am uncertain what "garbage collection" really means.
...ANSWER
Answered 2021-Apr-26 at 06:39Garbage collection (in this context) means that an Actor object is removed from memory to free up resources. If the Actor has StatePersistence.Persisted
its state will be written to disk on each replica of the underlying ActorService
. Even if you're not explicitly storing anything in the StateManager
, a record of the Actor (using ActorId
as key) will exist.
It's up to you as a developer to manage the lifecycle of Actor state. Deleting an Actor explicitly, also deletes its state.
Garbage collection of deactivated actors only cleans up the actor object, but it does not remove data that is stored in an actor's State Manager. When an actor is reactivated, its data is again made available to it through the State Manager. In cases where actors store data in State Manager and are deactivated but never reactivated, it may be necessary to clean up their data.
More info here.
QUESTION
All,
I have some problem setting up end-2-end transaction monitoring in ApplicationInsights, it seems to break the end-2-end view on my ServiceFabric ApiGateway service (.net CORE). This results in 2 traces in AppInsights instead of 1 (which I want ;-).
Ok my setup:
So an external API (.net core) which communicates to a ApiGateway (.net core stateless service) in a SF cluster via HTTP. Within the SF cluster all service (stateless full .net) communication is via Remoting V2.
I setup ApplicationInsights using ex. : https://github.com/yantang-msft/service-fabric-application-insights-example
In ApplicationInsights I see 2 traces (which should be one), being:
- a trace containing External API & ApiGateWay and the request to the stateless service
- a trace containing communication between the stateless services (which are multiple)
It looks like the "Operation Id" is not reused when sending the message from the APIGateway down. Is AppInsights i can see the "Operation Id" differ.
Does anyone have a idea? An I missing something? Should I set the operation id on the outgoing request in the ApiGateway (and how can I do that ;-))
...ANSWER
Answered 2021-Feb-05 at 09:17After some contact (https://github.com/microsoft/ApplicationInsights-ServiceFabric/issues/115) the issue became clear.
It's because of the new version of AppInsight is using a new protocol, which is in the .net version of the library. You can force AppInsights to use the "old" protocol and then the end to end trace works again. You can to this by setting the ActivityIDformat property to legacy one like below. (somewhere in app startup)
QUESTION
I am attempting to try out Service Fabric on my local MacBook Pro running Docker Desktop. I'm following along with Microsoft's documentation located here: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-mac
When I go to launch the Docker container, I'm calling this command
...ANSWER
Answered 2021-Jan-20 at 23:53https://github.com/docker/for-mac/issues/5247
So... it turns out to be a bug with IPv6, Mac, and Docker.
QUESTION
This is a followup question to Specific questions about unit-testing Service Fabric Applications using Mocks
I am using Xunit along with ServiceFabric.Mocks to Unit Test my application. My Service Fabric application looks like this:
...ANSWER
Answered 2020-Dec-21 at 07:50You're on the right track!
- Step 1.
The classes ConfigurationSection
and ConfigurationProperty
are in SF namespace System.Fabric.Description
. Add a using
for the namespace
- Step 2.
Please upgrade to ServiceFabric.Mocks v4.2.8. This adds support to mock the DataPackage
property on MockCodePackageActivationContext
.
See this page for an example.
- Step 3.
Use the created context as a constructor argument. Change this code:
QUESTION
This question is a follow up to: Writing UnitTests for a Service Fabric Application Class
My application definition is of the type - simplified it to solve the most basic of problems I am facing:
...ANSWER
Answered 2020-Dec-17 at 10:31You can use below piece of code to mock the line:
QUESTION
I'm trying to run the sample script found here: https://docs.microsoft.com/en-au/azure/service-fabric/service-fabric-quickstart-containers-linux#create-a-service-fabric-cluster
...ANSWER
Answered 2020-Nov-10 at 09:23I see you use the Shell script, it's more appropriate to run in Linux. For Windows, the PowerShell script is more suitable. And in Windows, the variables need to be set like this:
QUESTION
I can't figure out how to use an AspNet Core 3.1 Web Api with Service Fabric and Autofac, and also how to have it ready for a TestServer to run for integration/functional testing.
The documentation is very incomplete.
Autofac documentation shows how to modify Program.cs
to build autofac container, but it does not mention anything about the Startup.cs class that all the web api have:
https://autofaccn.readthedocs.io/en/latest/integration/servicefabric.html
Also the only example that Autofac has for service fabric is not a web api: https://github.com/autofac/Examples/tree/master/src/ServiceFabricDemo
There are other questions without valid answers: Service Fabric AspNet Core 3.1 Autofac WebHostBuilder
Does anybody have any example on how to achieve this?
I can achieve the following (please see my GitHub repository with the sample)
- Service fabric with stateless AspNet Core WebApi project (dotnet core 3.1)
- Using Microsoft Dependency Injection to register services
- Using TestServer to run integration tests on the http endpoint, and able to overwrite dependency injection registrations in a clean way without having to create another Startup class
I want the exact same, but using Autofac as DI container.
UPDATE 1:
I can't add Autofac to a WebHostBuilder
and the ConfigureServices(IServiceCollection services)
must be void as per AspNet Core 3.1+, so this is where I'm stuck. How to replace MS Dependency Injection in my sample
ANSWER
Answered 2020-Oct-15 at 11:52Event after the bounty there is not an answer to this. Maybe it's not possible as service fabric requires WebHost and not generic host.
In any case, I managed to have it working with older versions. Here's my repository where I show a sample on how to run AspNetCore2.1 with DotNetCore2.1 (LTS) and Autofac under Service Fabric. I use the webhost builder, not the generic one.
Still, it'd be nice to eventually have a valid answer to the question.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install service-fabric
To start the build inside of a docker container you can clone the repository and run this command from the root directory:. This will do a full build of the project with the output being placed into the out directory. For more options see runbuild.sh -h.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page