cookbook 'chef_rvm', '~> 2.0.0', :supermarket
chef_rvm (5) Versions 2.0.0 Follow4
Installs/Configures rvm
cookbook 'chef_rvm', '~> 2.0.0'
knife supermarket install chef_rvm
knife supermarket download chef_rvm
chef_rvm
LWRP's based rvm cookbook
Inspired by RVM cookbook
Supported chef-client version:
Chef-Client >= 11.12.0
LWRP's
chef_rvm
chef_rvm 'ubuntu' do
rubies ['2.0.0', '2.1.1']
rvmrc({
'rvm_autoupdate_flag'=> '1'
})
end
Actions
Action | Description |
---|---|
:install |
This is default action |
:implode |
|
:upgrade |
chef_rvm_ruby
chef_rvm_ruby 'ubuntu:ruby:1.9.3' do
version '1.9.3'
patch 'falcon'
default true
end
Actions
Action | Description |
---|---|
:install |
This is default action |
:remove |
|
:uninstall |
|
:reinstall |
chef_rvm_gemset
chef_rvm_gemset 'ubuntu:gemset:1.9.3:test' do
ruby_string '1.9.3@test'
user 'ubuntu'
action :create
end
Actions
Action | Description |
---|---|
:create |
This is default action |
:delete |
|
:update |
|
:pristine |
|
:prune |
chef_rvm_gem
chef_rvm_gem 'ubuntu:unicorn' do
gem 'unicorn'
user 'ubuntu'
ruby_string '1.9.3@test'
end
Actions
Action | Description |
---|---|
:install |
This is default action |
:uninstall |
|
:update |
chef_rvm_wrapper
chef_rvm_wrapper 'ubuntu:my_project_unicorn' do
user 'ubuntu'
ruby_string '1.9.3@test'
prefix 'my_project'
binary 'unicorn'
action :create
end
Actions
Action | Description |
---|---|
:create |
This is default action |
:create_or_update |
chef_rvm_alias
chef_rvm_alias 'ubuntu:my_alias' do
user 'ubuntu'
alias_name 'my_alias'
ruby_string '1.9.3@test'
action :create
end
Actions
Action | Description |
---|---|
:create |
This is default action |
:delete |
Execute
Execute scripts in rvm environment. All resources worked like native resources but guards inherit environment from resource by default.
chef_rvm_execute 'bundle install' do
ruby_string '2.0.0'
user 'ubuntu'
cwd '/home/ubuntu/test'
command 'bundle install'
not_if 'bundle check'
action :run
end
chef_rvm_script 'bundle_install_sh' do
interpreter 'sh'
ruby_string '2.0.0'
user 'ubuntu'
cwd '/home/ubuntu/test'
code <<CODE
bundle install
CODE
not_if 'bundle check'
action :run
end
chef_rvm_bash 'bundle_install' do
ruby_string '2.0.0'
user 'ubuntu'
cwd '/home/ubuntu/test'
code <<CODE
bundle install
CODE
action :run
not_if 'bundle check'
end
Attributes
# Default options for .rvmrc for all users
node['chef_rvm']['rvmrc'] = {
'rvm_gem_options' => '--no-rdoc --no-ri',
'rvm_autoupdate_flag' => 0
}
# User installations
node['chef_rvm'] = {
users: {
ubuntu: {
rubies: {
'1.9.3' => {action: 'install', patch: 'falcon'},
'2.0' => 'install',
},
gems: {
'1.9.3@test' => %w(eye unicorn),
'1.9.3@test2' => [
{gem: 'eye', version: '0.6', action: 'install'},
'unicorn'
],
'1.9.3@test3' => 'unicorn',
},
wrappers: {
:'1.9.3@test' => {
bootup: [
{
binary: 'eye',
action: 'create_or_update'
}
]
},
:'1.9.3@test2' => {
bootup: %w(eye unicorn)
},
:'1.9.3@test3' => {
bootup: 'unicorn'
}
},
aliases: {
'my_alias' => '2.0.0',
'my_alias_2' => '1.9.3@test2'
}
}
}
}
Recipes
recipe[chef_rvm::default] # Full installations
recipe[chef_rvm::packages] # Required packages
recipe[chef_rvm::rvm]
recipe[chef_rvm::gemsets] # Create gemset
recipe[chef_rvm::rubies]
recipe[chef_rvm::gems]
recipe[chef_rvm::wrappers]
recipe[chef_rvm::aliases]
Author
Nikolay Murga
Dependent cookbooks
curl >= 0.0.0 |
chef_gem >= 0.0.0 |
build-essential >= 0.0.0 |
apt >= 0.0.0 |
sudo >= 0.0.0 |
Contingent cookbooks
Collaborator Number Metric
2.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.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
2.0.0 failed this metric
FC115: Custom resource contains a name_property that is required: chef_rvm/resources/gemset.rb:4
FC122: Use the build_essential resource instead of the recipe: chef_rvm/recipes/packages.rb:2
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.0 passed this metric
Publish Metric
2.0.0 passed this metric
Supported Platforms Metric
2.0.0 passed this metric
Testing File Metric
2.0.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
2.0.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
2.0.0 failed this metric
2.0.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
2.0.0 failed this metric
FC115: Custom resource contains a name_property that is required: chef_rvm/resources/gemset.rb:4
FC122: Use the build_essential resource instead of the recipe: chef_rvm/recipes/packages.rb:2
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.0 passed this metric
Publish Metric
2.0.0 passed this metric
Supported Platforms Metric
2.0.0 passed this metric
Testing File Metric
2.0.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
2.0.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
2.0.0 failed this metric
FC122: Use the build_essential resource instead of the recipe: chef_rvm/recipes/packages.rb:2
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.0.0 passed this metric
Publish Metric
2.0.0 passed this metric
Supported Platforms Metric
2.0.0 passed this metric
Testing File Metric
2.0.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
2.0.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
2.0.0 passed this metric
2.0.0 passed this metric
Testing File Metric
2.0.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
2.0.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
2.0.0 failed this metric
2.0.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