puppetforemantheforeman

We did not find at least one configured Smart Proxy with the Puppet feature


I have installed puppetmaster, puppet and foreman in Ubuntu 12.04, puppetmaster and agent is configured to report to foreman and its working fine.

I can see my host in foreman UI... Up to this everything is fine..............

Now the problem is,

I have installed ntp, nexus and other modules in /etc/puppet/modules directory but none of these modules/classes are showing up in foreman ui ( Classes ) section.

My Configuration

puppet agent  3.0.1
foreman       1.11
puppet master 3.0.1
ruby          1.9.3

In master section of puppet.conf, I have

[production] environment path set to /etc/puppet/modules

Tried restarting puppetmaster and foreman, but not working

Then, I tried this,

admin@host:/usr/share/foreman$ sudo foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate

admin@host:/usr/share/foreman$ sudo foreman-rake puppet:import:puppet_classes --trace
** Invoke puppet:import:puppet_classes (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute puppet:import:puppet_classes

I am getting the below error

ERROR: We did not find at least one configured Smart Proxy with the Puppet feature

Btw, I have the proxy configured and running fine and I have log service running in it. I didn't have SSL enabled, but http port is running and listening...

UPDATE 1:

Now I enabled puppet.yml along with SSL options under /etc/foreman-proxy/settings.d/settings.yml. I then navigated to proxy section in foreman GUI and found this log

Message
Couldn't enable plugin puppet: Gem loading error: cannot load such file -- augeas
Backtrace
/usr/lib/ruby/vendor_ruby/bundler_ext/output.rb:12:in `strict_err'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:50:in `rescue in block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:39:in `block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `each'
/usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in `system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:19:in `block in system_require'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `each'
/usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in `system_require'
/usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'
/usr/share/foreman-proxy/lib/proxy/plugin.rb:151:in `configure_plugin'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:31:in `block in configure_plugins'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:29:in `each'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:29:in `configure_plugins'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:5:in `initialize_plugins'
/usr/share/foreman-proxy/lib/launcher.rb:114:in `configure_plugins'
/usr/share/foreman-proxy/lib/launcher.rb:124:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'

UPDATE 2:

I tried to install ruby-augeas gem, but got this error,

sudo gem install ruby-augeas
Fetching: ruby-augeas-0.5.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-augeas:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/1.9.1/gems/ruby-augeas-0.5.0/ext/augeas
/usr/bin/ruby1.9.1 -r ./siteconf20160906-12554-zvrlfk.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby1.9.1
        --with-augeas-config
        --without-augeas-config
        --with-pkg-config
        --without-pkg-config
extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-augeas-0.5.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/1.9.1/gems/ruby-augeas-0.5.0 for inspection.

Solution

  • Well, there's a whole bunch of issues here.

    1. Foreman 1.11 is not the current version, please use Foreman 1.12. It supports the current version of Puppet (4.x) and more modern Ubuntu releases.
    2. Puppet 3.0.x is a really bad release to use, because it has poor support in Foreman and had a number of issues. There's no reason not to be using Puppet 3.8.x or preferably 4.x with Foreman 1.12.
    3. Ubuntu 12.04 is a very old release to be installing new software onto, use 16.04 or 14.04. Foreman 1.11 had deprecated its support for Ubuntu 12.04, so I wouldn't recommend putting a new installation onto it.
    4. If missing the Augeas dependency, install the package, don't try installing gems over the top - you'll probably introduce new issues. apt-get install libruby-augeas1.8