puppetlabs/bolt

SPIKE: Loading scripts through Puppetserver

Closed this issue · 1 comments

Use Case

In order to support loading from the scripts/ directory Puppetserver needs to serve files from that directory. As part of #2918 those should already be loaded by Puppet, but we'll likely need to do something to have Puppetserver serve them correctly.

The result of this ticket should be more tickets detailing how to serve files from scripts/ directories in Puppetserver.

Questions

  • Should the Bolt team do this work, or Froyo? Preference for us to do it with review from Froyo, but if they want to own it that's fine.
  • What needs to be done (exhaustive)?

Relies on #2918

Notes

  • It seems like the find-file-in-project method will already do the right thing for Phase 2 once the scripts mountpoint exists
  • We might need to add a routing path handler in Puppet, which processes the ruby API requests here
  • Might be good to file Jira tickets for puppet and puppetserver for tracking purposes for other teams

To do

  • Add scripts to the Task files details function so that using puppet:///module/scripts/module in task metadata works
  • Add scripts to [tasks|modules] in the project-routes and
  • Since the Orchestrator only calls the file_content and file_metadata routes to get scripts, we should only need to add scripts handlers to the ruby handlers
  • Register the file mount in Puppet

Future to do