Git Product home page Git Product logo

puppet-anvil's People

Contributors

benschw avatar jhaals avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-anvil's Issues

Add Proxy Support

I'm opening this up to start a conversation about potentially adding the ability to proxy requests to another forge, such as the Puppet public forge.

My use case is as following.

Currently, I'm using puppet-anvil and puppet-forge-mirror (thanks for putting those out there!) to successfully serve up privately developed modules as well as modules from the forge. However, there is a period of time from whenever the forge server comes up and when puppet-forge-mirror gets a complete mirror of the public forge. During that time, any hosts that come online would have a pretty good chance of not being able to have a successful puppet run. I'm also anticipating some issues with running the puppet-forge-mirror periodically (daily most likely) and an update to a module gets pushed to the forge, but is unavailable in my mirror until the next puppet-forge-mirror run.

I'm toying with the idea of adding optional proxy support to help with this use case. If the module/release is unavailable, then proxy the request to the user-configured forge.

I haven't given too much thought to the implementation, but it seems doable.

What are your thoughts?

Thanks!
Paul

Add the /modules endpoint

The modules endpoint is used by librarian-puppet to fetch module information, so currently it doesn't work with puppet-anvil.

Add pagination support

The puppet_forge ruby gem (used by librarian-puppet for example) depends on the pagination in the V3 API. It would be good if puppet anvil supported that.

Add auth to `/admin` namespaced routes

I was thinking, in the spirit of keeping things light weight and free of external resource dependencies, we would use a simple token based auth.

The server can be informed of the token via its environment:

ANVIL_TOKEN=275dece4-3092-11e5-9c7c-34e6d77dca6c PORT=8080 MODULEPATH=/var/lib/puppet-anvil/modules ./build/puppet-anvil

and clients accessing /admin resources could supply the token in a header:

curl -H "X-ANVIL-TOKEN: 275dece4-3092-11e5-9c7c-34e6d77dca6c" -X PUT http://localhost:8080/admin/module/puppetlabs-stdlib-4.6.0.tar.gz -T ./puppetlabs-stdlib-4.6.0.tar.gz

Not supplying this env var could result in either making the /admin namespace unreachable / always Forbidden, or it could default to being always open.

Alternatively, we could skip this alltogether and say that it is the responsibility of a reverse proxy with content splitting.

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.