diff --git a/templates/openpbs.txt b/templates/openpbs.txt index e1b30e0..23a1f67 100644 --- a/templates/openpbs.txt +++ b/templates/openpbs.txt @@ -17,7 +17,11 @@ Autoscale = $Autoscale Region = $Region KeyPairLocation = ~/.ssh/cyclecloud.pem Azure.Identities = $ManagedIdentity - + + # Lustre mounts require termination notifications to unmount + EnableTerminateNotification = ${NFSType == "lustre" || AdditionalNFSType == "lustre" || EnableTerminateNotification} + + TerminateNotificationTimeout = 10m [[[configuration]]] pbspro.version = $PBSVersion # For fast spin-up after Deallocate, force an immediate re-converge on boot @@ -45,9 +49,9 @@ Autoscale = $Autoscale SSD = True [[[configuration cyclecloud.mounts.nfs_shared]]] - type = nfs + type = ${ifThenElse(NFSType == "Builtin", "nfs", NFSType)} mountpoint = /shared - export_path = $NFSSharedExportPath + export_path = ${ifThenElse(NFSType == "lustre", strcat("tcp:/lustrefs", NFSSharedExportPath), NFSSharedExportPath)} address = $NFSAddress options = $NFSSharedMountOptions @@ -58,10 +62,10 @@ Autoscale = $Autoscale [[[configuration cyclecloud.mounts.additional_nfs]]] disabled = ${AdditionalNAS isnt true} - type = nfs - address = $AdditonalNFSAddress + type = $AdditionalNFSType + address = $AdditionalNFSAddress mountpoint = $AdditionalNFSMountPoint - export_path = $AdditionalNFSExportPath + export_path = ${ifThenElse(AdditionalNFSType == "lustre", strcat("tcp:/lustrefs", AdditionalNFSExportPath), AdditionalNFSExportPath)} options = $AdditionalNFSMountOptions @@ -73,7 +77,7 @@ Autoscale = $Autoscale [[[configuration]]] cyclecloud.mounts.nfs_sched.disabled = true - cyclecloud.mounts.nfs_shared.disabled = ${NFSType != "External"} + cyclecloud.mounts.nfs_shared.disabled = ${NFSType == "Builtin"} pbspro.cron_method = $AzpbsCronMethod pbspro.queues.workq.ignore = ${Autoscale != true} pbspro.queues.htcq.ignore = ${Autoscale != true} @@ -130,6 +134,7 @@ Autoscale = $Autoscale [[nodearray execute]] MachineType = $ExecuteMachineType MaxCoreCount = $MaxExecuteCoreCount + Zone = ${ifThenElse(DefineNodesAvailabilityZone, ExecuteAvailabilityZone, {})} Interruptible = $UseLowPrio AdditionalClusterInitSpecs = $ExecuteClusterInitSpecs @@ -217,6 +222,18 @@ Order = 10 Widget.Plugin = pico.form.BooleanCheckBox Widget.Label = Use low priority instances for execute hosts + [[[parameter DefineNodesAvailabilityZone]]] + Label = Specify Availability Zones + DefaultValue = false + Widget.Plugin = pico.form.BooleanCheckBox + Widget.Label = Specify availability zones for nodes + + [[[parameter ExecuteAvailabilityZone]]] + Label = Execute Availability Zone + ParameterType = StringList + Conditions.Hidden := !DefineNodesAvailabilityZone + Description = List of availability zones where execute nodes will be spread + [[parameters Networking]] Order = 40 @@ -259,31 +276,31 @@ Order = 15 ParameterType = StringList Config.Label = Type of NFS to use for this cluster Config.Plugin = pico.form.Dropdown - Config.Entries := {[Label="External NFS"; Value="External"], [Label="Builtin"; Value="Builtin"]} + Config.Entries := {[Label="External NFS"; Value="nfs"], [Label="Builtin"; Value="Builtin"], [Label="Azure Managed Lustre"; Value="lustre"]} DefaultValue = Builtin [[[parameter NFSDiskWarning]]] HideLabel = true Config.Plugin = pico.widget.HtmlTemplateWidget Config.Template := "

Warning: switching an active cluster over to NFS will delete the shared disk.

" - Conditions.Hidden := NFSType != "External" + Conditions.Hidden := NFSType == "Builtin" [[[parameter NFSAddress]]] - Label = NFS IP Address - Description = The IP address or hostname of the NFS server. Also accepts a list comma-separated addresses, for example, to mount a frontend load-balanced Azure HPC Cache. + Label = IP Address + Description = The IP address or hostname of the NFS or Lustre server. Also accepts a list comma-separated addresses, for example, to mount a frontend load-balanced Azure HPC Cache. Config.ParameterType = String - Conditions.Hidden := NFSType != "External" + Conditions.Hidden := NFSType == "Builtin" [[[parameter NFSSharedExportPath]]] Label = Shared Export Path Description = The path exported by the file system DefaultValue = /shared - Conditions.Hidden := NFSType != "External" + Conditions.Hidden := NFSType == "Builtin" [[[parameter NFSSharedMountOptions]]] - Label = NFS Mount Options - Description = NFS Client Mount Options - Conditions.Hidden := NFSType != "External" + Label = Mount Options + Description = Client Mount Options + Conditions.Hidden := NFSType == "Builtin" [[[parameter FilesystemSize]]] Label = Size (GB) @@ -309,28 +326,37 @@ Order = 15 DefaultValue = false Widget.Plugin = pico.form.BooleanCheckBox Widget.Label = Add NFS mount + + [[[parameter AdditionalNFSType]]] + Label = FS Type + ParameterType = StringList + Config.Label = Shared filesystem type of the additional mount + Config.Plugin = pico.form.Dropdown + Config.Entries := {[Label="External NFS"; Value="nfs"], [Label="Azure Managed Lustre"; Value="lustre"]} + DefaultValue = nfs + Conditions.Excluded := AdditionalNAS isnt true - [[[parameter AdditonalNFSAddress]]] - Label = NFS IP Address - Description = The IP address or hostname of the NFS server. Also accepts a list comma-separated addresses, for example, to mount a frontend load-balanced Azure HPC Cache. + [[[parameter AdditionalNFSAddress]]] + Label = IP Address + Description = The IP address or hostname of the NFS or Lustre server. Also accepts a list comma-separated addresses, for example, to mount a frontend load-balanced Azure HPC Cache. Config.ParameterType = String Conditions.Excluded := AdditionalNAS isnt true [[[parameter AdditionalNFSMountPoint]]] - Label = NFS Mount Point + Label = Mount Point Description = The path at which to mount the Filesystem DefaultValue = /data Conditions.Excluded := AdditionalNAS isnt true [[[parameter AdditionalNFSExportPath]]] - Label = NFS Export Path + Label = Export Path Description = The path exported by the file system DefaultValue = /data Conditions.Excluded := AdditionalNAS isnt true [[[parameter AdditionalNFSMountOptions]]] - Label = NFS Mount Options - Description = NFS Client Mount Options + Label = Mount Options + Description = Client Mount Options Conditions.Excluded := AdditionalNAS isnt true @@ -366,7 +392,10 @@ Order = 20 [[parameters Software]] Description = "Specify the scheduling software, and base OS installed on all nodes, and optionally the cluster-init and chef versions from your locker." Order = 10 - + [[[parameter EnableTerminateNotification]]] + Label = Enable Termination notifications + DefaultValue = False + Widget.Plugin = pico.form.BooleanCheckBox [[[parameter SchedulerImageName]]] Label = Scheduler OS