Ask Your Question
1

Do we have a packaging mechanisam in puppet ?

asked 2017-03-12 04:13:40 -0500

Suresh300567 gravatar image

I want to package an rpm file and push it to the target servers.. What should be the process involved in this task?

edit retag flag offensive close merge delete

Comments

Puppet is the wrong tool for this task.

Kai Burghardt gravatar imageKai Burghardt ( 2017-03-12 20:05:40 -0500 )edit

That is not accurate

Eric_Anderson gravatar imageEric_Anderson ( 2017-03-13 06:18:50 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-03-13 12:48:37 -0500

smarlow gravatar image

Puppet will work for deploying RPMs to servers, but it has no mechanism by which to do the packaging for you.

If you need to package a bunch of files into an RPM I would recommend using FPM: https://github.com/jordansissel/fpm

edit flag offensive delete link more
0

answered 2017-03-13 06:24:02 -0500

Eric_Anderson gravatar image

updated 2017-03-13 06:24:25 -0500

Create the RPM
put the rpm in the module/files directory

Your module directory tree should look like:

mymodule/
|-- README.md
|-- examples
|   `-- init.pp
|-- files
|   `-- mypackage.rpm
|-- manifests
|   `-- init.pp
`-- metadata.json

In your manifests/init.pp add:

package { 'mypackage':
  ensure => installed,
  source => 'Puppet:///modules/mymodule/mypackage.rpm',
}
edit flag offensive delete link more

Comments

You would have to make sure that if you 'update' the rpm, that it could properly install the new version if the old one was already installed. I haven't personally tested this workflow, and I would be cautious. Another approach is to host a yum repo on the puppetserver

DarylW gravatar imageDarylW ( 2017-03-14 08:43:33 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-12 04:13:40 -0500

Seen: 54 times

Last updated: Mar 13