Giter VIP home page Giter VIP logo

chef-rvm's People

Contributors

etki avatar fulloflilies avatar nikolaymurha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chef-rvm's Issues

make rvm available system wide/ for all users

Hello,

can i use the LWRP's of this cookbook to install rvm for all users/ system wide ? is that possible ?

currently its only available for the user we prefer in the LWRP, for eg,

chef_rvm 'ubuntu' do
  rubies ['2.0.0', '2.1.1']
  rvmrc({
    'rvm_autoupdate_flag'=> '1'
  })
end

in this case its available for ubuntu only .

The idea behind system wide is to be able to use ruby with other users than ubuntu.

Helps would be appreciated.

keyserver.ubuntu.com is not accessible via ipv6

I am attempting to use chef_rvm on a host that only has ipv6 Internet access, no ipv4. Because chef_rvm imports a GPG key from keyserver.ubuntu.com, the import fails. keyserver.ubuntu.com is not available via ipv6.

I would suggest switching to keys.gnupg.net which is available via ipv6 and is the host used in RVM's installation docs.

--no-rdoc in .rvmrc is ignored

The cookbook's default['chef_rvm']['rvmrc']['rvm_gem_options'] is '--no-rdoc --no-ri'. It writes this variable to the ~/.rvmrc. It works fine. However, when one tries to install a gem into a gemset with the chef_rvm_gem provider, rdoc is still used. In my case, it fails on rdoc when I try to install cucumber version 1.1.9.

Please find the error below.

Honestly, I'm not RVM guru, I googled around and didn't find any clear recommendation to disable rdoc generation by adding rvm_gem_options to the ~/.rvmrc file. However, I found, and actually tested this, that it can be done by adding the following entries to the ~/.gemrc:

install: --no-rdoc --no-ri
update: --no-rdoc --no-ri

And mentions about new syntax:

install: --no-document
update: --no-document

Can you please check into this and decide how this can be fixed - by correcting .rvmrc, adding .gemrc or using another fix. If you want me to implement the fix, let me know, I will do and create a merge request.

  * chef_rvm_gem[rvm:gem:jenkins:1.9.3@:cucumber] action install

    ================================================================================
    Error executing action `install` on resource 'chef_rvm_gem[rvm:gem:jenkins:1.9.3@:cucumber]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of bash -c source\ /opt/jenkins_home/.rvm/scripts/rvm\;\ rvm\ 1.9.3@default\ do\ gem\ install\ cucumber\ -v\ 1.1.9 ----
    STDOUT: Building native extensions.  This could take a while...
    Successfully installed gherkin-2.9.3
    Successfully installed tins-1.5.4
    Successfully installed term-ansicolor-1.3.2
    Successfully installed builder-3.2.2
    Successfully installed diff-lcs-1.2.5

    (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

    Thank you for installing cucumber-1.1.9.
    Please be sure to read http://wiki.github.com/cucumber/cucumber/upgrading
    for important information about this release. Happy cuking!

    (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)

    Successfully installed cucumber-1.1.9
    Installing ri documentation for gherkin-2.9.3
    STDERR: RDoc::Parser::Ruby failure around line 28 of
    tests/from_module_test.rb

    Before reporting this, could you check that the file you're documenting
    has proper syntax:

      /opt/jenkins_home/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -c tests/from_module_test.rb

    RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

    The internal error was:

        (NoMethodError) undefined method `name' for #<RDoc::RubyToken::TkASSIGN:0x0000000274b8a8>

    ERROR:  While executing gem ... (NoMethodError)
        undefined method `name' for #<RDoc::RubyToken::TkASSIGN:0x0000000274b8a8>
    ---- End output of bash -c source\ /opt/jenkins_home/.rvm/scripts/rvm\;\ rvm\ 1.9.3@default\ do\ gem\ install\ cucumber\ -v\ 1.1.9 ----
    Ran bash -c source\ /opt/jenkins_home/.rvm/scripts/rvm\;\ rvm\ 1.9.3@default\ do\ gem\ install\ cucumber\ -v\ 1.1.9 returned 1

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/chef_rvm/libraries/rvm_simple_environment_gem.rb:17:in `gem_install'
    /var/chef/cache/cookbooks/chef_rvm/providers/gem.rb:18:in `block in class_from_file'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/chef_rvm/recipes/gems.rb

      8:       chef_rvm_gem "rvm:gem:#{username}:#{ruby_string}:#{resource_config['gem']}" do
      9:         user username
     10:         ruby_string ruby_string
     11:         gem resource_config['gem']
     12:         version resource_config['version'] if resource_config['version']
     13:         action resource_config['action'] if resource_config['action']
     14:       end
     15:     end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/chef_rvm/recipes/gems.rb:8:in `block (3 levels) in from_file'

    chef_rvm_gem("rvm:gem:jenkins:1.9.3@:cucumber") do
      action :install
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :chef_rvm_gem
      cookbook_name "chef_rvm"
      recipe_name "gems"
      user "jenkins"
      ruby_string "1.9.3@"
      gem "cucumber"
      version "1.1.9"
    end

gpg: Can't check signature: public key not found

Hi,

I couldn't automate the gpg donwload, since it will always run install RVM first.
Any way to fix it or downgrade the RVM via parameter? I couldn't find too.

Thank you.

 amazon-ebs: Mixlib::ShellOut::ShellCommandFailed
    amazon-ebs: ------------------------------------
    amazon-ebs: Expected process to exit with [0], but received '2'
    amazon-ebs: ---- Begin output of bash /tmp/foo20171005-1522-1kvxinq stable --auto-dotfiles --path '/home/deploy/.rvm' ----
    amazon-ebs: STDOUT: Turning on auto dotfiles mode.
    amazon-ebs: Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz
    amazon-ebs: Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc
    amazon-ebs: Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
    amazon-ebs:
    amazon-ebs: GPG signature verification failed for '/home/deploy/.rvm/archives/rvm-1.29.3.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
    amazon-ebs:
    amazon-ebs: sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    amazon-ebs:
    amazon-ebs: or if it fails:
    amazon-ebs:
    amazon-ebs: command curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -
    amazon-ebs:
    amazon-ebs: the key can be compared with:
    amazon-ebs:
    amazon-ebs: https://rvm.io/mpapis.asc
    amazon-ebs: https://keybase.io/mpapis
    amazon-ebs:
    amazon-ebs: NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
    amazon-ebs: STDERR: gpg: directory `/home/deploy/.gnupg' created
    amazon-ebs: gpg: new configuration file `/home/deploy/.gnupg/gpg.conf' created
    amazon-ebs: gpg: WARNING: options in `/home/deploy/.gnupg/gpg.conf' are not yet active during this run
    amazon-ebs: gpg: keyring `/home/deploy/.gnupg/pubring.gpg' created
    amazon-ebs: gpg: Signature made Sun 10 Sep 2017 08:59:21 PM UTC using RSA key ID BF04FF17
    amazon-ebs: gpg: Can't check signature: public key not found
    amazon-ebs: ---- End output of bash /tmp/foo20171005-1522-1kvxinq stable --auto-dotfiles --path '/home/deploy/.rvm' ----
    amazon-ebs: Ran bash /tmp/foo20171005-1522-1kvxinq stable --auto-dotfiles --path '/home/deploy/.rvm' returned 2
    amazon-ebs:
    amazon-ebs: Cookbook Trace:
    amazon-ebs: ---------------
    amazon-ebs: /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/chef_rvm/libraries/rvm_simple_environment_rvm.rb:44:in `rvm_install'
    amazon-ebs: /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/chef_rvm/resources/default.rb:13:in `block in class_from_file'
    amazon-ebs:
    amazon-ebs: Resource Declaration:
    amazon-ebs: ---------------------
    amazon-ebs: # In /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/app/recipes/rvm.rb
    amazon-ebs:
    amazon-ebs: 3: chef_rvm node['deploy']['user'] do
    amazon-ebs: 4:   rubies [version]
    amazon-ebs: 5: end
    amazon-ebs: 6:
    amazon-ebs:
    amazon-ebs: Compiled Resource:
    amazon-ebs: ------------------
    amazon-ebs: # Declared in /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/app/recipes/rvm.rb:3:in `from_file'
    amazon-ebs:
    amazon-ebs: chef_rvm("deploy") do
    amazon-ebs: action [:install]
    amazon-ebs: default_guard_interpreter :default
    amazon-ebs: declared_type :chef_rvm
    amazon-ebs: cookbook_name "app"
    amazon-ebs: recipe_name "rvm"
    amazon-ebs: rubies ["2.4.1"]
    amazon-ebs: end
    amazon-ebs:
    amazon-ebs: System Info:
    amazon-ebs: ------------
    amazon-ebs: chef_version=13.5.3
    amazon-ebs: platform=ubuntu
    amazon-ebs: platform_version=14.04
    amazon-ebs: ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
    amazon-ebs: program_name=chef-solo worker: ppid=1517;start=06:47:18;
    amazon-ebs: executable=/opt/chef/bin/chef-solo

Chef 13.5.3 - chef_ruby_execute - Incomplete path

chef_rvm_execute 'bundle install' do
  ruby_string '2.0.0'
  user 'someuser_other_than_root'
  cwd '/home/ubuntu/test'
  command 'bundle install'
  not_if 'bundle check'
  action :run
end

Works on CentOS 6 & 7 with Chef Client 12.21.12
Fails on CentOS 6 & 7 with Chef Client 13.5.3

Issue: Its run as user someuser but runs with root path/environment.

Possibly related to:

chef-boneyard/sudo#116
chef-boneyard/chef-client#473

I tried using theenvironment attribute, but it's wanting a HASH, but I've not be able to figure out what it should look like.

Warnings when running pertaining to Chef13

chef_rvm_execute[bundle install] action run[2017-01-31T17:30:22-06:00] WARN: Class Chef::Provider::ChefRvmExecute does not declare 'provides :chef_rvm_execute'.
[2017-01-31T17:30:22-06:00] WARN: This will no longer work in Chef 13: you must use 'provides' to use the resource's DSL.

Cannot specify both default and name_property together on property user of resource chef_rvm. Only one (name_property) will be obeyed. In Chef 13, this will become an error. Please remove one or the other from the property. at 1 location:
- /var/chef/cache/cookbooks/chef_rvm/resources/default.rb:3:in class_from_file' See https://docs.chef.io/deprecations_custom_resource_cleanups.html for further details. Default value true is invalid for property ruby_string. In Chef 13 this will become an error: Option ruby_string must be a kind of [String]! You passed true.. at 1 location: - /var/chef/cache/cookbooks/chef_rvm/libraries/01_execute_resource_mixin.rb:22:in ruby_string'
See https://docs.chef.io/deprecations_custom_resource_cleanups.html for further details.
Class.find_provider_for_node is deprecated at 1 location:
See https://docs.chef.io/deprecations_chef_platform_methods.html for further details.
Class.find_provider is deprecated at 1 location:
See https://docs.chef.io/deprecations_chef_platform_methods.html for further details.
Class.find is deprecated at 1 location:
See https://docs.chef.io/deprecations_chef_platform_methods.html for further details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.