Hero

Access Puppet Forge Repository with Java

#Vagrant-Binding

To integrate Puppet modules more easy to Vagrant-Binding  projects I created a Java API that access Puppet Forge by REST. You can search for modules or download any module to your locale disc. So you can easily add modules from the repository to your own Vagrant environments. The API is currently not part of Vagrant-Binding and can be found here but I plan to integrate the API in the future. Additionally I added a demo to the [Vagrant-Binding-Demos]({{ site.baseurl }}{% post_url 2012-11-03-vagrant-binding-demos %} ) project that can be found at github . Here is a short example that uses the API:

PuppetForgeClient client = new PuppetForgeClient();
File moduleFolder = new File("/path/to/my/modules");

ListallDescriptions = client.findModules("mongodb");

for(PuppetForgeModuleDescription description : allDescriptions) {
   System.out.println("Installing " + description.getFullName());
   PuppetForgeModule module = client.findModule(description);
   client.installToModulesDir(moduleFolder, module);
}
author

Hendrik Ebbers

Hendrik Ebbers is founder of Open Elements and Director of Open Source at Hashgraph. At Linux Foundation Hendrik is TSC chair of the Hiero project and Vice Chair of the LFDT Technical Advisory Board and member of AAIF working groups. Hendrik is a member of the Board of Directors of the Eclipse Foundation. He is co-leading and contributing to several critical open source projects at Eclipse like JakartaEE or Adoptium.

Circle Circle
logo

Open Source made right

Privacy

Privacy Policy Cookie Policy Privacy Config Impressum