WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / Quick Tip - Dynamic OVF input properties using DeploymentOptions

Quick Tip - Dynamic OVF input properties using DeploymentOptions

07.23.2021 by William Lam // Leave a Comment

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{&quot;HTTP&quot;,&quot;HTTPS&quot;}" 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:

More from my site

  • Deploy a truly dynamic OVF using Deployment Option based on the 4 Computes (CPU, Memory, Storage & Network)
  • Quick Tip - Certificate is not trusted when importing signed OVF/OVA into vCenter Server
  • Auditing vSphere Datastore activities (Download, Upload, Copy, Move, Rename and Delete)
  • Why does Deploy OVF Template operation show vpxd-extension-[uuid]?
  • How to build a customizable Raspberry Pi OS Virtual Appliance (OVA)?

Categories // Automation, OVFTool Tags // DeploymentOptionSection, ova, ovf

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC) across Private, Hybrid and Public Cloud

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Easily disable vSphere Cluster Services (vCLS) using UI/API in vSphere 8.0 Update 2 09/21/2023
  • ESXi on Lenovo ThinkStation P3 Tiny 09/20/2023
  • How to setup custom vSphere Content Library on a Synology? 09/19/2023
  • ESXi on SolidRun V3000 09/18/2023
  • Synology NFS VAAI Plug-in support for vSphere 8.0 09/14/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...