Skip to content

Instantly share code, notes, and snippets.

@fabiand
Last active September 11, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiand/cb038f79937fadcb142350abf65813b0 to your computer and use it in GitHub Desktop.
Save fabiand/cb038f79937fadcb142350abf65813b0 to your computer and use it in GitHub Desktop.

A VM is defined by three aspects

  • Size
  • Guest
  • Workload
kind: Template
objects:
- kind: VM
metadata:
name: Large Fedora Compute
annotations:
validations: >
spec.domain.guest.memory: range(3,4)
spec.domain.cpu.model: [host, passthrough]
spec.domain.devices.disks[*].bus: [virtio, sata]
spec.domain.devices.disks[*].bus: [virtio, sata]
allowEdit: >
spec.domain.devices.disks
spec.volumes
addresses: ""
labels:
size: large
os: fedora
workload: high-compute
spec:
domain:
devices:
disks:
- name: root
volumes:
- name: root
dataVolume: fedora # fixme

"Instance Type" flow

  1. User seletcs the "Create New VM" button
  2. "Create New VM" dialog opens. Showing three aspects "Size", "OS", "Workload", populated with sane defaults. 2.a The user selects a size "medium", the "OS" and "Workload" fields get filtered accodringlyaccordingly 2.b The user selects an OS "Fedora", the "Workload" field gets filtered accordingly 2.c The user selects a "Workload"
@fabiand
Copy link
Author

fabiand commented Sep 10, 2018

Supporting 2 flows:

  1. Minimal template -> VM -> Injects "Presets -> VMI
    2.a Minimal template -> Bake VM with "presets" (endpoint) -> VMI
    2.b Template with preset -> VM -> VMI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment