Ask Your Question

How can I tell puppet where to download software from?

asked 2014-07-16 08:54:30 -0500

Lucky gravatar image

updated 2014-07-17 18:26:45 -0500

ramindk gravatar image

I have an environment which does not have open internet access to be able to download software from external repositories. I will need to host the software packages in my own internal network. How do I tell puppet where to download the appropriate software (e.g. Java + Tomcat + Jenkins + Sonar)?

On a side note, we are using Nexus (for our internaly developed applications) which I'd like Puppet to integrate with. I'm wondering if I could extend the use of Nexus and make that my central DML (deffinitive media library) for my 3rd party applications (i.e. Java + Tomcat ... ).

edit retag flag offensive close merge delete


Adendum to my side note ... I've found the following extension to Nexus (Sonatype) which can turn it into a Yum repository: How would I go about telling Puppet to use my new Nexus Yum repo?

Lucky gravatar imageLucky ( 2014-07-16 09:17:49 -0500 )edit

I guess this is the way to add Nexus as my Yum repo: Any other suggestions welcome.

Lucky gravatar imageLucky ( 2014-07-16 10:21:25 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2014-11-16 09:51:20 -0500

nvpuppet gravatar image

One of the other posters is correct in that you can use Puppet to point nodes to an internal repo server. Two pieces of software which are commonly used to create internal yum repositories are Nexus and Pulp Project; Nexus being tightly integrated into the Maven build utils and Pulp Project also having the ability to act as an internal Puppet module Forge. Both tools allow you to version/snapshot the state of your repos which is very for doing package promotion in a deployment pipeline. This can make it easy to do patch management and to upgrade internally developed apps so long as you take the time to roll RPMs for your internally developed software.

edit flag offensive delete link more

answered 2014-07-17 18:09:16 -0500

ramindk gravatar image

It's not a matter of telling Puppet to use your Nexus repo, but using Puppet to configure the OS to use the correct repos in the same way you would have done so before having Puppet.

Without knowing much about your setup, try something like the following

  • remove existing repos that point to external servers
  • add new repos that point to internal servers
  • set any exclude/include statements, yum plugins, etc to prefer certain repos over others if you have multiple and somewhat conflicting repos.

For ordering, something like this may work.

Class['yum'] -> Yumrepo<||> -> Package <| provider == yum |>
edit flag offensive delete link more

answered 2014-11-14 17:10:52 -0500

UBPClaw gravatar image

My baseline puppet manifest creates a .repo file in the /etc/yum.repos.d directory that points at my custom repo I host internally.

file { 'file.repo':
  ensure   => file,
  path     => '/etc/yum.repos.d/file.repo',
  content  => "[Repo_Name]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-07-16 08:54:30 -0500

Seen: 712 times

Last updated: Nov 16 '14