Reputation: 3227
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.
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.
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.
Upvotes: 5
Views: 294
Reputation: 11470
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:
<Parameters>
<Parameter Name="MyWebAPI_PortNumber" Value="80" />
</Parameters>
More info here.
Upvotes: 3