I am trying to get a package (iftop) installed on a test node using puppet but I can''t get it to install. This seems like it should be simple, but I can''t figure out what I am missing. Have done a lot of searching for similar problems and the answers I found seem to be vague in the details and explanation. I have the package added to an internal yum repo. OS is Centos 5.4. Puppet version is 2.6.2-1. The module is "utilities". This is a working production environment. (Person who set it no longer around) As a verification item to note, I have added a custom fact to the "utilities" module and it correctly being picked up by the test node. I have added the following to init.pp class utilities { package { "iftop": ensure => "present", source => ''http://yum.repo.internal/misc/iftop-0.17-1.el5.rf.x86_64.rpm'' } } When I run puppetd --test --debug I see no output regarding iftop in the debug output. Any troubleshooting tips or suggestions as to what I am missing? Thanks, -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/H7qGkRPqwyoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 11/01/2012 08:49 PM, Sixthmoon wrote:> I am trying to get a package (iftop) installed on a test node using > puppet but I can''t get it to install. This seems like it should be > simple, but I can''t figure out what I am missing. Have done a lot of > searching for similar problems and the answers I found seem to be vague > in the details and explanation. > > I have the package added to an internal yum repo. OS is Centos 5.4. > Puppet version is 2.6.2-1. The module is "utilities". This is a working > production environment. (Person who set it no longer around) As a > verification item to note, I have added a custom fact to the "utilities" > module and it correctly being picked up by the test node. > > I have added the following to init.pp > > class utilities { > > package { "iftop": > ensure => "present", > source => > ''http://yum.repo.internal/misc/iftop-0.17-1.el5.rf.x86_64.rpm'' > } > } > > When I run puppetd --test --debug I see no output regarding iftop in > the debug output. Any troubleshooting tips or suggestions as to what I > am missing?Try to remove doublequotes around present, and try to add provide => ''rpm'' to resource. Also, don''t forget to include utilities in your node''s manifest. -- Jakov Sosic www.srce.unizg.hr -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
If you''ve added it to the relevant yum repo, does it show up when trying to install using yum directly on the node? My understanding is the source option is only needed for the rpm provider. If you want to use yum, just drop the source and make the resource name the package... Should then install via yum. Hth. Gav -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/TrBSGcyawQUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
In regard to: [Puppet Users] Install RPM package via puppet, Sixthmoon said...:> I have the package added to an internal yum repo. OS is Centos 5.4. Puppet > version is 2.6.2-1. The module is "utilities". This is a working production > environment. (Person who set it no longer around) As a verification item to > note, I have added a custom fact to the "utilities" module and it correctly > being picked up by the test node. > > I have added the following to init.pp > > class utilities { > > package { "iftop": > ensure => "present", > source => > ''http://yum.repo.internal/misc/iftop-0.17-1.el5.rf.x86_64.rpm'' > } > }package { ''iftop'': ensure => present, require => Yumrepo[''your-repo-name-here''], } You should also have a yumrepo {''your-repo-name-here'': baseurl => ''http://your.host.here/repo/CentOS/$releasever/$basearch/'', enabled => 1, descr => ''whatever'', metadata_expire => ''300'', } somewhere in your catalog. You''ve already done the parts that a lot of people seem to want to skip; specifically packaging the software and creating a local repo with the software in it. You just need to define your repo to puppet and then use a very standard "package" resource to make it present. Note the yumrepo resource type supports a lot more attributes, which you may wish to investigate. Tim -- Tim Mooney Tim.Mooney@ndsu.edu Enterprise Computing & Infrastructure 701-231-1076 (Voice) Room 242-J6, IACC Building 701-231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gavin, Yes, I can do a manual yum install. There are no dependencies. The rpm installs the single binary. Thanks, Mike On Thursday, November 1, 2012 1:34:58 PM UTC-7, Gavin Williams wrote:> > If you''ve added it to the relevant yum repo, does it show up when trying > to install using yum directly on the node? > > My understanding is the source option is only needed for the rpm provider. > If you want to use yum, just drop the source and make the resource name the > package... Should then install via yum. > > Hth. > Gav > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/vK9QDE0h_RoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tim, It looks like our Puppet master doesn''t have yum setup that way. From what I see we are having puppet place the .repo files into /etc/yum.repo.d/ All the current package definitions only have the following attributes: class example { package { [ "example" ]: ensure => "present", require => [File[ "/etc/yum.repos.d" ], Exec[ "/usr/bin/yum makecache" ]], } } On Thursday, November 1, 2012 2:12:30 PM UTC-7, Tim Mooney wrote:> > In regard to: [Puppet Users] Install RPM package via puppet, Sixthmoon > said...: > > > I have the package added to an internal yum repo. OS is Centos 5.4. > Puppet > > version is 2.6.2-1. The module is "utilities". This is a working > production > > environment. (Person who set it no longer around) As a verification item > to > > note, I have added a custom fact to the "utilities" module and it > correctly > > being picked up by the test node. > > > > I have added the following to init.pp > > > > class utilities { > > > > package { "iftop": > > ensure => "present", > > source => > > ''http://yum.repo.internal/misc/iftop-0.17-1.el5.rf.x86_64.rpm'' > > } > > } > > package { ''iftop'': > ensure => present, > require => Yumrepo[''your-repo-name-here''], > } > > You should also have a > > yumrepo {''your-repo-name-here'': > baseurl => '' > http://your.host.here/repo/CentOS/$releasever/$basearch/'', > enabled => 1, > descr => ''whatever'', > metadata_expire => ''300'', > } > > somewhere in your catalog. > > You''ve already done the parts that a lot of people seem to want to skip; > specifically packaging the software and creating a local repo with the > software in it. You just need to define your repo to puppet and then > use a very standard "package" resource to make it present. > > Note the yumrepo resource type supports a lot more attributes, which you > may wish to investigate. > > Tim > -- > Tim Mooney Tim.M...@ndsu.edu<javascript:> > Enterprise Computing & Infrastructure 701-231-1076 > (Voice) > Room 242-J6, IACC Building 701-231-8541 (Fax) > North Dakota State University, Fargo, ND 58105-5164 >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AORdt4FzyxYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
In regard to: Re: [Puppet Users] Install RPM package via puppet, Sixthmoon...:> Tim, > > It looks like our Puppet master doesn''t have yum setup that way. From what > I see we are having puppet place the .repo files into /etc/yum.repo.d/ > > All the current package definitions only have the following attributes: > > class example { > > package { [ "example" ]: > ensure => "present", > require => [File[ "/etc/yum.repos.d" ], Exec[ "/usr/bin/yum > makecache" ]], > } > }Ok, that should work too, though I generally try avoid exec''s if possible. puppet provides a yumrepo resource type so that''s what we''re using with puppet, but what you''re doing should also work. It''s probably going to result in a lot of calls to ''yum makecache'', but that''s your choice. The important point is that the client system that needs to have the package installed has a repo definition for the repo that contains the package. Someone else already asked this and it''s a salient question: if you hop on the client and type yum info iftop does yum respond with information about the package from your repo? If it does, then using just the "package" resource should be enough to get it installed. On a CentOS client, you shouldn''t need to do anything with "provider" and you shouldn''t need to set "source". If it''s in the repo, the default provider (yum) should find it and install it. If it doesn''t, then something else is going on. Tim -- Tim Mooney Tim.Mooney@ndsu.edu Enterprise Computing & Infrastructure 701-231-1076 (Voice) Room 242-J6, IACC Building 701-231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Yes, yum info iftop on the test node shows: Available Packages Name : iftop Arch : x86_64 Version : 0.17 Release : 1.el5.rf Size : 46 k Repo : misc Summary : Display bandwidth usage on an interface URL : http://www.ex-parrot.com/~pdw/iftop/ License : GPL Description: iftop does for network usage what top(1) does for CPU usage. It listens : to network traffic on a named interface and displays a table of current : bandwidth usage by pairs of hosts. Handy for answering the question : "why is our ADSL link so slow?". Guess that means something else is going on. Probably a dumb syntax error or something on my part. I''ll keep at it and post the solution when I find it. I wonder if creating a manifest.pp file and then running puppet apply manifest.pp will show any extra info? Don''t even know if that is a valid troubleshooting step. Thanks for all the replies everyone. Mike On Thursday, November 1, 2012 3:59:54 PM UTC-7, Tim Mooney wrote:> > > > Someone else already asked this and it''s a salient question: if you hop > on the client and type > > yum info iftop > > does yum respond with information about the package from your repo? > > If it does, then using just the "package" resource should be enough to > get it installed. On a CentOS client, you shouldn''t need to do anything > with "provider" and you shouldn''t need to set "source". If it''s in the > repo, the default provider (yum) should find it and install it. If it > doesn''t, then something else is going on. > > Tim > -- > Tim Mooney Tim.M...@ndsu.edu<javascript:> > Enterprise Computing & Infrastructure 701-231-1076 > (Voice) > Room 242-J6, IACC Building 701-231-8541 (Fax) > North Dakota State University, Fargo, ND 58105-5164 >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/n7_VJoFH50IJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.