0

Good day everyone,

I am giving vagrant a shot and pairing it with puppet to see if I can get a dummy project started. I am using provisioning scripts to install the necessary components in the ubuntu box I am spinning up on vagrant up command; however when puppet is provision it just fails and I don't know why, since I just started playing with it. My directory structure is as follows:

Project
|--puppet
   |--manifests
      |--site.pp
   |--modules(empty)
|--Puppetfile
|--provision scripts
|--Vagrantfile

My provisioning scripts run the following commands

$as_vagrant = 'sudo -u vagrant -H bash -l -c'
${as_vagrant} apt-get update
${as_vagrant} gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
${as_vagrant} apt-get install curl -y
${as_vagrant} curl -sSL https://get.rvm.io | bash -s $1
rvm install 2.1.4
rvm use 2.1.4 --default
${as_vagrant} apt-get install -y puppet
${as_vagrant} gem install librarian-puppet -v 2.0.0
sudo apt-get install git -y
sudo touch /home/vagrant/metadata.json
sudo echo '{}' >> /home/vagrant/metadata.json

(I just threw all the commands in one block instead of breaking them up into their seperate files in order to keep this short)

My Puppetfile looks like this:

#!/usr/bin/env ruby
#^syntax detection

forge "https://forgeapi.puppetlabs.com"

# use dependencies defined in metadata.json
#metadata

# use dependencies defined in Modulefile
# modulefile

# Java module
mod 'tylerwalts/jdk_oracle'

# A module from the Puppet Forge
mod 'puppetlabs-stdlib'

# A module from git
mod 'puppetlabs-ntp',
    :git => 'git://github.com/puppetlabs/puppetlabs-ntp.git'

# A module from a git branch/tag
mod 'puppetlabs-apt',
   :git => 'https://github.com/puppetlabs/puppetlabs-apt.git',
   :ref => '1.4.x'

# A module from Github pre-packaged tarball
# mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache'

The part of my vagrantfile that does runs the provision scripts looks like this:

##### Puppet management section

config.vm.provision :shell, :path => "install-rvm.sh", :args => "stable"
config.vm.provision :shell, :path => "install-ruby.sh", :args => "2.1.4"
config.vm.provision :shell, :path => "install-puppetstuff.sh"
config.vm.provision :shell, :path => "install-defaults.sh"

#Provisioning puppet
config.vm.provision :puppet do |puppet|
    puppet.manifests_path = 'puppet/manifests'
    puppet.module_path = ['puppet/modules']
    puppet.manifest_file = 'site.pp'
end 

#Setting up librarian puppet for puppet modules
config.vm.provision :shell, :path => "librarian-puppet-init.sh"

Finally the librarian-puppet-init.sh script looks like this:

#!/usr/bin/env bash 
librarian-puppet install

The site.pp file:

class { 'jdk_oracle':          
  versrion => '7'              
}

Now, considering I didn't miss anything, that is my current 'set up' and when I do vagrant up everything runs well up until vagrant runs my librarian-puppet-init it script. When it executes it the whole thing crashes and it spits this out

==> default: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class jdk_oracle at /tmp/vagrant-puppet-3/manifests/site.pp:3 on node chard
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --modulepath '/tmp/vagrant-puppet-3/modules-0:/etc/puppet/modules' --manifestdir /tmp/vagrant-puppet-3/manifests --detailed-exitcodes /tmp/vagrant-puppet-3/manifests/site.pp

Stdout from the command:

warning: Could not retrieve fact fqdn


Stderr from the command:

stdin: is not a tty
Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class jdk_oracle at /tmp/vagrant-puppet-3/manifests/site.pp:3 on node chard

However, if I do not include anything in my site.pp file and instead leave it empty, I get this output(everything else stays the same)

==> default: Running provisioner: shell...
    default: Running: /var/folders/jp/b91ydrmx1dx8kmvr0jvc78tw0000gn/T/vagrant-shell20141107-3334-likxg7.sh
==> default: stdin: is not a tty
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:74:in `metadata'
==> default: : 
==> default: undefined method `each' for nil:NilClass
==> default:  (
==> default: NoMethodError
==> default: )
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:24:in `block in run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `instance_eval'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:47:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:34:in `block in run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `tap'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl.rb:17:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/environment.rb:148:in `dsl'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/specfile.rb:15:in `read'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:13:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:67:in `install'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/bin/librarian-puppet:7:in `<top (required)>'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `load'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `<main>'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
==> default:    from /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell

Stdout from the command:



Stderr from the command:

stdin: is not a tty
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:74:in `metadata': undefined method `each' for nil:NilClass (NoMethodError)
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:24:in `block in run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `instance_eval'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:47:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:34:in `block in run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `tap'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl.rb:17:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/environment.rb:148:in `dsl'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/specfile.rb:15:in `read'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:13:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:67:in `install'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
    from /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/bin/librarian-puppet:7:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `load'
    from /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'

Anyone got any clue as to what is going on? I have spent days trying to figure out whats wrong and countless hours trying to find something on google that explains things clearly enough so that I have a squeaky clean set up, with no success. Any and all help is welcome. Thanks everybody.

*****EDIT******

I've moved my provision command for librarian puppet before the commands for provisioning puppet so my vagrant file looks like this now, and I've added a sync command:

 ##### Puppet management section

  config.vm.provision :shell, :path => "install-rvm.sh", :args => "stable"
  config.vm.provision :shell, :path => "install-ruby.sh", :args => "2.1.4"
  config.vm.provision :shell, :path => "install-puppetstuff.sh"
  config.vm.provision :shell, :path => "install-defaults.sh"

  #Seting up librrian puppet for puppet modules
  config.vm.provision :shell, :path => "librarian-puppet-init.sh"

  #Provisioning puppet
  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = 'puppet/manifests'
    puppet.module_path = ['puppet/modules']
    puppet.manifest_file = 'site.pp'
  end 

  #Syncs local chard folder with folder in box 
  config.vm.synced_folder "~/dev/chard", "/chard"

Now this is the puppet librarian output I get:

==> default: [Librarian] Ruby Version: 2.1.4
==> default: [Librarian] Ruby Platform: x86_64-linux
==> default: [Librarian] Rubygems Version: 2.4.2
==> default: [Librarian] Librarian Version: 0.1.2
==> default: [Librarian] Librarian Adapter: puppet
==> default: [Librarian] Librarian Adapter Version: 2.0.0
==> default: [Librarian] Project: /home/vagrant
==> default: [Librarian] Specfile: Puppetfile
==> default: [Librarian] Lockfile: Puppetfile.lock
==> default: [Librarian] Git: /usr/bin/git
==> default: [Librarian] Git Version: 1.7.9.5
==> default: [Librarian] Git Environment Variables:
==> default: [Librarian]   (empty)
==> default: [Librarian] Specfile not found, using defaults: /home/vagrant/Puppetfile
==> default: [Librarian] Pre-Cached Sources:
==> default: Metadata file does not exist: /home/vagrant/metadata.json
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:70:in `metadata'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:24:in `block in run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `instance_eval'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:47:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:34:in `block in run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `tap'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl.rb:17:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/environment.rb:148:in `dsl'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/specfile.rb:15:in `read'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:13:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:67:in `install'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
==> default: /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/bin/librarian-puppet:7:in `<top (required)>'
==> default: /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `load'
==> default: /usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `<main>'
==> default: /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
==> default: /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell

Stdout from the command:

[Librarian] Ruby Version: 2.1.4
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 2.4.2
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 2.0.0
[Librarian] Project: /home/vagrant
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.9.5
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Specfile not found, using defaults: /home/vagrant/Puppetfile
[Librarian] Pre-Cached Sources:
Metadata file does not exist: /home/vagrant/metadata.json
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:70:in `metadata'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:24:in `block in run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `instance_eval'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:34:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:47:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:34:in `block in run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `tap'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/dsl.rb:28:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/dsl.rb:17:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/environment.rb:148:in `dsl'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/specfile.rb:15:in `read'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:13:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/cli.rb:67:in `install'
/usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.1.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
/usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/bin/librarian-puppet:7:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `load'
/usr/local/rvm/gems/ruby-2.1.4/bin/librarian-puppet:23:in `<main>'
/usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'


Stderr from the command:

stdin: is not a tty
/tmp/vagrant-shell: line 2: cd: /home/vagrant/chard: No such file or directory
Mureinik
  • 297,002
  • 52
  • 306
  • 350
engineerKev
  • 335
  • 5
  • 22

1 Answers1

0

That error would only happen if you are using the "metadata" command in the Puppetfile, or if there is no Puppetfile in the working dir but there is a metadata.json, and the metadata.json does not have a 'dependencies' section. The Puppetfile you posted works fine here, check if librarian-puppet is being called in the correct dir and the metadata.json there is good

csanchez
  • 1,623
  • 11
  • 20
  • Hi, I've gone ahead and moved my Puppet file up one directory and also my metadata.json file. Further I've also added cd /home/vagrant/project to my librarian-puppet-init script so that librarian-puppet install now runs in the project directory, where the Puppetfile now is. However, the first error(not the empty metadata file one) still shows. Can you provide anymore advice as to how I can troubleshoot this further to figure out what is going on, exactly? – engineerKev Nov 09 '14 at 16:55
  • Check that you have a jdk_oracle dir in /tmp/vagrant-puppet-3/modules-0 or /etc/puppet/modules. If you don't, then librarian-puppet didn't run successfully, and you need to take a look at the output. Also try changing `mod 'tylerwalts/jdk_oracle'` to `mod 'tylerwalts-jdk_oracle'` – csanchez Nov 10 '14 at 08:59
  • No luck. Jdk_oracle wasn't in either of the directories you mentioned. Also changing the '/' to a '-' had no positive effect either. If I edit my question and post the whole Vagrant file, would that help? – engineerKev Nov 10 '14 at 17:01
  • Post the output of librarian-puppet, using the --verbose flag, because if the modules are not there it means librarian failed – csanchez Nov 11 '14 at 12:37
  • please see my edited question, for the librarian --verbose output – engineerKev Nov 11 '14 at 16:51
  • I don't see in your Vagrantfile where are you copying the Puppetfile to the machine. And you are running librarian-puppet in the home folder, which won't install the modules in /etc/puppet/modules either, use --path – csanchez Nov 12 '14 at 19:56
  • Ok, I see what you mean. I was under the impression that when you do a vagrant up, everything in the directory where your vagrantfile is gets copied over into the box. Seems that was a huge assumption. Should I be synching my project folder, where my vagrant file is, with a folder of the same name, but in the box? Finally, I don't exactly follow by what you mean about using "--path--" – engineerKev Nov 12 '14 at 22:20
  • So, I've gotten further ahead in the installation. It now fails when trying to fetch puppetlabs-stdlib. I am running the librarian install inside my vagrant folder in the box. The error message: 'code' [Librarian] Installing puppetlabs-stdlib/4.4.0 /usr/local/rvm/gems/ruby-2.1.4/gems/librarian-puppet-2.0.0/lib/librarian/puppet/source/forge/repo.rb:138:in "check_puppet_module_options" undefined local variable or method "puppet_version" for #' 'code' – engineerKev Nov 14 '14 at 16:59
  • From the most recent output it seems like everything in my puppetfile has installed. However, after checking the two directories where the the modules might be in, I found nothing there. Now, the process gets as far as the puppet provisioning but it fails when it checks the site.pp file and gives the "could not find class jdk_oracle for chard ....." error again. – engineerKev Nov 14 '14 at 18:13
  • 1
    You need to install the modules to /etc/puppet/modules which is where puppet looks for them by default. Run `librarian-puppet install --path /etc/puppet/modules` – csanchez Nov 18 '14 at 21:17
  • I will try this. However I managed to get my installation up, just now actually. By, if memory serves, adding this command to my vagrant file: config.vm.synced_folder "~/path/to/project/dir", "/vagrant/project" Right before I even start my set up shell scripts. I also encountered an error with one module that used hiera, but resolved that to updating puppet to 3.7.3(latest). I think that is everything. Thanks for your help, I used your comments to re-evaluate my set up and try to recognize anything I missed. – engineerKev Nov 18 '14 at 21:35