macchrister / autonbi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoNBI.py

A tool to automate (or not) the building and customization of Apple NetInstall Images.

NetInstall Images differ from a NetBoot Image in that NetInstall Images contain the minimal components needed to Install an OS. For further clarification see Apple's OSX Server documentation here.

Requirements:

  • OS X 10.9 Mavericks (or newer) - This tool relies on parts of the SIUFoundation Framework which is part of System Image Utility, found in /System/Library/CoreServices in Mavericks.

  • Munki tools installed at /usr/local/munki - needed for FoundationPlist.

Thanks to:

  • Greg Neagle for overall inspiration and code snippets (COSXIP)
  • Per Olofsson for the awesome AutoDMG which inspired this tool
  • Tim Sutton for further encouragement and feedback on early versions
  • Graham Gilbert for testing, feature suggestions and code contributions
  • Michael Lynn for his invaluable help with PBZX and XZ processing
  • Nate Walck for the feature that adds Utilities.plist to the NBI

This tool aids in the creation of Apple NetInstall Images (known as: NBI). It can run either in interactive mode by passing it a folder, installer application or DMG or automatically, integrated into a larger workflow.

Command line options:

  • [--source][-s] The valid path to a source of one of the following types:

    • A folder (such as /Applications) which will be searched for one or more valid install sources
    • An OS X installer application (e.g. "Install OS X Mavericks.app")
    • An InstallESD.dmg file
  • [--destination][-d] The valid path to a dedicated build root folder:

    The build root is where the resulting NBI bundle and temporary build files are written. If the optional --folder arguments is given an identically named folder must be placed in the build root:

    ./AutoNBI.py <arguments>P -d /Users/admin/BuildRoot --folder Packages -> Causes AutoNBI to look for /Users/admin/BuildRoot/Packages

  • [--name][-n] The name of the NBI bundle, without .nbi extension

  • [--folder] Optional - The name of a folder to be copied onto NetInstall.dmg. If the folder already exists, it will be overwritten. This allows for the customization of a standard NetInstall image by providing a custom rc.imaging and other required files, such as a custom Runtime executable. For reference, see the DeployStudio Runtime NBI.

  • [--auto][-a] Optional - Enable automated run. The user will not be prompted for input and the application will attempt to create a valid NBI. If the input source path results in more than one possible installer source the application will stop. If more than one possible installer source is found in interactive mode the user will be presented with a list of possible InstallerESD.dmg choices and asked to pick one.

  • [--enable-nbi][-e] Optional Enable the output NBI by default. This sets the "Enabled" key in NBImageInfo.plist to "true".

  • [--add-python][-p] Optional Add the Python framework and libraries to the NBI in order to support Python-based applications at runtime

  • [--add-ruby][-r] Optional Add the Ruby framework and libraries to the NBI in order to support Ruby-based applications at runtime

  • [--utilities-plist][-r] Optional Add a custom Utilities.plist to modify the menu

Examples:

To invoke AutoNBI in interactive mode:

sudo ./AutoNBI.py -s /Applications -d /Users/admin/BuildRoot -n Mavericks

To invoke AutoNBI in automatic mode:

sudo ./AutoNBI.py -s ~/InstallESD.dmg -d /Users/admin/BuildRoot -n Mavericks -a

To replace "Packages" on the NBI boot volume with a custom version:

sudo ./AutoNBI.py -s ~/InstallESD.dmg -d ~/BuildRoot -n Yosemite -f Packages -a

To invoke AutoNBI in automatic mode and add the Python framework:

sudo ./AutoNBI.py -s ~/InstallESD.dmg -d /Users/admin/BuildRoot -n Yosemite-10.10.2 -a --add-python

To invoke AutoNBI in automatic mode, deploy a custom imaging client (launched through Packages/Extras/rc.imaging) and add the Python and Ruby frameworks:

sudo ./AutoNBI.py -s /Applications/Install\ OS\ X\ Yosemite.app -d /Users/admin/BuildRoot -n Yosemite-10.10.2 --folder ~/Documents/Packages --add-python --add-ruby --auto

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%