From ea32159cf0cc03ab9418c05ae9551d208e62a5e7 Mon Sep 17 00:00:00 2001 From: Xavier Pillons Date: Wed, 21 Feb 2024 13:22:13 +0100 Subject: [PATCH] Login node option in marketplace application (#1850) * vmsize and number of nodes are required for partitions * remove extra) * ssh port is 22 when using bastion * fix wrong bastion ports * use Standard_D4as_v4 for ccportal and scheduler * toolset on alma * fix syntax * fix alma test * fix installation script on CentOS * ccportal as deployer * install in /opt and not root * adding login node in marketplace template --- bicep/mainTemplate.bicep | 18 ++++ .../cc-slurm-workspace/marketplace_config.yml | 11 +- .../cc-slurm-workspace/ui_definition.json | 100 ++++++++++++++++-- 3 files changed, 121 insertions(+), 8 deletions(-) diff --git a/bicep/mainTemplate.bicep b/bicep/mainTemplate.bicep index 3cab39eff..e5c52899e 100644 --- a/bicep/mainTemplate.bicep +++ b/bicep/mainTemplate.bicep @@ -32,7 +32,23 @@ param databaseAdminPassword string = '' @description('Input configuration file in json format') param azhopConfig object +@description('CycleCloud VM Size') +param ccVMSize string = '' +@description('Scheduler VM Size') +param schedulerVMSize string = '' +@description('loginNode VM Size') +param loginVMSize string = '' +@description('htcVMSize VM Size') +param htcVMSize string = '' +@description('hpcVMSize VM Size') +param hpcVMSize string = '' +@description('gpuVMSize VM Size') +param gpuVMSize string = '' + var resource_group_name = azhopConfig.resource_group +// This is to pass the arm-ttk test "VMSizes Must Match Template" and "Outputs Must Be Present In Template Parameters" and "Parameters Must Be Used" +// These values are already filled in the config file, so we are just passing them through +var fakeOutput = '${ccVMSize}/${schedulerVMSize}/${loginVMSize}/${htcVMSize}/${hpcVMSize}/${gpuVMSize}' resource azhopResourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resource_group_name @@ -78,3 +94,5 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { principalType: 'ServicePrincipal' } } + +output fakeOutput string = fakeOutput diff --git a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml index 9e3abc0d0..b8eb92946 100644 --- a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml +++ b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml @@ -147,16 +147,25 @@ queues: max_count: "[steps('Partitions').HTCSection.NodeNumber]" image: "[steps('Partitions').HTCSection.ImageName]" ColocateNodes: false + type: compute - name: hpc vm_size: "[steps('Partitions').HPCSection.vmsize]" max_count: "[steps('Partitions').HPCSection.NodeNumber]" image: "[steps('Partitions').HPCSection.ImageName]" EnableAcceleratedNetworking: true ColocateNodes: true + type: compute - name: gpu vm_size: "[steps('Partitions').GPUSection.vmsize]" max_count: "[steps('Partitions').GPUSection.NodeNumber]" image: "[steps('Partitions').GPUSection.ImageName]" EnableAcceleratedNetworking: true ColocateNodes: true - + type: compute + - name: login + vm_size: "[steps('login').vmsize]" + max_count: "[steps('login').NodeNumber]" + image: "[steps('login').ImageName]" + initial_count: "[steps('login').InitialCount]" + ColocateNodes: false + type: login diff --git a/marketplace/solution/cc-slurm-workspace/ui_definition.json b/marketplace/solution/cc-slurm-workspace/ui_definition.json index 9993091df..a8d479353 100644 --- a/marketplace/solution/cc-slurm-workspace/ui_definition.json +++ b/marketplace/solution/cc-slurm-workspace/ui_definition.json @@ -452,6 +452,86 @@ } ] }, + { + "name": "login", + "label": "Login Node", + "subLabel": { + "preValidation": "Configure your Login node settings", + "postValidation": "Done" + }, + "bladeTitle": "Login Node Settings", + "elements": [ + { + "name": "vmsize", + "type": "Microsoft.Compute.SizeSelector", + "label": "Size", + "toolTip": "Select a VM Size for the Login nodes", + "recommendedSizes": [ + "Standard_F4s_v2" + ], + "options": { + "hideDiskTypeFilter": true + }, + "osPlatform": "Linux", + "visible": true, + "required": true, + "validationMessage": "VMSize is required." + }, + { + "name": "InitialCount", + "type": "Microsoft.Common.Slider", + "label": "Number of nodes to start with", + "toolTip": "Number of nodes to start with when the cluster starts", + "subLabel": "Initial Count", + "defaultValue": 1, + "min": 0, + "max": 8, + "step": 1, + "visible": true, + "required": true, + "validationMessage": "Initial Number of nodes is required" + }, + { + "name": "NodeNumber", + "type": "Microsoft.Common.Slider", + "label": "Max number of nodes", + "toolTip": "Maximum number of nodes to scale to", + "subLabel": "Number", + "defaultValue": 1, + "min": 0, + "max": 8, + "step": 1, + "visible": true, + "required": true, + "validationMessage": "Number of nodes is required" + }, + { + "name": "ImageName", + "type": "Microsoft.Common.DropDown", + "label": "Image Name", + "defaultValue": "Alma Linux 8.7", + "toolTip": "Select the image to use for the Login nodes", + "constraints": { + "allowedValues": [ + { + "label": "Ubuntu 20.04", + "value": "microsoft-dsvm:ubuntu-hpc:2004:latest" + }, + { + "label": "Ubuntu 22.04", + "value": "microsoft-dsvm:ubuntu-hpc:2204:latest" + }, + { + "label": "Alma Linux 8.7", + "value": "almalinux:almalinux-hpc:8_7-hpc-gen2:latest" + } + ], + "required": true, + "validationMessage": "Image Name is required." + } + } + ] + }, { "name": "Partitions", "label": "Partitions", @@ -481,11 +561,11 @@ "visible": true, "required": true, "validationMessage": "VMSize is required." - }, + }, { "name": "NodeNumber", "type": "Microsoft.Common.Slider", - "label": "Number of nodes", + "label": "Max number of nodes", "toolTip": "Maximum number of nodes to scale to", "subLabel": "Number", "defaultValue": 32, @@ -494,7 +574,7 @@ "step": 4, "visible": true, "required": true, - "validationMessage": "Number of nodes is required" + "validationMessage": "Max number of nodes is required" }, { "name": "ImageName", @@ -547,7 +627,7 @@ { "name": "NodeNumber", "type": "Microsoft.Common.Slider", - "label": "Number of nodes", + "label": "Max number of nodes", "toolTip": "Maximum number of nodes to scale to", "subLabel": "Number", "defaultValue": 4, @@ -556,7 +636,7 @@ "step": 2, "visible": true, "required": true, - "validationMessage": "Number of nodes is required" + "validationMessage": "Max number of nodes is required" }, { "name": "ImageName", @@ -611,7 +691,7 @@ { "name": "NodeNumber", "type": "Microsoft.Common.Slider", - "label": "Number of nodes", + "label": "Max number of nodes", "toolTip": "Maximum number of nodes to scale to", "subLabel": "Number", "defaultValue": 4, @@ -620,7 +700,7 @@ "step": 2, "visible": true, "required": true, - "validationMessage": "Number of nodes is required" + "validationMessage": "Max number of nodes is required" }, { "name": "ImageName", @@ -697,6 +777,12 @@ "adminSshPrivateKey": "[if(basics('autogeneratePasswordsAndKeys'),'',basics('adminSshPrivateKey'))]", "adminPassword": "[if(basics('autogeneratePasswordsAndKeys'),'',basics('adminPassword'))]", "databaseAdminPassword": "[if(and(basics('autogeneratePasswordsAndKeys'), steps('scheduler').slurmAccounting)),'',steps('scheduler').databaseAdminPassword)]", + "ccVMSize": "[basics('CycleCloudVmSize')]", + "schedulerVMSize": "[steps('scheduler').vmsize]", + "loginVMSize": "[steps('login').vmsize]", + "htcVMSize": "[steps('Partitions').HTCSection.vmsize]", + "hpcVMSize": "[steps('Partitions').HPCSection.vmsize]", + "gpuVMSize": "[steps('Partitions').GPUSection.vmsize]", "azhopConfig": {} } }