commit | 733ce991c33c2075dc2574d2c70b331921aeb787 | [log] [tgz] |
---|---|---|
author | Matt Chu <matt.chu@gmail.com> | Sun Apr 20 20:29:40 2014 -0700 |
committer | Matt Chu <matt.chu@gmail.com> | Sun Apr 20 20:29:40 2014 -0700 |
tree | b4a73a70932c27277333ace626597b7177c57bbd | |
parent | 9a27cc7f5e886bcd266ad5ff7dbc7cc940fa9267 [diff] |
wip: all tests past, on multiple platforms and versions
Chef cookbook for installing Continuum Analytic's Anaconda: "completely free Python distribution for large-scale data processing, predictive analytics, and scientific computing".
This also serves as a live example of the most up-to-date best practices for writing, maintaining, and testing Chef cookbooks:
The Vagrantfile is written to get you an Anaconda environment with minimal effort:
$> vagrant up --provision ... $> vagrant ssh $vagrant> export PATH=/opt/anaconda/1.9.2/bin:${PATH} $vagrant> conda --version conda 3.4.1
This cookbook only has one recipe: chef-continuum-anaconda::default
. Include it in your runlist, and it will install the package as well as any necessary dependencies.
The following are user-configurable attributes. Check attributes/default.rb for default values.
anaconda
version
: the version to installflavor
: either x86
(32-bit) or x86_64
(64-bit)install_root
: the parent directory of all anaconda installs. note that individual installs go into #{install_root}/#{version}
accept_license
: must be explicitly set to the string yes
; any other value will reject the license.add_to_shell_path
: edit the owner's shell profile to include anaconda in PATH
. This is not recommended as then cannot be managed by this cookbook.owner
: the user who owns the installgroup
: the group who owns the installRun the full test suite:
# this will take a long time $> script/cibuild ... # check the final result; bash return codes: 0 is good, anything else is not $> echo $?
Run just the chefspecs:
$> rspec
Run just the test kitchen serverspec integration tests:
$> rspec
Check the style with Foodcritic:
$> foodcritic
Author:: Matt Chu (matt.chu@gmail.com)