Hiera with MySQL on stand-alone Puppet

asked 2015-08-13 05:30:05 -0500

TheRealVayne gravatar image

Hi There,

I am currently trying to setup stand-alone puppet on Windows. So far we have Hiera working with YAML files. However, we need to have the configuration data come out from a SQL database. I have installed MySQL via the crayfishx/hiera-mysql and I am currently trying to get Hiera to connect to it. However everytime I run "hiera sqltest env=development" I get the following error:

C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot
load such file -- mysql (LoadError)
        from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend/mysql_backend.rb:18:in `rescue innitialize'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend/mysql_backend.rb:14:in `initialize'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend.rb:319:in `new'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend.rb:319:in `find_backend'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend.rb:263:in `block in lookup'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend.rb:260:in `each'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera/backend.rb:260:in `lookup'
        from C:/Program Files/Puppet Labs/Puppet/hiera/lib/hiera.rb:113:in `lookup'
        from C:/Program Files/Puppet Labs/Puppet/hiera/bin/hiera:246:in `<main>'

It seems like the MySQL Gem is missing. I tried to install it by going to puppet../sys../lib/gem and then running .\gem install mysql but no luck.

Has any has any similar problems?

Thanks,

edit retag flag offensive close merge delete