master branch | dev branch |
---|---|
The Lability module enables simple provisioning of Windows Hyper-V development and testing environments. It uses a declarative document for machine configuration. However, rather than defining configurations in an external custom domain-specific language (DSL) document, Lability extends existing PowerShell Desired State Configuration (DSC) configuration (.psd1) documents with metadata that can be interpreted by the module.
By using this approach, it allows the use of a single configuration document to describe all properties for provisioning Windows-centric development and/or test environments.
The Lability module will parse the DSC configuration document and provision Hyper-V virtual machines according to the metadata contained within. When invoked, Lability will parse a DSC configuration document and automagically provision the following resources:
An example DSC configuration document might look the following. Note: this is a standard DSC .psd1 configuration document, but has been extended with specific properties which the Lability module can interpret.
@{
AllNodes = @(
@{
NodeName = 'DC1';
Lability_ProcessorCount = 2;
Lability_SwitchName = 'CORPNET';
Lability_Media = '2012R2_x64_Standard_EN_Eval';
},
@{
NodeName = 'APP1';
Lability_ProcessorCount = 1;
Lability_SwitchName = 'CORPNET';
Lability_Media = '2012R2_x64_Standard_EN_Eval';
}
)
NonNodeData = @{
Lability = @{
Network = @(
@{
Name = 'CORPNET';
Type = 'Internal';
}
) #end Network
} #end Lability
} #end NonNodeData
}
When Start-LabConfiguration
is invoked with the above configuration document, it will:
More examples can be found in the .\Examples folder of the module's root directory.
A brief introduction to the VirtualEngineLab module presented at the European PowerShell Summit 2015 can be found here. Other generous members of the community have written some comprehensive guides to compliment the built-in documentation – a BIG thank you!