public static string GetFabricSystemApplicationCodeFolder(DeploymentFolders deploymentFolders, string servicePackageName, string codePackageName, string codePackageVersion) { string applicationDeploymentFolder = deploymentFolders.ApplicationDeploymentFolder; RunLayoutSpecification runLayout = RunLayoutSpecification.Create(); runLayout.SetRoot(applicationDeploymentFolder); return(runLayout.GetCodePackageFolder(Constants.SystemApplicationId, servicePackageName, codePackageName, codePackageVersion, false)); }
public NodeSettings(FabricNodeType fabricNode, ClusterManifestTypeNodeType nodeType, DeploymentFolders deploymentFolders, bool isScaleMin, FabricEndpointsType endpoints) { this.Settings = new List <SettingsTypeSection>(); this.NodeName = fabricNode.NodeName; this.IPAddressOrFQDN = fabricNode.IPAddressOrFQDN; this.DeploymentFoldersInfo = deploymentFolders; AddFabricNodeSection(fabricNode, endpoints, nodeType, isScaleMin); AddDomainIds(fabricNode); AddNodeProperties(nodeType); }
List <NodeSettings> GetNodeSettings(int nodeCount, int start, bool addAppPorts, string ipAddressOrFQDN) { List <NodeSettings> nodes = new List <NodeSettings>(); int leasedriverPort = BaseLeaseDriverPort + start; int appPortStart = BaseAppStartport + start * AppPortRange; int appPortEnd = appPortStart + AppPortRange; int httpGatewayPort = BaseHttpGatewayport + start; int httpAppGatewayPort = BaseHttpAppGatewayport + start; for (int i = 0; i < nodeCount; i++) { string nodeName = string.Format(NodeNameTemplate, i + start); FabricNodeType fabricNode = new FabricNodeType() { NodeName = nodeName, IPAddressOrFQDN = ipAddressOrFQDN, NodeTypeRef = "Test" }; var endpoints = new FabricEndpointsType() { LeaseDriverEndpoint = new InternalEndpointType() { Port = string.Format("{0}", leasedriverPort) }, ClientConnectionEndpoint = new InputEndpointType { Port = "3999" }, ClusterConnectionEndpoint = new InternalEndpointType() { Port = "3998" }, HttpGatewayEndpoint = new InputEndpointType { Port = string.Format("{0}", httpGatewayPort) }, HttpApplicationGatewayEndpoint = new InputEndpointType { Port = string.Format("{0}", httpAppGatewayPort) }, ApplicationEndpoints = addAppPorts ? new FabricEndpointsTypeApplicationEndpoints() { StartPort = appPortStart, EndPort = appPortEnd } : null }; ClusterManifestTypeNodeType type = new ClusterManifestTypeNodeType(); DeploymentFolders folders = new DeploymentFolders("", null, FabricDeploymentSpecification.Create(), nodeName, new Versions("", "", "", ""), false); NodeSettings setting = new NodeSettings(fabricNode, type, folders, true, endpoints); nodes.Add(setting); leasedriverPort++; appPortStart += AppPortRange; appPortEnd += AppPortRange; } return(nodes); }