Guillem Liarte
2013-Jan-10 11:44 UTC
[Puppet Users] mcollective package plugin rpm versions
Hello, I am trying to find out how to manage versions for installed software. It seems that the ''package'' plugin does not take a version argument, rendering it quite less useful than it could be. Yes, I can manage a version with Puppet, but maybe in certain environments I would like to be able to manage the version of the installed software from mc. So what I would like to do is: mco package install myapp 1.1.2 -C myapp -F environment=development Obviously this is not possible now because package does not take versions as an argument. I have tried the ''packages'' plug-in that claims to manage several packages and takes versions but, it plainly does not work (they say they tested it with EL6, I use EL5). I control the version of packages with puppet/hiera currently. This is a good solution, but I am looking to let puppet do all the work up to the last bit, where the application version can be changed the same way as you would o yum install package-*version*. I am not looking for how to do this with yum or puppet, but with mcollective. So, what do you guys and girls do to manage package versions for your environments with mcollective? Many thanks in advance. -- 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/-/favSOmJKYp0J. 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.
R.I.Pienaar
2013-Jan-10 11:59 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
----- Original Message -----> From: "Guillem Liarte" <guillem.liarte@googlemail.com> > To: puppet-users@googlegroups.com > Sent: Thursday, January 10, 2013 11:44:13 AM > Subject: [Puppet Users] mcollective package plugin rpm versions > > Hello, > > I am trying to find out how to manage versions for installed software. > > It seems that the ''package'' plugin does not take a version argument, > rendering it quite less useful than it could be. Yes, I can manage a > version with Puppet, but maybe in certain environments I would like to be > able to manage the version of the installed software from mc. > > So what I would like to do is: > > mco package install myapp 1.1.2 -C myapp -F environment=development > > Obviously this is not possible now because package does not take versions > as an argument. > > I have tried the ''packages'' plug-in that claims to manage several packages > and takes versions but, it plainly does not work (they say they tested it > with EL6, I use EL5). > > I control the version of packages with puppet/hiera currently. This is a > good solution, but I am looking to let puppet do all the work up to the > last bit, where the application version can be changed the same way as you > would o yum install package-*version*. I am not looking for how to do this > with yum or puppet, but with mcollective. > > > So, what do you guys and girls do to manage package versions for your > environments with mcollective?it would be easy to add the ability to manage the ensure property of the package from the mcollective command line. We''ve not had that feature request though before now -- 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.
Guillem Liarte
2013-Jan-10 12:57 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
Mr Pienaar, I would love to help adding it then. Where do I start? Guillem Liarte On Thursday, 10 January 2013 11:59:28 UTC, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > From: "Guillem Liarte" <guillem...@googlemail.com <javascript:>> > > To: puppet...@googlegroups.com <javascript:> > > Sent: Thursday, January 10, 2013 11:44:13 AM > > Subject: [Puppet Users] mcollective package plugin rpm versions > > > > Hello, > > > > I am trying to find out how to manage versions for installed software. > > > > It seems that the ''package'' plugin does not take a version argument, > > rendering it quite less useful than it could be. Yes, I can manage a > > version with Puppet, but maybe in certain environments I would like to > be > > able to manage the version of the installed software from mc. > > > > So what I would like to do is: > > > > mco package install myapp 1.1.2 -C myapp -F environment=development > > > > Obviously this is not possible now because package does not take > versions > > as an argument. > > > > I have tried the ''packages'' plug-in that claims to manage several > packages > > and takes versions but, it plainly does not work (they say they tested > it > > with EL6, I use EL5). > > > > I control the version of packages with puppet/hiera currently. This is a > > good solution, but I am looking to let puppet do all the work up to the > > last bit, where the application version can be changed the same way as > you > > would o yum install package-*version*. I am not looking for how to do > this > > with yum or puppet, but with mcollective. > > > > > > So, what do you guys and girls do to manage package versions for your > > environments with mcollective? > > it would be easy to add the ability to manage the ensure property of the > package from the mcollective command line. We''ve not had that feature > request though before now >-- 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/-/j04nhS8P4KEJ. 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.
R.I.Pienaar
2013-Jan-10 13:01 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
----- Original Message -----> From: "Guillem Liarte" <guillem.liarte@googlemail.com> > To: puppet-users@googlegroups.com > Sent: Thursday, January 10, 2013 12:57:02 PM > Subject: Re: [Puppet Users] mcollective package plugin rpm versions > > Mr Pienaar, > > I would love to help adding it then. > > Where do I start?Basically the line in the agent: pkg = ::Puppet::Type.type(:package).new(:name => package).provider loads up the puppet type without providing any version hints, so what you see there is equivalent to: package{"x": } and then we specifically call install/update/uninstall as needed. I suspect that if you just change that line to something like: pkg = ::Puppet::Type.type(:package).new(:name => package, :ensure => "1.2.3").provider ie. add an ensure property with your desired version, it would do the right thing, you could perhaps do a manual test to confirm that? If it does work we just need to pass the version from the client to this code and I can point you in the right direction with that. Probably best to take this to the mcollective-users list on google groups though -- 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.
Guillem Liarte
2013-Jan-10 14:59 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
Mr. Pienaar, I have tested the following: Changes in the MC server, package.rb: pkg = ::Puppet::Type.type(:package).new(:name => package, :ensure => "20060214-1.7").provider #pkg = ::Puppet::Type.type(:package).new(:name => package).provider MC client output [root@ttraflonrh364 application]# mco package status ksh -W "hostname=ttraflocorh170" * [ ============================================================> ] 1 / 1 ttraflocorh170.global.trafigura.com version = ksh-20100621-5.el5 ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * 20100621-5.el5 Elapsed Time: 0.53 s [root@ttraflonrh364 application]# mco package uninstall ksh -W "hostname=ttraflocorh170" * [ ============================================================> ] 1 / 1 ttraflocorh170.global.trafigura.com version = absent ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * absent Elapsed Time: 6.23 s [root@ttraflonrh364 application]# mco package status ksh -W "hostname=ttraflocorh170" * [ ============================================================> ] 1 / 1 ttraflocorh170.global.trafigura.com version = absent ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * absent Elapsed Time: 0.12 s [root@ttraflonrh364 application]# mco package install ksh -W "hostname=ttraflocorh170" * [ ============================================================> ] 1 / 1 ttraflocorh170.global.trafigura.com version = ksh-20060214-1.7 ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * 20060214-1.7 Elapsed Time: 11.25 s The version seems to change effectively. So yes, it does seem to work as you said. Do you want em to open a new post in mcollective group? On Thursday, 10 January 2013 13:01:33 UTC, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > From: "Guillem Liarte" <guillem...@googlemail.com <javascript:>> > > To: puppet...@googlegroups.com <javascript:> > > Sent: Thursday, January 10, 2013 12:57:02 PM > > Subject: Re: [Puppet Users] mcollective package plugin rpm versions > > > > Mr Pienaar, > > > > I would love to help adding it then. > > > > Where do I start? > > Basically the line in the agent: > > pkg = ::Puppet::Type.type(:package).new(:name => package).provider > > loads up the puppet type without providing any version hints, so what > you see there is equivalent to: > > package{"x": } > > and then we specifically call install/update/uninstall as needed. > > I suspect that if you just change that line to something like: > > pkg = ::Puppet::Type.type(:package).new(:name => package, :ensure => > "1.2.3").provider > > ie. add an ensure property with your desired version, it would do > the right thing, you could perhaps do a manual test to confirm > that? > > If it does work we just need to pass the version from the client to this > code > and I can point you in the right direction with that. > > Probably best to take this to the mcollective-users list on google > groups though >-- 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/-/aC_Jn5Ly68YJ. 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.
R.I.Pienaar
2013-Jan-10 15:01 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
----- Original Message -----> From: "Guillem Liarte" <guillem.liarte@googlemail.com> > To: puppet-users@googlegroups.com > Sent: Thursday, January 10, 2013 2:59:40 PM > Subject: Re: [Puppet Users] mcollective package plugin rpm versions > > Mr. Pienaar, > > > I have tested the following: > > Changes in the MC server, package.rb: > > pkg = ::Puppet::Type.type(:package).new(:name => package, :ensure > => "20060214-1.7").provider > #pkg = ::Puppet::Type.type(:package).new(:name => > package).provider > > > MC client output > > [root@ttraflonrh364 application]# mco package status ksh -W > "hostname=ttraflocorh170" > > * [ ============================================================> ] 1 / 1 > > ttraflocorh170.global.trafigura.com version = ksh-20100621-5.el5 > > ---- package agent summary ---- > Nodes: 1 / 1 > Versions: 1 * 20100621-5.el5 > Elapsed Time: 0.53 s > > [root@ttraflonrh364 application]# mco package uninstall ksh -W > "hostname=ttraflocorh170" > > * [ ============================================================> ] 1 / 1 > > ttraflocorh170.global.trafigura.com version = absent > > ---- package agent summary ---- > Nodes: 1 / 1 > Versions: 1 * absent > Elapsed Time: 6.23 s > > [root@ttraflonrh364 application]# mco package status ksh -W > "hostname=ttraflocorh170" > > * [ ============================================================> ] 1 / 1 > > ttraflocorh170.global.trafigura.com version = absent > > ---- package agent summary ---- > Nodes: 1 / 1 > Versions: 1 * absent > Elapsed Time: 0.12 s > > [root@ttraflonrh364 application]# mco package install ksh -W > "hostname=ttraflocorh170" > > * [ ============================================================> ] 1 / 1 > > ttraflocorh170.global.trafigura.com version = ksh-20060214-1.7 > > ---- package agent summary ---- > Nodes: 1 / 1 > Versions: 1 * 20060214-1.7 > Elapsed Time: 11.25 s > > The version seems to change effectively. So yes, it does seem to work as > you said.That''s encouraging, means we could no doubt make a plan then!> Do you want em to open a new post in mcollective group?That would be great -- 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.
Guillem Liarte
2013-Jan-10 15:05 UTC
Re: [Puppet Users] mcollective package plugin rpm versions
On Thursday, 10 January 2013 13:01:33 UTC, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > From: "Guillem Liarte" <guillem...@googlemail.com <javascript:>> > > To: puppet...@googlegroups.com <javascript:> > > Sent: Thursday, January 10, 2013 12:57:02 PM > > Subject: Re: [Puppet Users] mcollective package plugin rpm versions > > > > Mr Pienaar, > > > > I would love to help adding it then. > > > > Where do I start? > > Basically the line in the agent: > > pkg = ::Puppet::Type.type(:package).new(:name => package).provider > > loads up the puppet type without providing any version hints, so what > you see there is equivalent to: > > package{"x": } > > and then we specifically call install/update/uninstall as needed. > > I suspect that if you just change that line to something like: > > pkg = ::Puppet::Type.type(:package).new(:name => package, :ensure => > "1.2.3").provider > > ie. add an ensure property with your desired version, it would do > the right thing, you could perhaps do a manual test to confirm > that? > > If it does work we just need to pass the version from the client to this > code > and I can point you in the right direction with that. > > Probably best to take this to the mcollective-users list on google > groups though >Mr. Pienaar, I have tested the following: Changes in the MC server, package.rb: pkg = ::Puppet::Type.type(:package). new(:name => package, :ensure => "20060214-1.7").provider #pkg = ::Puppet::Type.type(:package).new(:name => package).provider MC client output # mco package status ksh -W "hostname=host1" * [ ============================================================> ] 1 / 1 host1.domain.com version = ksh-20100621-5.el5 ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * 20100621-5.el5 Elapsed Time: 0.53 s ]# mco package uninstall ksh -W "hostname=host1" * [ ============================================================> ] 1 / 1 host1.domain.com version = absent ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * absent Elapsed Time: 6.23 s # mco package status ksh -W "hostname=host1" * [ ============================================================> ] 1 / 1 host1.domain.com version = absent ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * absent Elapsed Time: 0.12 s ]# mco package install ksh -W "hostname=host1" * [ ============================================================> ] 1 / 1 host1.domain.com version = ksh-20060214-1.7 ---- package agent summary ---- Nodes: 1 / 1 Versions: 1 * 20060214-1.7 Elapsed Time: 11.25 s The version seems to change effectively. So yes, it does seem to work as you said. Do you want em to open a new post in mcollective group? -- 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/-/9Yv257eM7psJ. 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.