Home

Awesome

BananaPeels

A framework for testing the deployement of packages via Munki wrapped in a CLI tool. Requires VMWare Fusion. Note: This is very early on in dev. Pull requests are welcome.

##Requires:

##VM Configuration:

sudo /bin/launchctl unload -w /Library/LaunchDaemons/com.googlecode.munki.managedsoftwareupdate-check.plist
sudo visudo
# User privilege specification
...
root            ALL=(ALL) ALL
YOUR_ADMIN_USER ALL=(ALL) NOPASSWD: ALL
...

##Details: BananaPeels is a framework for testing the deployement of packages via Munki wrapped up in a CLI for ease-of-use. BananaPeels works by using a baseline OS X VM snapshot as a fixture to download and install specified packages to via Munki. Any failures or errors in the download or install process are logged and returned to the user at the conclusion of the sequence of tests. Default behavior is to search the specified repo for all valid .pkginfo and .plist files and attempt to deploy the configured package for each to the VM test environment. If name-version pairs are provided via the optional "--only" argument then only packages found in the repo corresponding to those name-version pairs will be deployed.

##Usage:

python BananaPeels.py -h
usage: BananaPeels.py [-h] --repo PATH --vmx PATH --snapshot TITLE --user NAME 
		      --password PASSWORD 
		     [--only SomePkg-x.x.x [SomePkg-x.x.x ...]]

Command line tool for testing the download and install of Munki packages from
a specified repo.

optional arguments:
  -h, --help            show this help message and exit
  --repo PATH           Path to munki repo to test.
  --vmx PATH            Path to vmx file for VM to use for testing.
  --snapshot TITLE      Title of VM snapshot to use for testing.
  --user NAME           Shortname for admin account on VM.
  --password PASSWORD   Password for admin account on VM.
  --only SomePkg-x.x.x [SomePkg-x.x.x ...]
                        Optionally specify name-version of pkgs to test. If no
                        version specified defaults to latest. Packages
                        specified by only will be tested individually.


##Known Bugs

# Preflight exit codes.
EXIT_STATUS_PREFLIGHT_FAILURE = 1  # Python crash yields 1.
# Client config exit codes.
EXIT_STATUS_OBJC_MISSING = 100
EXIT_STATUS_MUNKI_DIRS_FAILURE = 101
# Server connection exit codes.
EXIT_STATUS_SERVER_UNAVAILABLE = 150
# User related exit codes.
EXIT_STATUS_INVALID_PARAMETERS = 200
EXIT_STATUS_ROOT_REQUIRED = 201