1

I need an omnibus builder box for building a python cli package.

I would like to use this cookbook, on this vagrantbox

I am running this as root since the omnibus installer needs to check something using data in /opt

my vagrantfile looks like this:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
  config.vm.box = "centos65opscode"
  # config.vm.provision "chef_solo" do |chef|
  #   chef.add_recipe "omnibus"
  # end
  config.librarian_chef.cheffile_dir = "chef"
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "chef/cookbooks"
    chef.add_recipe "omnibus"
  end
end

Since the Librarian chef plugin for vagrant doesn't seem to be doing anything I added all the dependencies manually:

I am getting this error:

==> default: NameError
==> default: ---------
==> default: uninitialized constant Chef::Sugar::DSL
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:31:in `<module:Helper>'
==> default:   /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:30:in `<module:Languages>'
==> default:   /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:29:in `<top (required)>'
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:
==> default:
==> default:  24:  rescue LoadError
==> default:  25:    Chef::Log.warn 'chef-sugar gem could not be loaded.'
==> default:  26:  end
==> default:  27:
==> default:  28:  # Various code vendored from omnibus cookbook
==> default:  29:  module Languages
==> default:  30:    module Helper
==> default:  31>>     include Chef::Sugar::DSL if Chef.const_defined?('Sugar')
==> default:  32:
==> default:  33:      #
==> default:  34:      # Performs a `File.join` but ensures all forward slashes are replaced
==> default:  35:      # by backward slashes.
==> default:  36:      #
==> default:  37:      # @return [String]
==> default:  38:      #
==> default:  39:      def windows_safe_path_join(*args)
==> default:  40:        ::File.join(args).gsub(::File::SEPARATOR, ::File::ALT_SEPARATOR)
Gil Zellner
  • 183
  • 1
  • 8
  • [root@localhost vagrant]# sudo find / -name solo.rb /opt/chef/embedded/lib/ruby/gems/2.1.0/bundler/gems/chef-4788d800c1ce/lib/chef/application/solo.rb /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.7.2/lib/chef/application/solo.rb perhaps I misunderstood how this is supposed to work. I am under the assumption that chef-solo simply runs the local chef recipe i am in, the same way omnibus runs the local omnibus build. is this incorrect ? – Gil Zellner Mar 08 '16 at 16:06
  • My intention was to question the error message, but i don't mean to imply the location should be that; my mistake (comment removed). Although include as much detail about your configuration will help you get an answer – pete Mar 08 '16 at 16:13
  • edited with new info, new errors, etc. – Gil Zellner Mar 13 '16 at 14:32

0 Answers0