create puppet module from software install

27 views
Skip to first unread message

plue...@caci.com

unread,
May 14, 2015, 1:15:30 PM5/14/15
to puppet...@googlegroups.com
I have installed apache and tomcat from source in the /opt directory. 
Once I completed the install I modified the directory and file ownership and permissions.
I also modified the .conf and .xml files for both tomcat and apache.
Is there a way to capture a directory structure and the modifications and then create a puppet module from this info?
would I use puppet resource or do I need to entre the info by hand?
Thanks

Branan Riley

unread,
May 14, 2015, 1:39:41 PM5/14/15
to puppet...@googlegroups.com
I would recommend that you build a package, which you can then deploy with Puppet. You may still wish to manage the configuration files separately witha  module, and that's definitely find (and encouraged). Since it sounds like you mostly just want to bundle up a directory, fpm[1] might be all you need.

Using a native package will make it much easier when you need to upgrade (and you will, eventually). It will also allow easy auditing of which version of the software is running on each system in your infrastructure.

If for some reason you don't want to use a package (and I STRONGLY recommend that you create a proper system package), you can also just make a tarball and use the staging[2] or archive[3] modules to deploy it with Puppet.


Branan Riley
Software Engineer, Puppet Labs

Corey Osman

unread,
May 15, 2015, 12:47:22 PM5/15/15
to puppet...@googlegroups.com
I would agree with Branan.  You should avoid compiling source code on a puppet node (unless its a ruby gem).  But if you must know there is a tool called blueprint that will get you what you want although it may not capture everything or it might capture too much.  


Although I think your time would be better spent on learning fpm (https://github.com/jordansissel/fpm/wiki) or omnibus (https://github.com/chef/omnibus).  I would use omnibus since it does a lot more and has pre defined recipes (https://github.com/chef/omnibus-software/tree/master/config/software)

I would definitely go the omnibus although the learning curve is much more than FPM. 

Also using docker containers is a great way to compile software since you can put all your dependencies in a docker image.


Corey
Reply all
Reply to author
Forward
0 new messages