3

another question around this problem.

is there a way the the puppet module install tool to install from a local repo I already downloaded to the disk?

Community
  • 1
  • 1
alonisser
  • 11,542
  • 21
  • 85
  • 139

4 Answers4

5

You can use Puppet Library to host your own private Puppet Forge. It supports serving modules from disk, and proxying remote forges.

Start the server, pointing it to your downloaded modules

puppet-library --module-dir /my/downloaded/modules --port 8888

Add the following to puppet.conf to point it at your local module repository:

[main]
module_repository=http://localhost:8080/

Then, when you run puppet module install, the modules will be installed from the local repository. If you're using librarian-puppet can also point your Puppetfile at the local forge.

Daniel
  • 10,115
  • 3
  • 44
  • 62
3

Unfortunately, no.

You can read the manual page for the puppet module face here. While there seems to be an option to specify private forges when installing modules, Puppetlabs' Forge API are not public, and Puppetlabs itself doesn't support any public or private application other than their Forge to build private repositories.

As an alternative, you could try librarian-puppet: https://github.com/rodjek/librarian-puppet.
It allows you to specify your module dependencies in a Puppetfile, also allowing to specify a Git repository as a source (so you can install also modules that are not in the Forge).

Stefano Zanella
  • 353
  • 1
  • 7
  • Thanks @stefano-zanella , I also turned to ```librarian-puppet``` as a solution. now trying to run it as a shell script before the main puppet script – alonisser Jul 11 '13 at 19:40
2

This does not directly answer the question, but you can install puppet modules from a local file instead of using a local repo. Saves setting up extra stuff if this is a once a once off.

puppet module install ~/puppetlabs-apt-2.0.1.tar.gz --ignore-dependencies --force

The modules can be downloaded directly from puppet forge and saved to local storage.

ignore-dependencies is required if the module has dependancies that you have not installed yet.

oden
  • 3,461
  • 1
  • 31
  • 33
1

There seems to be only 3 options for hosting your own puppet forge server:

This page has a nice summary

Puppet has published their API

Note: I'm not related to any of the products above

David
  • 113
  • 6
  • jfrog link is the same as pulp link. Make sure you're disclosing affiliation if one of the products you linked to is yours. – Jean-François Fabre Apr 01 '19 at 11:17
  • Simple mistake. No affiliation, other than I have used Artifactory previously. Just a friendly reminder to presume good faith. :) I have updated link to artifactory. – David Apr 01 '19 at 11:25
  • I'm presuming good faith but someone flagged this answer as spam, so it could happen again. Edited. – Jean-François Fabre Apr 01 '19 at 11:26