Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

anaconda (12) Versions 0.4.2

Installs/Configures anaconda

Policyfile
Berkshelf
Knife
cookbook 'anaconda', '= 0.4.2', :supermarket
cookbook 'anaconda', '= 0.4.2'
knife supermarket install anaconda
knife supermarket download anaconda
README
Dependencies
Changelog
Quality -%

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

Requirements

This repo has only been tested with RVM; YMMV with other installation methods
(rbenv, chef-dk, etc).

It 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.

Quickstart

The [Vagrantfile](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

# if you included `recipe[anaconda::shell_conveniences]` you don't have to do anything;
# it's sourced in /etc/profile.d
$> vagrant ssh
$vagrant> conda --version
conda 3.5.5

To use it in a cookbook:

include_recipe 'anaconda::default'

Usage, recipes, attributes, and resources

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](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 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 install
    • group: the group who owns the install

recipe[anaconda::shell_conveniences]

Include this to have the environment set for all users (login shells) via
/etc/profile.d. Useful for development.

$> vagrant ssh
$vagrant> which conda
/opt/anaconda/2.0.1/bin/conda

resource anaconda_package

You can use the anaconda_package resource to install new packages into the
Anaconda environment:

# I do not know what 'astroid' is, just using it as a sample package
anaconda_package 'astroid' do
  # the other supported action is `:remove`
  action :install
end

See the [resource definition](resources/package.rb) for additional options; in
general, all it does is present the same options as conda install/conda
remove
.

Tests

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](spec/default_spec.rb):

$> rspec

Run just the test kitchen serverspec [integration
tests](test/integration/default/serverspec/default_spec.rb):

# this is what takes so long: every platform and version is fully built in vagrant
# the list of OSes is defined in [.kitchen.yml](.kitchen.yml)
$> kitchen verify

# test a specific OS; `kitchen list`
$> kitchen verify default-ubuntu-1204

Check the style with Foodcritic:

$> foodcritic

Releases and issues

Standard stuff:

  • master is the active version in development
  • releases are made with Github, and git tag'ed

Issues should be opened in the Github issue
tracker

TODO

  • autodetect 64-bit versus 32
  • (TODO does it matter? who uses it?) populate metadata.rb: suggests, supports, etc
  • add a pre-provision for kitchen tests to avoid redownloading the installer on every test (really slows down the tests)
  • figure out how to publish onto http://community.opscode.com/; the documentation is unbelievably bad

Author

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

Dependent cookbooks

apt >= 0.0.0
runit >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG

0.4.0

Major cleanup and basic usability fixes (read: almost not sure why it worked
before, if it even did):

  • (core, breaking) Renamed anaconda::shell-conveniences to anaconda::shell_conveniences
  • (core, breaking) No longer uses the python cookbook; this caused problems after anaconda was installed
  • (core) shell_conveniences now installs into /etc/profile.d, so it is automatically sourced by login shells
  • (core) Ubuntu 14.04 is now a supported (and fully tested) platform
  • (core) Ubuntu 14.04 is now the default platform used in the sample Vagrantfile
  • (core) Vagrantfile now correctly installs Anaconda, like the README said it was supposed to
  • (docs) various readme updates
  • (testing) Complete coverage of all resources in chefspec
  • (testing) Removed Ubuntu 12.10 and 13.04 from kitchen testing; there's something wrong with apt-get on these images. It appears to be something about the apt keys, but they're just removed from testing for now.

0.3.3

Bugfix release:

  • Fixes related to install script and permissions (#5). Courtesy @mwalton236

0.3.1

New resource: anaconda_package, for installing and removing packages via
conda

0.3.0

Rewrote all project history

0.2.1

Fix incorrect checksums for Anaconda 2.0.1

0.2.0

Feature improvments:

  • updated the default installation to Anaconda 2.0.1, from 1.9.2

Miscellaneous:

  • minor cibuild improvement to ensure clean tests
  • minor code changes to support updated toolchain
  • removed Chef Development Kit recommendation after experimenting with it

No quality metric results found