Coder Social home page Coder Social logo

Comments (13)

alup avatar alup commented on June 16, 2024

Try to use the latest source code from github (clone the repository instead of using the puppet-module from puppet forge).

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

That's exactly what I did. Under the puppet/modules directory, I did a git clone https://github.com/vjt/puppet-rbenv.git rbenv. I just did a git pull to make sure I got the latest source. It said there was no updates, and I still got the problem of "Invalid resource type".

from puppet-rbenv.

robsweet avatar robsweet commented on June 16, 2024

Are you using Puppet environments? What version on the master?

Rob

Sent from my iPhone

On Sep 30, 2012, at 7:53 AM, hau [email protected] wrote:

That's exactly what I did. Under the puppet/modules directory, I did a git clone https://github.com/vjt/puppet-rbenv.git rbenv. I just did a git pull to make sure I got the latest source. It said there was no updates, and I still got the problem of "Invalid resource type".


Reply to this email directly or view it on GitHub.

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

No, I'm not using puppet environments. I'm not using puppet master either at this point. I'm sharing puppet directories with vagrant guests, and running puppet on these vagrant guests by e.g. puppet apply /etc/puppet/manifests/site.pp. These are ubuntu 12 precise x64 vagrant boxes, and the puppet version is 2.7.11.

from puppet-rbenv.

alup avatar alup commented on June 16, 2024

@hau You can test it now. I have done major updates. Dont forget to use the --libdir=\\$modulepath/rbenv/lib value for puppet.options configuration parameter.

You should also clone this repository instead of vjt's.

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

Thanks. However, I'm still not able to get it work.
I replaced rbenv by git clone https://github.com/alup/puppet-rbenv.git rbenv. In the directory where I put Vagrantfile, I have puppet/modules. So, the rbenv module is in puppet/modules/rbenv. The Vagrantfile has

    config.vm.provision :puppet, facter: {'osfamily' => 'debian'}, module_path: 'modules' do |puppet|
      puppet.manifests_path = 'manifests'
      puppet.manifest_file = 'base.pp'
      puppet.options = %w[--libdir=\\$modulepath/rbenv/lib]
    end

When I vagrant up node, I got:

There was a problem with the configuration of Vagrant. The error message(s)
are printed below:

vm:
* The manifests path specified for Puppet does not exist: /home/hau/lab/rc1/manifests
* The configured module path doesn't exist: /home/hau/lab/rc1/modules

I tried changing the line in Vagrantfile to puppet.manifests_path = 'puppet/manifests'. But then it said:

There was a problem with the configuration of Vagrant. The error message(s)
are printed below:

vm:
* The configured Puppet manifest is missing. Please specify a path to an
existing manifest:

/home/hau/lab/rc1/puppet/manifests/base.pp
* The configured module path doesn't exist: /home/hau/lab/rc1/modules

There's no base.pp. In fact, I do not have a base.pp file. Should I? What should I put in base.pp?

from puppet-rbenv.

alup avatar alup commented on June 16, 2024

Make a manifests dir at /home/hau/lab/rc1/manifests and there create a base.pp file with content like this:

  rbenv::install {'vagrant':
    group => 'vagrant',
    home => "/home/vagrant",
  }
  rbenv::compile {'1.9.3-p194':
    user => 'vagrant',
    home => "/home/vagrant",
  }

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

I tried putting the rbenv::install and rbenv::compile blocks in /home/hau/lab/rc1/puppet/manifests. When I started the vagrant guest, e.g. vagrant up node, I got:

There was a problem with the configuration of Vagrant. The error message(s)
are printed below:

vm:
* The configured module path doesn't exist: /home/hau/lab/rc1/modules

I still cannot get it to work.
Apart from this error, I have some questions about putting the rbenv::install and rbenv:compile blocks in a base.pp. I am using a nodes.pp to define the configurations for a few nodes. The definition of a node contains definitions for users. If the installation of rbenv needs to be done in base.pp, which seems to be included in the Vagrantfile vm configuration, it then means I cannot define users in nodes.pp. How does puppet know that it needs to create some users in nodes.pp and then go to base.pp to install rbenv for some of those users? Is it possible to not use base.pp and have the rbenv::install and rbenv::compile blocks inside nodes.pp, so that they can for example require User['someuser']?

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

I also tried creating a directory /home/hau/lab/rc1/manifests and put base.pp in it. When I vagrant up node, I got this error:

There was a problem with the configuration of Vagrant. The error message(s)
are printed below:

vm:
* The configured Puppet manifest is missing. Please specify a path to an
existing manifest:

/home/hau/lab/rc1/puppet/manifests/base.pp
* The configured module path doesn't exist: /home/hau/lab/rc1/modules

from puppet-rbenv.

alup avatar alup commented on June 16, 2024

Take a look at http://github.com/alup/vagrun for an idea of how you should setup the project's folder structure.

from puppet-rbenv.

hau avatar hau commented on June 16, 2024

It seems like puppet-rbenv assumes the user has a group the same name as the user as default. In my setup, that's not the case. After I explicitly set the group, everything worked fine, even without having base.pp and provisioning for vagrant. Thanks for your help! The module is very useful.

from puppet-rbenv.

Rodeoclash avatar Rodeoclash commented on June 16, 2024

Just a note that installing puppet-rbenv via librarian puppet places it in a subfolder under modules called "/puppet-rbenv". This then breaks puppets autoload and triggers the Invalid Resource Error detailed in this thread.

I'm not sure of a good solution (outside of just renaming the folder from puppet-rbenv to rbenv) which allows the autoloading.

from puppet-rbenv.

murdoch avatar murdoch commented on June 16, 2024

Yep, I can confirm that this bug still exists, and many thanks to Rodeoclash for helping me to fix it!

Instead of runninig git clone [email protected]:alup/puppet-rbenv, I needed:

git clone [email protected]:alup/puppet-rbenv rbenv

You need to direct git to install into a folder called rbenv, as otherwise it will go into one called puppet-rbenv...

It took me half an hour to figure this out.

Is there anyway this info can get added to the README? It's the sort of thing that will really help people, as the error message you get when you don't do it this way is not especially intuitive or helpful...

from puppet-rbenv.

Related Issues (20)

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.