我是 Chef/OpsWorks 的新手,正在尝试一个简单的方法在 Ubuntu 12.04 实例上安装 Django 1.6:
python_pip "Django" do
version "1.6"
action :install
end
我的 providers/pip.rb 和 providers/virtualenv.rb 似乎覆盖了表面上已经加载的内容:
DEBUG: Loading cookbook python's providers from /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/pip.rb
DEBUG: Loaded contents of /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/pip.rb into a provider named python_pip defined in Chef::Provider::PythonPip
DEBUG: Loading cookbook python's providers from /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/virtualenv.rb
DEBUG: Loaded contents of /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/virtualenv.rb into a provider named python_virtualenv defined in Chef::Provider::PythonVirtualenv
DEBUG: Loading cookbook python's providers from /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/pip.rb
INFO: PythonPip light-weight provider already initialized -- overriding!
DEBUG: Loaded contents of /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/pip.rb into a provider named python_pip defined in Chef::Provider::PythonPip
DEBUG: Loading cookbook python's providers from /opt/aws/opsworks/releases/20131107153140_213/site-cookbooks/python/providers/virtualenv.rb
INFO: PythonVirtualenv light-weight provider already initialized -- overriding!
但是当我尝试使用 python_pip 时,我收到一个错误:
ERROR: Caught exception while compiling OpsWorks custom run list: NameError - Cannot find a resource for python_pip on ubuntu version 12.04
我试过添加depends "python"
我的 metadata.rb,但这没有帮助。任何建议表示赞赏。
我的食谱“python”的目录结构:
.
├── python
│ ├── attributes
│ │ └── default.rb
│ ├── metadata.rb
│ ├── providers
│ │ ├── pip.rb
│ │ └── virtualenv.rb
│ ├── recipes
│ │ ├── default.rb
│ │ ├── django.rb
│ │ ├── package.rb
│ │ ├── pip.rb
│ │ ├── source.rb
│ │ └── virtualenv.rb
│ ├── specs
│ │ └── configure_spec.rb
│ └── templates
│ └── default
└── README.md