commit | 412e8565ab8f02b4979d60872f914b4a2949acde | [log] [tgz] |
---|---|---|
author | Matt Chu <matt.chu@gmail.com> | Sat Jun 28 13:57:45 2014 -0700 |
committer | Matt Chu <matt.chu@gmail.com> | Sun Jul 06 15:12:05 2014 -0700 |
tree | a437db7bb488b8ae5cbb6b6ee3f13bf7511bbfff | |
parent | be18a53f935fff70df32217f8314f6d51d952b9d [diff] |
new resource: 'conda_package', with tests
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:
This repo has only been tested with RVM; YMMV with other installation methods (rbenv, chef-dk, etc).
>= 2.0.1
is requiredIt sounds like Chef-DK is the new recommended installation path, but I have not had a good experience with it (as of 0.1.0-1). Again, YMMV.
The Vagrantfile is written to get you an Anaconda environment with minimal effort:
$> vagrant up --provision ... $> vagrant ssh $vagrant> export PATH=/opt/anaconda/2.0.1/bin:${PATH} $vagrant> conda --version conda 3.5.5
To use it in a cookbook:
include_recipe 'anaconda::default'
The main recipe is 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.owner
: the user who owns the installgroup
: the group who owns the installrecipe[anaconda::shell-conveniences]
Include this to have a
Run the full test suite:
# this will take a really 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:
# this is what takes so long: every platform and version is fully built in vagrant $> kitchen verify
Check the style with Foodcritic:
$> foodcritic
Standard stuff:
git tag
'edIssues should be opened in the Github issue tracker
suggests
, supports
, etcAuthor:: Matt Chu (matt.chu@gmail.com)