Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases does not allow module search #1

Open
ssube opened this issue Sep 29, 2015 · 6 comments
Open

Releases does not allow module search #1

ssube opened this issue Sep 29, 2015 · 6 comments

Comments

@ssube
Copy link

ssube commented Sep 29, 2015

When running puppet module install against a Nexus instance running this plugin, I receive:

ssube@desktop /tmp $  > puppet module install --verbose --debug --modulepath . --module_repository "http://localhost" puppetlabs-nodejs
Notice: Preparing to install into /tmp ...
Notice: Downloading from http://localhost ...
Debug: HTTP GET http://localhost/v3/releases?module=puppetlabs-nodejs
Error: Could not execute operation for 'puppetlabs-nodejs'
  The server being queried was http://localhost/v3/releases?module=puppetlabs-nodejs
  The HTTP response we received was '405 Method Not Allowed'
  The message we received said 'GET method not allowed on resource 'puppetforge/puppet/v3/releases''
    Check the author and module names are correct.

This is hitting an nginx set up with:

location / {                                                                   
     proxy_pass http://localhost:8081/nexus/service/siesta/puppetforge/puppet/;
}                                                                              

Where is this plugin supposed to be at/does it actually work yet? Is there anything I can do to fix this?

@brianhks
Copy link
Owner

What version of puppet are you using? The call it is making appears to be an older version of the api. I've made this to support v3 of the api.

Also yes this should be working, I'll be adding more documentation tomorrow. Although I must say I haven't tried it with puppet, I've always used librarian-puppet.

My overall design is to bundle modules together into packages that are then deployed to the puppet master via the ENC. This video shows what I'm trying to do: https://www.youtube.com/watch?v=XEj8EgnRHz0

@ssube
Copy link
Author

ssube commented Sep 30, 2015

I'm running Puppet 3.6.2 right now, which is not the latest at all. It is making requests to the v3 API, but I'll try upgrading and see what happens.

@ssube
Copy link
Author

ssube commented Sep 30, 2015

This is happening with Puppet 3.8.3 as well:

ssube@desktop /tmp $  > puppet module install --verbose --debug --modulepath . --module_repository "http://localhost" puppetlabs-nodejs
Debug: Runtime environment: puppet_version=3.8.3, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
Notice: Preparing to install into /tmp ...
Notice: Downloading from http://localhost ...
Debug: HTTP GET http://localhost/v3/releases?module=puppetlabs-nodejs
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'pe_license' for feature 'pe_license'
Error: Request to Puppet Forge failed.
  The server being queried was http://localhost/v3/releases?module=puppetlabs-nodejs
  The HTTP response we received was '405 Method Not Allowed'
  The message we received said 'GET method not allowed on resource 'puppetforge/puppet/v3/releases''

What version of Puppet have you tested this with?

@brianhks
Copy link
Owner

brianhks commented Oct 1, 2015

I was testing this with librarian-puppet which uses the public forge api as documented here https://forgeapi.puppetlabs.com/

I don't see a documented api for releases?modules=xxx

It wouldn't be hard to add, just need to figure out what that call needs to return.

@ssube
Copy link
Author

ssube commented Oct 1, 2015

Looking at the releases endpoint in the documentation, the ?modules should be the first parameter listed:

Takes the form of '{user}-{module}', limits the results to releases of that module

It looks like the plugin doesn't allow any GET requests, with or without query params, to releases today. That looks like it acts as a general search endpoint.

I'm planning on switching to librarian or r10k soon, so this is more of a doesn't-quite-fit-the-spec issue, but I think that endpoint supports search.

@brianhks
Copy link
Owner

brianhks commented Oct 8, 2015

Gah, ok I'm dumb, didn't drop down the details on the releases call. With my workflow I didn't need it so I didn't look. Like I said I've only tested this with librarian-puppet. Ultimately I'll be distributing the puppet code as a tarball that contains an entire role. In my mind git should not be part of your production deployment process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants