From 3d3135213e561baba5c9ead5273a4dd5a67a9c96 Mon Sep 17 00:00:00 2001 From: Matt Chu Date: Sun, 20 Apr 2014 20:53:28 -0700 Subject: [PATCH] remaining cleanup, cookbook rename --- .kitchen.yml | 2 +- .ruby-gemset | 2 +- README.md | 8 +++----- Vagrantfile | 6 ++---- attributes/default.rb | 2 -- metadata.rb | 4 ++-- recipes/default.rb | 3 +-- spec/default_spec.rb | 2 +- templates/default/installer_config.erb | 9 +++++---- 9 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index 4d7c310..7ab4ac5 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -16,7 +16,7 @@ platforms: suites: - name: default run_list: - - recipe[chef-continuum-anaconda::default] + - recipe[anaconda::default] attributes: anaconda: flavor: 'x86_64' diff --git a/.ruby-gemset b/.ruby-gemset index 15c52b3..88be633 100644 --- a/.ruby-gemset +++ b/.ruby-gemset @@ -1 +1 @@ -chef-continuum-anaconda-tests +chef-anaconda diff --git a/README.md b/README.md index 389bb98..959cfe2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# chef-continuum-anaconda cookbook +# anaconda cookbook Chef cookbook for installing [Continuum Analytic](http://continuum.io/)'s [Anaconda](https://store.continuum.io/cshop/anaconda/): "completely free Python @@ -40,12 +40,12 @@ conda 3.4.1 To use it in a cookbook: ```ruby -include_recipe 'chef-continuum-anaconda::default'j +include_recipe 'anaconda::default' ``` ## Usage, recipes, and attributes -This cookbook only has one recipe: `chef-continuum-anaconda::default`. Include +This cookbook only has one recipe: `anaconda::default`. Include it in your runlist, and it will install the package as well as any necessary dependencies. @@ -59,8 +59,6 @@ The following are user-configurable attributes. Check 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 install - `group`: the group who owns the install diff --git a/Vagrantfile b/Vagrantfile index 4bd5482..0134cef 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure('2') do |config| - config.vm.hostname = 'chef-continuum-anaconda-berkshelf' + config.vm.hostname = 'anaconda-berkshelf' config.vm.box = 'precise32' config.vm.box_url = 'http://files.vagrantup.com/precise32.box' config.vm.network :private_network, ip: '33.33.33.123' @@ -39,13 +39,11 @@ Vagrant.configure('2') do |config| #:version => '1.9.2', #:flavor => 'x86', :accept_license => 'yes', - # explicitly set for quickstart convenience only - #:add_to_shell_path => true, } } chef.run_list = [ - 'recipe[chef-continuum-anaconda::default]', + 'recipe[anaconda::default]', ] end end diff --git a/attributes/default.rb b/attributes/default.rb index 64a1280..ac23da7 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -14,8 +14,6 @@ # specific versions are installed _under_ this directory default.anaconda.install_root = '/opt/anaconda' default.anaconda.accept_license = 'no' -# setting this to true is not recommended; if the installation dir changes the path won't change -#default.anaconda.add_to_shell_path = false default.anaconda.owner = 'vagrant' default.anaconda.group = 'vagrant' diff --git a/metadata.rb b/metadata.rb index e22171b..4dc8435 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,8 +1,8 @@ -name 'chef-continuum-anaconda' +name 'anaconda' maintainer 'Matt Chu' maintainer_email 'matt.chu@gmail.com' license 'MIT' -description 'Installs/Configures chef-continuum-anaconda' +description 'Installs/Configures anaconda' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' diff --git a/recipes/default.rb b/recipes/default.rb index 77862fb..912734a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,5 +1,5 @@ # -# Cookbook Name:: chef-continuum-anaconda +# Cookbook Name:: anaconda # Recipe:: default # # Copyright (C) 2014 Matt Chu @@ -34,7 +34,6 @@ :flavor => flavor, :anaconda_install_dir => anaconda_install_dir, :accept_license => node.anaconda.accept_license, - #:add_to_shell_path => node.anaconda.add_to_shell_path ? 'yes' : 'no', :add_to_shell_path => 'no', }) end diff --git a/spec/default_spec.rb b/spec/default_spec.rb index 5f97dad..71e3769 100644 --- a/spec/default_spec.rb +++ b/spec/default_spec.rb @@ -29,7 +29,7 @@ end end -describe 'chef-continuum-anaconda::default' do +describe 'anaconda::default' do platforms = { # for whatever reason there's no fauxhai data for 12.10 'ubuntu' => [ '12.04', '13.04', '13.10' ], diff --git a/templates/default/installer_config.erb b/templates/default/installer_config.erb index 05cb752..faf532b 100644 --- a/templates/default/installer_config.erb +++ b/templates/default/installer_config.erb @@ -2,17 +2,18 @@ The questions are: # In order to continue the installation process, please review the license # agreement. Please, press ENTER to continue -'', +<< +<< read license here # Do you approve the license terms? [yes|no] -'yes', +<< # Anaconda will now be installed into this location: # /home/blah/anaconda # - Press ENTER to confirm the location # - Press CTRL-C to abort the installation # - Or specify an different location below -anaconda_install_dir, +<< # Do you wish the installer to prepend the Anaconda install location to PATH in your /home/vagrant/.bashrc ? [yes|no] -add_to_shell_path ? 'yes' : 'no' +<< %> <%- case "#{@version}-#{@flavor}" %> <%- when 'nothing here because no exceptions between different installers' %>