wip: cleanup and documentation
10 files changed
tree: 9eaeb5a8a4bb61bbc4014fae114ad234ac8b76d4
  1. .bundle/
  2. attributes/
  3. definitions/
  4. files/
  5. libraries/
  6. providers/
  7. recipes/
  8. resources/
  9. script/
  10. spec/
  11. templates/
  12. test/
  13. .gitignore
  14. .kitchen.yml
  15. .ruby-gemset
  16. .ruby-version
  17. Berksfile
  18. chefignore
  19. Gemfile
  20. LICENSE
  21. metadata.rb
  22. README.md
  23. Thorfile
  24. Vagrantfile
README.md

chef-continuum-anaconda cookbook

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 example of the most up-to-date best practices for writing, maintaining, and testing Chef cookbooks:

  • Berkshelf 3 for dependency resolution
  • Vagrant for development
  • Chefspec for rapid testing
  • Test Kitchen for comprehensive testing across multiple platforms
  • Foodcritic for style checking

Requirements

Usage, recipes, and attributes

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 install
    • flavor: either 'x86' (32-bit) or 'x86_64' (64-bit)
    • install_root: the parent directory of all anaconda installs. note that installs go into #{install_root}/#{version}
    • add_to_shell_path: TODO
    • owner: the user who owns the install
    • group: the group who owns the install

Tests

Run 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 full integration tests:

$> rspec

Check the style with Foodcritic:

$> foodcritic

TODO

  • autodetect 64-bit versus 32

Author

Author:: Matt Chu (matt.chu@gmail.com)