rgbkrk / ipython-notebook-cookbook

:book: IPython Notebook Cookbook for Deployment via Chef
Apache License 2.0
41 stars 10 forks source link

Can't find ipynb_profile resource while launching ipython-notebook::virtenv_launch #18

Closed bcombourieu closed 9 years ago

bcombourieu commented 9 years ago

Hi,

I get some compilation errors while trying to run the virtenv_launch recipe (below the stacktrace) => it cannot find the ipynb_profile resource.

==> default: ================================================================================
==> default: 
==> default: 
==> default: NameError
==> default: ---------
==> default: Cannot find a resource for ipynb_profile on ubuntu version 14.04
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/ipython-notebook/recipes/virtenv_launch.rb:36:in `from_file'
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/w4-dev-haproxy/recipes/notebook_server.rb:15:in `from_file'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/ipython-notebook/recipes/virtenv_launch.rb:
==> default: 
==> default:  29:     owner node[:ipynb][:linux_user]
==> default:  30:     group node[:ipynb][:linux_group]
==> default:  31:     mode '0775'
==> default:  32:     action :create
==> default:  33:  end
==> default:  34:  
==> default:  35:  # Make sure the default profile exists, to deal with IPython bugs/strangeness
==> default:  36>> ipynb_profile 'default' do
==> default:  37:     action :create
==> default:  38:     owner node[:ipynb][:linux_user]
==> default:  39:     ipython_path "#{node[:ipynb][:virtenv]}/bin/ipython"
==> default:  40:     ipython_settings_dir ipython_settings_dir
==> default:  41:  end
==> default:  42:  
==> default:  43:  ipynb_profile node[:ipynb][:profile_name] do
==> default:  44:     action :create
==> default:  45:     owner node[:ipynb][:linux_user]

Do you have any idea how I can solve this? I've followed the steps you've mentionned in the Readme, and I'm trying to deploy this (as a test) on a Vagrant machine (Ubuntu 14.04).

Thanks!

PS: I had the same bug with Ubuntu 12.04

bcombourieu commented 9 years ago

Solved my issue => I was actually using the "knife cookbook github install" command to retrieve this command, which installed it in the "ipython-notebook" folder, which messed up the resources names.

I moved the cookbook to ipynb and problem was solved.