Skip to content

Commit

Permalink
Add support for Azure Lsv3 VMs (#435)
Browse files Browse the repository at this point in the history
Adds the Lsv3 VM SKUs to the list of VMs which have NVME storage.
  • Loading branch information
arvindshmicrosoft authored Nov 13, 2023
1 parent 2977334 commit d593f2f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions conf/muchos.props.example
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ azure_image_reference = CentOS|OpenLogic|7_9|latest|
# The minimum allowed size for this is 3 nodes for non-HA & 4 nodes for HA setup
numnodes = 8
# The size of each virtual machine. See the following link for other sizes:
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes-general
# https://learn.microsoft.com/en-us/azure/virtual-machines/linux/sizes-general
vm_sku = Standard_D8s_v3
# Each VM will be provisioned with the following type of managed disk
# The azure_disk_device* parameters below specify the Linux device paths Muchos looks for when selecting disks for storage
# The default values below are for using Azure managed disks
azure_disk_device_path = /dev/disk/azure/scsi1
azure_disk_device_pattern = lun*
# If using Azure Lsv2 VMs which have NVME disks for ephemeral storage, use the parameters below instead of the defaults
# If using Azure Lsv2 or Lsv3 VMs which have NVME disks for ephemeral storage, use the parameters below instead of the defaults
# azure_disk_device_path = /dev
# azure_disk_device_pattern = nvme*n1
# Type of the data disk attached to the VMSS. 'Standard_LRS' for HDD, 'Premium_LRS' for SSD, 'StandardSSD_LRS' for Standard SSD
Expand Down
8 changes: 4 additions & 4 deletions docs/azure-ephemeral-disks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ Using ephemeral storage within clusters deployed by Muchos for Azure
--------------------------------------------------------------------

By default for Azure based clusters, Muchos will create 3 data disks, each of size 128GiB, attached to each VM. These
[managed disks](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/managed-disks-overview) provide
[managed disks](https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview) provide
persistent storage which ensures that the data in HDFS is safe and consistent even if the VMs are deallocated (stopped).

However, if you'd like to use only the ephemeral / temporary disk storage for HDFS, you first need to understand that
using temp storage will result in lost data across VM deallocate - start cycles. If that behavior is acceptable
for your dev/test scenario, there are two options available to use ephemeral storage within Azure:
* Use the temporary SSD disk which is available on most VM types. This tends to be smaller in size. Refer to the
[Azure VM sizes](https://docs.microsoft.com/en-us/azure/virtual-machines/dv3-dsv3-series) page for details on temp storage sizes
* Use the [Lsv2 series VMs](https://docs.microsoft.com/en-us/azure/virtual-machines/lsv2-series) which offer larger amounts of NVME based temp storage
[Azure VM sizes](https://learn.microsoft.com/en-us/azure/virtual-machines/dv3-dsv3-series) page for details on temp storage sizes
* Use the [Lsv2 series VMs](https://learn.microsoft.com/en-us/azure/virtual-machines/lsv2-series), [Lasv3 series VMs](https://learn.microsoft.com/en-us/azure/virtual-machines/lasv3-series) or [Lsv3 series VMs](https://learn.microsoft.com/en-us/azure/virtual-machines/lsv3-series) which offer larger amounts of NVME based temp storage

For using "regular" temporary storage (non-NVME), you need to change the following within the `azure` section within muchos.props:
* `data_disk_count` needs to be set to 0
* `mount_root` within the `azure` section needs to be set to `/mnt/resource'

If you'd like larger NVME temporary disks, another option is to use the storage-optimized Lsv2 VM type in Azure. To use the
NVME disks available in these VMs, you must change the following within the `azure` section within muchos.props:
* `vm_sku` needs to be set to one of the sizes from [this page](https://docs.microsoft.com/en-us/azure/virtual-machines/lsv2-series), for example Standard_L8s_v2
* `vm_sku` needs to be set to one of the sizes from [this page](https://learn.microsoft.com/en-us/azure/virtual-machines/lsv2-series), [this page](https://learn.microsoft.com/en-us/azure/virtual-machines/lasv3-series) or [this page](https://learn.microsoft.com/en-us/azure/virtual-machines/lsv3-series), for example Standard_L8s_v2.
* `data_disk_count` needs to be set to 0
* `mount_root` within the `azure` section should be set to `/var/data` (which is also the default)
* `azure_disk_device_path` should be set to `/dev`
Expand Down
20 changes: 16 additions & 4 deletions lib/muchos/config/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,32 @@ def data_dirs_internal(
data_dirs.append(mount_root_actual)
return data_dirs

# Check if using Lsv2 NVME temp storage for HDFS
lsv2_vm_disk_map = {
# Check if using Lsv2 or Lsv3 NVME temp storage for HDFS
nvme_vm_disk_map = {
"Standard_L8s_v2": 1,
"Standard_L16s_v2": 2,
"Standard_L32s_v2": 4,
"Standard_L48s_v2": 6,
"Standard_L64s_v2": 8,
"Standard_L80s_v2": 10,
"Standard_L8s_v3": 1,
"Standard_L16s_v3": 2,
"Standard_L32s_v3": 4,
"Standard_L48s_v3": 6,
"Standard_L64s_v3": 8,
"Standard_L80s_v3": 10,
"Standard_L8as_v3": 1,
"Standard_L16as_v3": 2,
"Standard_L32as_v3": 4,
"Standard_L48as_v3": 6,
"Standard_L64as_v3": 8,
"Standard_L80as_v3": 10,
}

if num_disks == 0 and curr_vm_sku in lsv2_vm_disk_map.keys():
if num_disks == 0 and curr_vm_sku in nvme_vm_disk_map.keys():
# pretend that we have N data disks
# in this case those are NVME temp disks
num_disks = lsv2_vm_disk_map[curr_vm_sku]
num_disks = nvme_vm_disk_map[curr_vm_sku]

# Persistent data disks attached to VMs
range_var = num_disks + 1
Expand Down

0 comments on commit d593f2f

Please sign in to comment.