I first talked about OVF DeploymentOptions back in 2013, which enables an OVF/OVA author to define a set of deployment profiles (e.g. small, medium, large) which then automatically translate to a pre-defined set of compute, network and storage configurations when deploying an OVF/OVA. There are a number VMware Appliances that takes advantage of this OVF capability, the most well known is the vCenter Server Appliance (VCSA) when it prompts you to select the size of the VCSA that you wish to deploy.
Now although the primary driver for DeploymentOptions is for having out of the box resource configurations when deploying an OVF/OVA, it can also be used to control which OVF properties are shown to end users for input based on the selected deployment option.
I recently had a need for this capability and it was only after taking another look at the OVF specification, did I realize this was possible through the use of DeploymentOptions. Below is a quick example on how you can control specific OVF properties. Imagine, we have three deployment options: Development, Stage and Production which maps to the following DeploymentOption IDs: dev, stage and prod
To control whether a specific OVF property is shown for a given deployment option, simply append the following to the Property tag:
ovf:configuration="Id"
Here is an example snippet of various OVF properties which are controlled by specific deployment options:
<Category>Development Settings</Category> <Property ovf:key="guestinfo.knative_host" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:configuration="dev"> <Label>Dev Configuration 1</Label> <Description>Dev Configuration 1</Description> </Property> <Property ovf:key="guestinfo.knative_scheme" ovf:qualifiers="ValueMap{"HTTP","HTTPS"}" ovf:userConfigurable="true" ovf:type="string" ovf:value="HTTP" ovf:configuration="dev"> <Label>Dev Configuration 2</Label> <Description>Dev Configuration 2</Description> </Property> <Property ovf:key="guestinfo.knative_disable_tls_verification" ovf:type="boolean" ovf:userConfigurable="true" ovf:value="false" ovf:configuration="dev"> <Label>Dev Configuration 3</Label> <Description>Dev Configuration 3</Description> </Property> <Category>Stage Configuration</Category> <Property ovf:key="guestinfo.openfaas_password" ovf:password="true" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:configuration="stage"> <Label>Stage Setting 1</Label> <Description>Stage Setting 1</Description> </Property> <Property ovf:key="guestinfo.openfaas_advanced_options" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:configuration="stage"> <Label>Stage Setting 2</Label> <Description>Stage Setting 2</Description> </Property> <Category>Production Settings</Category> <Property ovf:key="guestinfo.aws_eb_access_key" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:configuration="prod"> <Label>Prod Setting 1</Label> <Description>Prod Setting 1</Description> </Property> <Property ovf:key="guestinfo.aws_eb_access_secret" ovf:type="string" ovf:userConfigurable="true" ovf:value="" ovf:configuration="prod"> <Label>Prod Setting 2</Label> <Description>Prod Setting 2</Description> </Property>
Here is example of what a user would see when the Development deployment option is selected:
Here is example of what a user would see when the Stage deployment option is selected:
Thanks for the comment!