Code Monkey home page Code Monkey logo

chef-continuum-anaconda's Introduction

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 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'

Usage, recipes, and attributes

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 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 a source-me.sh added to ${HOME} which you can source on login. Useful for development.

$> vagrant ssh
$vagrant> source source-me.sh
$vagrant> which conda
/opt/anaconda/2.0.1/bin/conda

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:

$> 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

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 ([email protected])

chef-continuum-anaconda's People

Contributors

mwalton236 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.