I am trying to install foreman in ubuntu 12.04, After adding apt source and executing foreman-installer command giving me the below error.
/usr/lib/ruby/vendor_ruby/kafo/puppet_module_parser.rb:21:in `initialize': uninitialized constant Puppet::Parser::Parser (NameError)
Couldn't find much in google....
How to solve it??
I followed this tutorial for installing puppet master and puppet agent
https://coderwall.com/p/w6oxug/puppet-installation-on-ubuntu-12-04lts
Everything was working fine until I uninstall ruby, rvm, gem, bundler etc and made a fresh install of rvm, ruby update to 2.3.0.
I updated ruby to 2.3.0, updated gem, bundlet... But If I type puppet -V, I am getting the below error
sudo service puppet start
- Starting puppet agent /usr/bin/puppet:3:in `require': no such file to load -- puppet/util/command_line (LoadError)
from /usr/bin/puppet:3
Gem Environment:
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/share/rvm/gems/ruby-2.3.0
- USER INSTALLATION DIRECTORY: /home/user/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/share/rvm/rubies/ruby-2.3.0/bin/ruby
- EXECUTABLE DIRECTORY: /usr/share/rvm/gems/ruby-2.3.0/bin
- SPEC CACHE DIRECTORY: /home/user/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/share/rvm/gems/ruby-2.3.0
- /usr/share/rvm/gems/ruby-2.3.0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/share/rvm/gems/ruby-2.3.0/bin
- /usr/share/rvm/gems/ruby-2.3.0@global/bin
- /usr/share/rvm/rubies/ruby-2.3.0/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/lib/jvm/jdk1.7/bin
- /home/glassfish/bin
- /usr/share/rvm/bin
- /home/user/.rvm/bin
- /home/user/.rvm/bin
UPDATE 2:
rvm -v
rvm 1.27.0 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/]
ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
rails -v
Rails 5.0.0.1
gem -v
2.6.6
which ruby
/home/user/.rvm/rubies/ruby-2.3.0/bin/ruby
which rails
/home/user/.rvm/gems/ruby-2.3.0/bin/rails
which gem
/home/user/.rvm/rubies/ruby-2.3.0/bin/gem
UPDATE 3:
foreman-installer
File /var/log/foreman-installer/foreman-installer.log not writeable,
won't log anything to file!
/home/user/.rvm/gems/ruby-2.3.0/gems/kafo-0.9.4/lib/kafo/puppet_module.rb:69:in
`parse': No Puppet module parser is installed and no cache of the file
/usr/share/foreman-installer/modules/foreman/manifests/init.pp is
available. Please check debug logs and install optional dependencies
for the parser. (Kafo::ParserError)
UPDATE 4:
Almost close to finishing installation:
I was using puppet 4 gem and that was causing UPDATE 3 errors. I downgraded puppet to version 3.7 and reinstalled highline and kafo gems
gem install puppet -v 3.7
gem install highline
gem install kafo
Then tried
foreman-installer
Preparing installation Done
Something went wrong! Check the log for ERROR-level output The full
log is at /var/log/foreman-installer/foreman-installer.log
In log, I can see these errors,
[ERROR 2016-08-30T08:13:17 main] Errors encountered during run:
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report_wrapper
Current System Config
rails -v
Rails 4.2.2
ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
gem -v
2.4.8
bundler -v
Bundler version 1.12.5
puppet -V
3.7.0
The above errors are for foreman-installer 1.4 and 1.7,
when I try 1.3 installer,
'uninitialized constant Kafo::KafoConfigure (NameError) '
UPDATE 5:
I can conclude one thing now....
It's all about finding the
right puppet version,
right kafo version,
right foreman-installer,
right ruby version and
right gem version for ubuntu 12.04
IF anyone succeeded in installing foreman-installer 1.4 in ubuntu 12.04, please give me the version no for all above mentioned
As I mentioned in my original question, In Ubuntu 12.04, Its all about meeting the right configuration for forman-installer, ruby, puppet, kafo, kafo_parsers, rails and gem.
This is the configuration that finally worked for me.
- foreman-installer 1.7
- ruby -v 2.1.1
- rails -v 4.2.2
- puppet -V 3.8.7
- kafo -v 0.9.4
- kafo_parsers -v 0.1.2
- gem -v 2.6.6
When you are changing ruby version, make sure to update gems, install puppet gem and other required gems ( highline ) again
gem update --system
gem install highline
gem install puppet -v 3.8.7
Also, make sure you have the following foreman stuff updated. If you already have foreman old installer, You have to remove it first
sudo apt-get remove foreman-installer
Run this command "sudo nano /etc/apt/sources.list.d/foreman.list
" and update the file with this entry deb http://deb.theforeman.org/ precise 1.7
then run the below commands,
sudo apt-get update
sudo apt-get install foreman-installer
foreman-installer
This is the final configuration which finally worked for me.
Now I am struggling to change foreman port :)
No comments:
Post a Comment