On 30 Jul 2013 18:57, "Paul Pham" <m...@paulpham.net> wrote: > Do most folks who use puppet not use yum? Or are most people okay with letting puppet install dependencies automagically?
Puppet has different package providers and I use the appropriate one depending on what I want it to do. If I want Puppet to just install a package and fail if it's dependencies are not met I use the rpm provider and specify the location of the rpm file. If I want Puppet to install a package with all its dependencies then I use the yum provider (the default) usually with a local repository so I can make local changes - try fpm, pulp and similar tools. Of course there are similar providers for non-RHEL systems. > Paul - Keith > > On Monday, July 29, 2013 10:58:11 AM UTC-7, jcbollinger wrote: >> >> >> >> On Wednesday, July 24, 2013 4:29:44 PM UTC-5, Paul Pham wrote: >>> >>> Hello, puppet n00b here. >>> >>> Trying to install cassandra via puppet. Works great, only caveat is cassandra (dsc12 package) lists openjdk as a dependency. Ironically enough, the datastax guys themselves recommend using Oracle JRE instead of openjdk, and there is even a bug that prevents cassandra from starting if it's using openjdk. Anyway, I fixed it by adding an exec to my puppet-java module that sets the Oracle JRE runtime as the defaults via alternatives, and it works fine. However, I still end up with two different java runtimes installed which I find to be a bit unclean. >>> >>> The root of the problem to me, though, is that by having puppet install dsc12, I lose visibility into what all those dependencies were that got installed along with it (I didn't realize openjdk was even installing until I started investigating why cassandra wasn't starting). So what I'd prefer to do is add each individual package dependency into my cassandra module itself, thereby explicitly installing only what I intend to install, and nothing else. >>> >>> The only way this works, though, is if I can somehow pass the "--nodeps" option into yum during puppet apply time. Otherwise, regardless of whether I already installed Oracle JRE, using yum to install dsc12 will automatically install openjdk. >>> >>> >>> >>> How have you guys handled scenarios like this? I tried searching through the topics here for "yum nodeps" but it seems people found different ways of solving their individual problems rather than sending flags to the yum provider itself. I also noticed this puppet feature request which unfortunately has remained open(?) for 3 years. I've also seen people suggest that nodeps should never be used with yum since the purpose of yum is to handle dependencies... but we also like some of the other features of yum, like being able to pull packages down by name automatically from our yum repo (which we manage in-house). >>> >>> Anyway, any insights would be great! Thanks, >> >> >> >> The best solution to the immediate problem would be to rebuild the RPM to correct the dependency information. There are even tools available by which you could edit your existing RPM without rebuilding it from scratch. >> >> As far as --nodeps goes, I am not aware that yum implements it, or anything similar. I find explicit documentation to the contrary, in fact. If you want to go that direction (very unwise) then you need to use rpm directly. >> >> If you use rpm directly, however, (including by explicitly telling Puppet to use the 'rpm' Package provider) then you probably still don't want --nodeps. Instead, you want rpm to fail when a package's dependencies are not satisfied, so that you can fix the problem. This is the route to take if you want to explicitly specify every package and avoid any others being installed. You do not then get automatic package downloads, but rpm understands http: URLs, so you can still pull packages from your local repository (or external ones) by specifying their complete URLs. >> >> >> John >> > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.