azure-service-fabric

How to download Service Fabric certificate?

北城以北 提交于 2021-02-19 05:33:36
问题 I'm working on Azure Service Fabric , It is already created and in Security tab I can able to see Primary certificate and Thumbprint as well. I want to know How can I download this certificate and import it into my local machine. As Cloud explorer giving me error: Cloud Explorer could not connect to cluster 'Testcluster': Unable to find a matching client certificate. Make sure you have the certificate installed on this machine. 回答1: Check out this step by step explanation here. You'll need to

Service Fabric Cluster status “Upgrade service unreachable”

天大地大妈咪最大 提交于 2021-02-19 03:16:23
问题 I Had SF cluster made of 3 Standard A0 nodes. I scaled cluster in to 1 node and understood that this was bad idea because nothing was working in this state (even SF explorer was not working) Then I scaled it out back to 3 nodes and restarted Primary scaleser. Now all nodes in scaleset are up and running but SF cluster status is "Upgrade service unreachable". I saw similar question Service Fabric Status: Upgrade service unreachable where was recommended to scale nodes up to D2 but this hasn't

Service Fabric Cluster status “Upgrade service unreachable”

╄→尐↘猪︶ㄣ 提交于 2021-02-19 03:16:19
问题 I Had SF cluster made of 3 Standard A0 nodes. I scaled cluster in to 1 node and understood that this was bad idea because nothing was working in this state (even SF explorer was not working) Then I scaled it out back to 3 nodes and restarted Primary scaleser. Now all nodes in scaleset are up and running but SF cluster status is "Upgrade service unreachable". I saw similar question Service Fabric Status: Upgrade service unreachable where was recommended to scale nodes up to D2 but this hasn't

How to Mock config file in .Net Core with xUnit

跟風遠走 提交于 2021-02-11 15:00:44
问题 I want to mock the config file values in .NET Core. I am using xUnit for unit test. I am using application insight. I use config file for configuration. Now I want to mock that .cs config file in my unit test case. var configurationPackage = statelessServiceContext.CodePackageActivationContext.GetConfigurationPackageObject("Config"); var appInsightsSection = configurationPackage.Settings.Sections["AppInsightsConfig"]; var appInsightsInstrumentationKey = appInsightsSection.Parameters[

How to Mock config file in .Net Core with xUnit

≡放荡痞女 提交于 2021-02-11 15:00:03
问题 I want to mock the config file values in .NET Core. I am using xUnit for unit test. I am using application insight. I use config file for configuration. Now I want to mock that .cs config file in my unit test case. var configurationPackage = statelessServiceContext.CodePackageActivationContext.GetConfigurationPackageObject("Config"); var appInsightsSection = configurationPackage.Settings.Sections["AppInsightsConfig"]; var appInsightsInstrumentationKey = appInsightsSection.Parameters[

How do you run a variable number of concurrent parametrizable infinite loop type of threads in C#?

随声附和 提交于 2021-02-11 14:23:00
问题 I am creating my first multithreading C#/.NET based app that will run on a Azure Service Fabric cluster. As the title says, I wish to run a variable number of concurrent parametrizable infinite-loop type of threads, that will utilize the RunAsync method. Each child thread looks something like this: public async Task childThreadCall(...argument list...) { while (true) { try { //long running code //do something useful here //sleep for an independently parameterizable period, then wake up and

how to mount a file share in azure service fabric

夙愿已清 提交于 2021-02-11 08:48:23
问题 I need to access files using standard file API in a Service Fabric service. My application read from files and write to files that are stored in a File Share; each node process a different part of the data. I'm using the "SetupEntryPoint" to run a batch file with a "net use" command to mount a local drive to my file share but it fails (both on my local machine and when deployed on Azure). I'm referring to this article. The same batch runs well on a regular virtual machine but fails on a

How to pass an Azure pipeline variable to an ARM template used by AzureResourceManagerTemplateDeployment@3 task?

旧城冷巷雨未停 提交于 2021-02-11 08:08:03
问题 I am trying to perform the following 2 steps in my Azure pipeline scheduled for every night: Put a self-signed cert into a keyvault Deploy Service Fabric cluster via ARM template and use the cert thumbprint and secret id as params. The first step of creating the certificate in the keyvault works well for me: # import the self-signed certificate ccg-self-signed-cert into the Keyvault - task: AzurePowerShell@5 inputs: azureSubscription: '${{ parameters.ArmConnection }}' ScriptType:

Processes still keep running after Service Fabric App is removed

不问归期 提交于 2021-02-10 05:51:40
问题 I have seen that when I remove a service fabric application. The old processes for the services inside the application still keep running. The services included in the Apps are of types Actors Stateless Services ASP.NET Core I noticed the problem when I redeployed the application and the ASP.NET Core service threw an error for "EADDRINUSE address already in use" Is there a proper way to cleanly remove the application which stops all the internal processes for the services? Is there any

How to use Moq framework to unit test azure service fabrics?

[亡魂溺海] 提交于 2021-02-08 15:36:37
问题 I am planning to use Moq for unit testing my azure service fabric application. I saw some of the examples here https://github.com/Azure-Samples/service-fabric-dotnet-web-reference-app/blob/master/ReferenceApp/Inventory.UnitTests/InventoryServiceTests.cs. The test I saw seems like actually writing to reliable dictionary and not mocking. Is there way to mock the add/remove from reliable dictionary? How do I unit test something like below public async Task<bool> AddItem(MyItem item) { var items