我已经在 Ubuntu 12.04 中安装了 puppetmaster、puppet 和 foreman,puppetmaster 和代理被配置为向工头报告,并且工作正常。
我可以在工头 UI 中看到我的主机......到目前为止一切都很好............
现在的问题是,
我已经在 /etc/puppet/modules 目录中安装了 ntp、nexus 和其他模块,但是这些模块/类都没有出现在工头 ui ( Classes ) 部分中。
我的配置
puppet agent 3.0.1
foreman 1.11
puppet master 3.0.1
ruby 1.9.3
在 puppet.conf 的 master 部分,我有
[production] environment path set to /etc/puppet/modules
尝试重新启动 puppetmaster 和工头,但无法正常工作
然后,我尝试了这个,
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
我收到以下错误
错误:我们没有找到至少一个具有 Puppet 功能的已配置智能代理
顺便说一句,我配置了代理并且运行良好,并且我在其中运行了日志服务。我没有启用 SSL,但 http 端口正在运行并正在侦听......
更新 1:
现在我在 /etc/foreman-proxy/settings.d/settings.yml 下启用了 puppet.yml 和 SSL 选项。然后我导航到工头 GUI 中的代理部分并找到此日志
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>'
更新 2:
我尝试安装 ruby-augeas gem,但收到此错误,
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.