diff --git a/src/deploy-cromwell-on-azure/Configuration.cs b/src/deploy-cromwell-on-azure/Configuration.cs index 609293a3..09e072de 100644 --- a/src/deploy-cromwell-on-azure/Configuration.cs +++ b/src/deploy-cromwell-on-azure/Configuration.cs @@ -40,7 +40,7 @@ public abstract class UserAccessibleConfiguration public string SubscriptionId { get; set; } public string RegionName { get; set; } public string MainIdentifierPrefix { get; set; } = "coa"; - public string VmSize { get; set; } = "Standard_D4s_v3"; + public string VmSize { get; set; } = "Standard_B4ms"; public string VnetAddressSpace { get; set; } = "10.1.0.0/16"; // 10.1.0.0 - 10.1.255.255, 65536 IPs // Address space for CoA services. public string VmSubnetAddressSpace { get; set; } = "10.1.0.0/24"; // 10.1.0.0 - 10.1.0.255, 256 IPs @@ -60,7 +60,7 @@ public abstract class UserAccessibleConfiguration public string AksCoANamespace { get; set; } = "coa"; public bool ManualHelmDeployment { get; set; } public string HelmBinaryPath { get; set; } = OperatingSystem.IsWindows() ? @"C:\ProgramData\chocolatey\bin\helm.exe" : "/usr/local/bin/helm"; - public int AksPoolSize { get; set; } = 2; + public int AksPoolSize { get; set; } = 1; public bool? CrossSubscriptionAKSDeployment { get; set; } = null; public bool Silent { get; set; } public bool DeleteResourceGroupOnFailure { get; set; } diff --git a/src/deploy-cromwell-on-azure/Deployer.cs b/src/deploy-cromwell-on-azure/Deployer.cs index 5a4291d3..f993103a 100644 --- a/src/deploy-cromwell-on-azure/Deployer.cs +++ b/src/deploy-cromwell-on-azure/Deployer.cs @@ -413,6 +413,18 @@ await Execute("Connecting to Azure Services...", async () => if (installedVersion is null || installedVersion < new Version(5, 5, 1)) { + var pool = aksCluster.Data.AgentPoolProfiles.FirstOrDefault(pool => "nodepool1".Equals(pool.Name, StringComparison.OrdinalIgnoreCase)); + + if (pool.Count == 2 && pool.Count != configuration.AksPoolSize) + { + pool.Count = configuration.AksPoolSize; + + aksCluster = (await Execute("Updating AKS cluster...", async () => + (await updateConflictRetryPolicy.ExecuteAsync(() => + resourceGroup.GetContainerServiceManagedClusters().CreateOrUpdateAsync( + WaitUntil.Completed, aksCluster.Data.Name, aksCluster.Data, cts.Token))))).Value; + } + var cromwellConfig = GetBlobClient(storageAccountData, ConfigurationContainerName, CromwellConfigurationFileName); var configContent = await DownloadTextFromStorageAccountAsync(cromwellConfig, cts.Token); diff --git a/src/deploy-cromwell-on-azure/scripts/helm/templates/cromwell-deployment.yaml b/src/deploy-cromwell-on-azure/scripts/helm/templates/cromwell-deployment.yaml index 0faa349d..cf244709 100644 --- a/src/deploy-cromwell-on-azure/scripts/helm/templates/cromwell-deployment.yaml +++ b/src/deploy-cromwell-on-azure/scripts/helm/templates/cromwell-deployment.yaml @@ -40,10 +40,10 @@ spec: - containerPort: {{ .Values.service.cromwellPort }} resources: requests: - cpu: "1.0" - memory: "1024Mi" + cpu: "1" + memory: "1Gi" limits: - cpu: "8.0" + cpu: "4.0" memory: "4096Mi" securityContext: allowPrivilegeEscalation: false diff --git a/src/deploy-cromwell-on-azure/scripts/helm/templates/tes-deployment.yaml b/src/deploy-cromwell-on-azure/scripts/helm/templates/tes-deployment.yaml index 0a39d07e..d05ce388 100644 --- a/src/deploy-cromwell-on-azure/scripts/helm/templates/tes-deployment.yaml +++ b/src/deploy-cromwell-on-azure/scripts/helm/templates/tes-deployment.yaml @@ -128,11 +128,11 @@ spec: - containerPort: {{ .Values.service.tesPort }} resources: requests: - cpu: "1.5" - memory: "3072Mi" + cpu: "1.0" + memory: "1Gi" limits: - cpu: "8.0" - memory: "8192Mi" + cpu: "2.0" + memory: "4Gi" securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/src/deploy-cromwell-on-azure/scripts/helm/templates/triggerservice-deployment.yaml b/src/deploy-cromwell-on-azure/scripts/helm/templates/triggerservice-deployment.yaml index 7eefcd03..9a2c0ae2 100644 --- a/src/deploy-cromwell-on-azure/scripts/helm/templates/triggerservice-deployment.yaml +++ b/src/deploy-cromwell-on-azure/scripts/helm/templates/triggerservice-deployment.yaml @@ -54,10 +54,10 @@ spec: name: triggerservice resources: requests: - cpu: "0.5" + cpu: "0.25" memory: "256Mi" limits: - cpu: "2.0" + cpu: "1.0" memory: "1024Mi" securityContext: allowPrivilegeEscalation: false