OpenNebula / addon-appmarket

AppMarket builds a centralized catalog of cloud applications
http://opennebula.org/addons:addons
Apache License 2.0
10 stars 13 forks source link

appmarket 1.9.80 package not working on debian 7 #19

Closed hostingnuggets closed 10 years ago

hostingnuggets commented 10 years ago

Installed the appmarket and appmarket-worker v1.9.80 official OpenNebula packages on Debian 7 as per the instructions, the appmarket web interface works fine but the appmarket command line does not work, here is what happens when I try to run it:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- command_parser (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/bin/appmarket:34:in `<main>'

I have installed the ruby1.9.1, ruby1.9.1-dev and libruby1.9.1 Debian packages. Am I missing anything here?

dmamolina commented 10 years ago

You can fix that error installing the opennebula-cli gem.

gem install opennebula-cli

I will update the documentation to include that step

hostingnuggets commented 10 years ago

cheers! you might also want to include this gem into the Gemfile of the appmarket so that it gets automatically installed with bundle

dmamolina commented 10 years ago

Included, thank you

hostingnuggets commented 10 years ago

i might be missing something else, i am trying to create an appliance with the appmarket from the shell using the create command with a JSON file but it looks like the create method is undefined... you have any ideas?

$ appmarket create debian7.json

/usr/bin/appmarket:179:in `block (2 levels) in <main>': undefined method `create' for #<AppMarket::Client:0x00000000cf7858> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/opennebula-cli-4.4.0/lib/command_parser.rb:449:in `call'
    from /var/lib/gems/1.9.1/gems/opennebula-cli-4.4.0/lib/command_parser.rb:449:in `run'
    from /var/lib/gems/1.9.1/gems/opennebula-cli-4.4.0/lib/command_parser.rb:76:in `initialize'
    from /usr/bin/appmarket:101:in `new'
    from /usr/bin/appmarket:101:in `<main>'
dmamolina commented 10 years ago

Could you try changing this line https://github.com/OpenNebula/addon-appmarket/blob/master/src/client/bin/appmarket#L179 using ''create_appliance'' instead of ''create''

hostingnuggets commented 10 years ago

that worked, thanks! looks like another commit is following :+1: also the integration with sunstone works fine except one small detail: when i clone the appliance the image location path input field is messed up, i have twice the URL stucked together such as:

http://mymarket:6242http://mymarket:6242/appliance/530f5cb5b329290ab7000001/download

have any idea why i see this behavior?

hostingnuggets commented 10 years ago

regarding my last comment i found out that this wrong download URL is stored wrong in the appmarket so i suppose it is an appmarket bug. here below is the relevant output while running an appmarket show in my newly created appliance:

...
  "links": {
    "download": {
      "href": "http://localhost:6242http://localhost:6242/appliance/530f5cb5b329290ab7000001/download"
    }
  }
...

as you can see the beginning of the href (http://localhost:6242) should not be there...

dmamolina commented 10 years ago

Could you try changing this line https://github.com/OpenNebula/addon-appmarket/blob/master/src/controllers/appmarket-server.rb#L397

to

    appliance_url = (request.env['REQUEST_URI']||'')

and restart appmarket-server after that

hostingnuggets commented 10 years ago

:+1: that worked! the URL path when importing an appliance is now correct