vmware / dscr-for-vmware

The Repository contains Microsoft PowerShell Desired State Configuration (DSC) Resources for managing VC and ESXi settings.
Other
139 stars 41 forks source link

DatastoreCluster DSC Resource #267

Closed SimeonGerginov closed 4 years ago

SimeonGerginov commented 4 years ago

Added

Changed

SimeonGerginov commented 4 years ago

Example usage of DatastoreCluster DSC Resource:

DatastoreCluster DatastoreCluster {
    Server = $Server
    Credential = $Credential
    Name = 'DscDatastoreCluster'
    Location = ''
    DatacenterName = 'Datacenter'
    DatacenterLocation = ''
    Ensure = 'Present'
    IOLatencyThresholdMillisecond = 50
    IOLoadBalanceEnabled = $true
    SdrsAutomationLevel = 'FullyAutomated'
    SpaceUtilizationThresholdPercent = 50
}
danielboth commented 4 years ago

Epic you got this so quickly @SimeonGerginov, looking at this, what would be your vision on adding datastores to a datastore cluster through DSC?

SimeonGerginov commented 4 years ago

Epic you got this so quickly @SimeonGerginov, looking at this, what would be your vision on adding datastores to a datastore cluster through DSC?

Well, we have two options that I can think of:

  1. Add another property to the current DSC Resource - DatastoreNames with which we specify which Datastores should be in the DatastoreCluster.
  2. Create a new DSC Resource that is similar to the VDSwitchVMHost DSC Resource where we specify the DatastoreCluster and the DatastoreNames which should be part of the DatastoreCluster.

I prefer the second approach, so that we can be consistent with the previous DSC Resources but also this way the logic for adding/removing Datastores will be separated from the creation and modification of the DatastoreCluster. And this way with the three DSC Resources: VmfsDatastore, DatastoreCluster and the new one you can create a Configuration that can be managed more easily.

Maybe we should create a separate issue where the discussion can occur ?