cookbook 'nodebrew', '= 0.4.0'
nodebrew (12) Versions 0.4.0 Follow1
Installs and manages your versions of node.js in chef with nodebrew
cookbook 'nodebrew', '= 0.4.0', :supermarket
knife supermarket install nodebrew
knife supermarket download nodebrew
Nodebrew Cookbook
Installs and manages your versions of node.js in chef with nodebrew
Usage
Role based example:
run_list( 'recipe[nodebrew]' ) override_attributes( :nodebrew => { :nodes => [ { :version => '0.11.5' }, { :version => '0.10.15', :binary => true } ], :use => '0.10.15', :npm => { '0.11.5' => [ 'underscore', 'coffee-script' ], '0.10.15' => [ 'underscore', 'async@0.2.9', { :name => 'bower', :version => '1.1.2', :action => 'install' } ] } } )
Requirements
- Chef >= 11.4
- Platform: ubuntu, debian, fedora, centos and redhat
- Cookbook: build-essential and git
Installation
Librarian-Chef is a bundler for your Chef cookbooks. To install Librarian-Chef:
cd chef-repo gem install librarian librarian-chef init
To reference the Git version:
repo="linyows/nodebrew-cookbook"
latest_release=$(curl -s https://api.github.com/repos/$repo/git/refs/tags \
| ruby -rjson -e '
j = JSON.parse(STDIN.read);
puts j.map { |t| t["ref"].split("/").last }.sort.last
')
cat >> Cheffile <<END_OF_CHEFFILE
cookbook 'nodebrew', :git => 'git://github.com/$repo.git', :ref => '$latest_release'
END_OF_CHEFFILE
librarian-chef install
why-run support.
Attributes
nodebrew::default
| Key | Description | Default |
|---|---|---|
| repository | nodebrew git repository | git://github.com/hokaccha/nodebrew.git |
| ref | git ref | master |
| upgrade | sync | true |
| root | nodebrew root | /usr/local/lib/nodebrew |
| user | nodebrew user | root |
Resources / Providers
- nodebrew
- nodebrew_node
- nodebrew_npm
- nodebrew_use
- nodebrew_script
nodebrew
Actions
| Action | Description | Default |
|---|---|---|
| install | install nodebrew to nodebrew_root | yes |
Attributes
| Attribute | Description | Default |
|---|---|---|
| repository | nodebrew git repository | git://github.com/hokaccha/nodebrew.git |
| ref | git ref | master |
| upgrade | sync | true |
| root | nodebrew root | $HOME/.nodebrew |
| user | nodebrew user | root |
Examples
Install nodebrew to custom path
nodebrew '/usr/local/lib/nodebrew'
Install nodebrew for a user
nodebrew '/usr/local/lib/nodebrew' do ref 'v0.6.3' user 'vagrant' end
nodebrew_node
Actions
| Action | Description | Default |
|---|---|---|
| install | install node.js | yes |
| uninstall | uninstall node.js | no |
Attributes
| Attribute | Description | Default |
|---|---|---|
| version | node.js version | |
| binary | install by binary | false |
Examples
Install node.js
nodebrew_node '0.11.5'
Install node.js by binary
nodebrew_node '0.11.5' do binary true end
nodebrew_npm
Actions
| Action | Description | Default |
|---|---|---|
| install | install package by npm | yes |
| uninstall | uninstall package by npm |
Attributes
| Attribute | Description | Default |
|---|---|---|
| name | resource name | |
| package | node package name | |
| version | package version | nil |
| node_version | node version | nil |
| path | install path to local | nil |
| package_json | install by package.json | false |
Examples
Install node package
nodebrew_npm 'underscore'
Install node package with version
nodebrew_npm 'underscore@1.5.1'
Install with option
nodebrew_node 'underscore' do version '1.5.1' node_version '0.11.5' path '/var/www/app' package_json true end
License and Author
MIT License
Dependent cookbooks
| build-essential >= 0.0.0 |
| git >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.4.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.0 failed this metric
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/default.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/node.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/npm.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/script.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/use.rb:1
FC064: Ensure issues_url is set in metadata: nodebrew/metadata.rb:1
FC065: Ensure source_url is set in metadata: nodebrew/metadata.rb:1
FC066: Ensure chef_version is set in metadata: nodebrew/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/default.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/node.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/npm.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/script.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/use.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.4.0 passed this metric
No Binaries Metric
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.4.0 failed this metric
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/default.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/node.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/npm.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/script.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/use.rb:1
FC064: Ensure issues_url is set in metadata: nodebrew/metadata.rb:1
FC065: Ensure source_url is set in metadata: nodebrew/metadata.rb:1
FC066: Ensure chef_version is set in metadata: nodebrew/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/default.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/node.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/npm.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/script.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/use.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.4.0 passed this metric
No Binaries Metric
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/node.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/npm.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/script.rb:1
FC059: LWRP provider does not declare use_inline_resources: nodebrew/providers/use.rb:1
FC064: Ensure issues_url is set in metadata: nodebrew/metadata.rb:1
FC065: Ensure source_url is set in metadata: nodebrew/metadata.rb:1
FC066: Ensure chef_version is set in metadata: nodebrew/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/default.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/node.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/npm.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/script.rb:1
FC074: LWRP should use DSL to define resource's default action: nodebrew/resources/use.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.4.0 passed this metric
No Binaries Metric
0.4.0 passed this metric
Testing File Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 passed this metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.4.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.4.0 failed this metric