summaryrefslogtreecommitdiff
path: root/ironic/drivers
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2022-08-16 14:16:48 -0700
committerJulia Kreger <juliaashleykreger@gmail.com>2022-08-17 12:57:57 -0700
commit5c1dd47e6ce16616268abd016da58ea80136cbfd (patch)
tree43fc2e2329bf6091717936342e36a7d6fb96ae90 /ironic/drivers
parentc861423eb5acf9a1d8f3704bd4552e798731166e (diff)
downloadironic-5c1dd47e6ce16616268abd016da58ea80136cbfd.tar.gz
Add kickstart template 'url' option
To use a source as a path with the anaconda deployment interface, the kickstart template needs to utilize a 'url' command as opposed to a second stage ramdisk. This allows a seamless automatic switch without a customized kickstart template to just use a URL. Change-Id: I31febd4e131ed0cc1b37adb9318be8cb17136a68
Diffstat (limited to 'ironic/drivers')
-rw-r--r--ironic/drivers/modules/ks.cfg.template17
1 files changed, 15 insertions, 2 deletions
diff --git a/ironic/drivers/modules/ks.cfg.template b/ironic/drivers/modules/ks.cfg.template
index 825ea38c8..ca799953a 100644
--- a/ironic/drivers/modules/ks.cfg.template
+++ b/ironic/drivers/modules/ks.cfg.template
@@ -15,11 +15,24 @@ zerombr
clearpart --all --initlabel
autopart
-# Downloading and installing OS image using liveimg section is mandatory
-# in a *default* ironic configuration. Users (infrastructure operators)
+# Downloading and installing OS image using "liveimg" section is the
+# default mode of operation for an OpenStack-integrated Ironic
+# deployment where Glance is in use. Users (infrastructure operators)
# may choose to customize this pattern, or use release specific kickstart
# configurations which may already point to a mirror.
+#
+# An alternative is "url", which points to a repository of files used for
+# the deploy, similar to mounting an ISO media and exposing the files.
+
+{% if 'is_source_a_path' in ks_options -%}
+url --url {{ks_options.liveimg_url }}
+
+# If packages are not selected, a URL based auto-deployment fails.
+%packages --ignoremissing
+%end
+{% else -%}
liveimg --url {{ ks_options.liveimg_url }}
+{% endif -%}
# Following %pre and %onerror sections are mandatory
%pre