Backlog #2590

General user inputs in templates

Added by Ruben S. Montero over 7 years ago. Updated over 4 years ago.

Status:ClosedStart date:12/28/2013
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Core & System
Target version:-

Description

A Template Recipe would provide most/all of the vm template (CPU, VCPU, MEMORY, NIC, DISK, etc) with the user providing overrides that are allowed. Also default values could be defined in case the user does not include any:

NAME    = "${NAME}" 
CPU     = ${CPU:1.0}
VCPU    = ${CPU:1}
MEMORY  = ${MEMORY:512}
DISK    = [ 
    IMAGE="${DISK_OS:CentOS Server}",
    DRIVER=qcow2,
    CACHE=none 
]

onetemplate instantiate -d NAME="web" -d CPU=1 server_receipe


Related issues

Related to Feature #1865: Merging vector attributes Closed 04/05/2013
Related to Request #2044: Expand VMID Closed 05/14/2013
Duplicated by Feature #2363: Allow inclusion in templates Closed 10/07/2013

History

#1 Updated by Ruben S. Montero over 7 years ago

#2 Updated by Ruben S. Montero over 7 years ago

  • Tracker changed from Feature to Backlog
  • Priority changed from Normal to High
  • Target version deleted (Release 4.6)

#3 Updated by Ruben S. Montero over 7 years ago

  • Status changed from New to Pending

#4 Updated by Ruben S. Montero over 7 years ago

  • Subject changed from Template Receipes to Template Recipes

#5 Updated by Ruben S. Montero over 7 years ago

#6 Updated by Ruben S. Montero over 7 years ago

  • Related to deleted (Feature #2363: Allow inclusion in templates)

#7 Updated by Ruben S. Montero over 7 years ago

  • Duplicated by Feature #2363: Allow inclusion in templates added

#8 Updated by Ruben S. Montero over 7 years ago

#9 Updated by Adam Heath over 7 years ago

Couldn't this be accomplished by doing:

1: onetemplate clone $base_template $tmp_template
2: EDITOR=/path/to/script.sh onetemplate update $tmp_template
3: ontemplate instantiate $tmp_template

script.sh will be called just like vim or emacs, or whatever, with $1 the path to the file that needs to be updated. The contents of script.sh are left as an exercise left up to the reader.

#10 Updated by Ruben S. Montero over 7 years ago

Hi Adam,

Yes, in fact we have something similar for our in-house cloud. However, we'd like to expose it via other interfaces and probably add some system-wide checks, like for example a maximum value for a variable.

Other requirement would be to expose it through all the interfaces, so a JAVA client could benefit from it. This requires to put (at least part) of the functionality in the core.

Thanks for your feedback and suggestions!

#11 Updated by Ruben S. Montero over 6 years ago

  • Subject changed from Template Recipes to General user inputs in templates
  • Priority changed from High to Normal

User inputs is now doing this, for Sunstone and CLI. This may be extended. This may not be implemented in the oned daemon.

#12 Updated by Ruben S. Montero over 4 years ago

  • Status changed from Pending to Closed

Also available in: Atom PDF