[英]Debugging Azure Service Fabric Application in Visual Studio for 5 node cluster
I am having a very simple use case where I need to setup a 5 node cluster environment in Azure Service Fabric and then debug the code.我有一个非常简单的用例,我需要在 Azure Service Fabric 中设置一个 5 节点集群环境,然后调试代码。
The problem that I am facing is that when I deploy my application locally for a 5 node cluster, since there is only one node that can use my port on machine, my application just runs on 1 node cluster and the deployment fails on other 4 nodes because the port is unavailable.我面临的问题是,当我为 5 节点集群在本地部署我的应用程序时,由于只有一个节点可以使用我的机器上的端口,我的应用程序仅在 1 个节点集群上运行,而在其他 4 个节点上部署失败因为端口不可用。
I am looking for steps to deploy and test multi-node cluster in local environment.我正在寻找在本地环境中部署和测试多节点集群的步骤。 Any lead will be appreciated and is this possible also to test locally a multi-node Azure Service Fabric cluster.任何线索都将不胜感激,这是否也可以在本地测试多节点 Azure Service Fabric 群集。
Can you try this?:你可以试试这个吗?:
Use environment specific settings to define the port number:使用特定于环境的设置来定义端口号:
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="Web1Pkg" ServiceManifestVersion="1.0.0" />
<ResourceOverrides>
<Endpoints>
<Endpoint Name="ServiceEndpoint" Port="[MyWebAPI_PortNumber]"/>
</Endpoints>
</ResourceOverrides>
<ConfigOverrides />
</ServiceManifestImport>
Define an empty default value in the app manifest, to use a random port by default:在应用清单中定义一个空的默认值,默认使用随机端口:
<Parameters>
<Parameter Name="MyWebAPI_PortNumber" DefaultValue="" />
</Parameters>
Define an environment specific override value in cloud.xml, to use port 80 in that environment:在 cloud.xml 中定义特定于环境的覆盖值,以在该环境中使用端口 80:
<Parameters>
<Parameter Name="MyWebAPI_PortNumber" Value="80" />
</Parameters>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.