-
Notifications
You must be signed in to change notification settings - Fork 0
Installers
Big fat warning: the information on this page is subject to change. While we don't anticipate radically changing the underlying concepts, the details of syntax etc. still might change
Installers (aka models) control how installation on a node happens. An installer consists of a metadata file, and a number of ERB templates. Currently, the metadata file is a YAML file with the following syntax:
name: some_os
os_version: 42
description: Some OS version 42
boot_sequence:
1: boot_install
2: boot_again
default: boot_local
The name, os_version, and description fields should be self explanatory. The boot_sequence governs how Razor should respond to repeated boot requests of a node. In the above example, on the first boot request after a policy using this installer has been bound to the node, the server will respond with the boot_install.erb template, on the second boot request with the boot_again.erb template, and on all following requests with the boot_local.erb template.
Templates are looked for in the following directories, in this order:
$name/$os_version$namecommon
These directories are taken relative to the installer_paths configuration setting, which is a colon separated list of directories.
Templates can use the following helper functions:
-
file_url(template): the URL to the (interpolated) template; e.g., a kickstart script might download a post_install script withcurl <%= file_url("post_install") %> > /tmp/post_insall.sh -
log_url(message, severity): generate a URL that, when a GET is issued against it, logsmessagewithseverityagainst the current node -
store_url(vars): a URL that will store vars with the node on the server; currently onlyipis supported as a variable -
image_url(path): a URL topathwithin the image currently being installed, e.g.<%= image_url("/isolinux/vmlinux") %> -
config[key]: the configuration value forkey