7.10. Extending the Discovery Image
You can extend the Satellite Discovery image with custom facts, software, or device drivers. You can also provide a compressed archive file containing extra code for the image to use.
Procedure
Create the following directory structure:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
The
autostart.ddirectory contains scripts that are executed in POSIX order by the image when it starts, but before the host is registered to Satellite. -
The
bindirectory is added to the$PATHvariable; you can place binary files in this directory and use them in theautostartscripts. -
The
factsdirectory is added to theFACTERLIBvariable so that custom facts can be configured and sent to Satellite. -
The
libdirectory is added to theLD_LIBRARY_PATHvariable andlib/rubyis added to theRUBYLIBvariable, so that binary files in/bincan be executed correctly.
-
The
After creating the directory structure, create a
.zipfile archive with the following command:zip -r my_extension.zip .
zip -r my_extension.zip .Copy to Clipboard Copied! Toggle word wrap Toggle overflow To inform the Discovery image of the extensions it must use, place your zip files on your TFTP server with the Discovery image, and then update the
APPENDline of the PXELinux template with thefdi.zipsoption where the paths are relative to the TFTP root. For example, if you have two archives at$TFTP/zip1.zipand$TFTP/boot/zip2.zip, use the following syntax:fdi.zips=zip1.zip,boot/zip2.zip
fdi.zips=zip1.zip,boot/zip2.zipCopy to Clipboard Copied! Toggle word wrap Toggle overflow
You can append new directives and options to the existing environment variables (PATH, LD_LIBRARY_PATH, RUBYLIB and FACTERLIB). If you want to specify the path explicitly in your scripts, the .zip file contents are extracted to the /opt/extension directory on the image.
You can create multiple .zip files but be aware that they are extracted to the same location on the Discovery image. Files extracted from in later .zip files overwrite earlier versions if they have the same file name.