Dick Davies
2013-Jun-21 11:15 UTC
[Puppet Users] trying to get a 32-bit JVM on a 64-bit platform with Package provider
i was hoping I could do this with the right ensure parameter on Package, but I''m hitting a wall. We''ve got 64-bit servers running tomcats on RHEL that need to be 32-bit (external vendor, JNI, funny story). 2.7 Puppetmaster and the yum repo hosts the Oracle JDKs. Currently we just push out what we want with: class jdk { package { "jdk": ensure => present } } which essentially does ''yum install jdk'' (some other bits too, but they''re not relevant). I was hoping to include something like class jdk::32bit inherits jdk { Package[''jdk''] { ensure => "1586" } } for these servers, but that seems to run the equivalent of : yum install jdk-i586 Is there a way to coerce the resource to install the right thing, or am I going to have to go with an Exec ? -- 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+unsubscribe@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.
Dick Davies
2013-Jun-21 11:31 UTC
[Puppet Users] Re: trying to get a 32-bit JVM on a 64-bit platform with Package provider
Ah cracked it! class jdk::32bit inherits jdk { Package[''jdk''] { ensure => undef } package { "jdk.i586": ensure => present } } On 21 June 2013 12:15, Dick Davies <rasputnik@hellooperator.net> wrote:> i was hoping I could do this with the right ensure parameter on Package, > but I''m hitting a wall. > > We''ve got 64-bit servers running tomcats on RHEL that need to be 32-bit > (external vendor, JNI, funny story). > > 2.7 Puppetmaster and the yum repo hosts the Oracle JDKs. > > > > Currently we just push out what we want with: > > class jdk { > package { "jdk": ensure => present } > } > > which essentially does ''yum install jdk'' (some other bits too, but > they''re not relevant). > > I was hoping to include something like > > class jdk::32bit inherits jdk { > > Package[''jdk''] { ensure => "1586" } > } > > for these servers, but that seems to run the equivalent of : yum > install jdk-i586 > > Is there a way to coerce the resource to install the right thing, or > am I going to have > to go with an Exec ?-- 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+unsubscribe@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.
Nikola Petrov
2013-Jun-24 14:33 UTC
Re: [Puppet Users] Re: trying to get a 32-bit JVM on a 64-bit platform with Package provider
Package[''jdk''] { name => ''jdk.i1586'' } will be a better option. Note that I wouldn''t use inheritance here but a simple parameter for the package name and move that somewhere else like hiera(although I see that you are using puppet2.7) Inheritance is almost always not the right answer. -- Nikola On Fri, Jun 21, 2013 at 12:31:23PM +0100, Dick Davies wrote:> Ah cracked it! > > class jdk::32bit inherits jdk { > > Package[''jdk''] { ensure => undef } > > package { "jdk.i586": ensure => present } > > } > > On 21 June 2013 12:15, Dick Davies <rasputnik@hellooperator.net> wrote: > > i was hoping I could do this with the right ensure parameter on Package, > > but I''m hitting a wall. > > > > We''ve got 64-bit servers running tomcats on RHEL that need to be 32-bit > > (external vendor, JNI, funny story). > > > > 2.7 Puppetmaster and the yum repo hosts the Oracle JDKs. > > > > > > > > Currently we just push out what we want with: > > > > class jdk { > > package { "jdk": ensure => present } > > } > > > > which essentially does ''yum install jdk'' (some other bits too, but > > they''re not relevant). > > > > I was hoping to include something like > > > > class jdk::32bit inherits jdk { > > > > Package[''jdk''] { ensure => "1586" } > > } > > > > for these servers, but that seems to run the equivalent of : yum > > install jdk-i586 > > > > Is there a way to coerce the resource to install the right thing, or > > am I going to have > > to go with an Exec ? > > -- > 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+unsubscribe@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+unsubscribe@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.
Dick Davies
2013-Jun-24 14:40 UTC
Re: [Puppet Users] Re: trying to get a 32-bit JVM on a 64-bit platform with Package provider
I know, I''m starting to migrate to parameterised classes or similar, need to unlearn some bad habits. Thanks! On 24 June 2013 15:33, Nikola Petrov <nikolavp@gmail.com> wrote:> Package[''jdk''] { > name => ''jdk.i1586'' > } > > will be a better option. Note that I wouldn''t use inheritance here but a > simple parameter for the package name and move that somewhere else like > hiera(although I see that you are using puppet2.7) > > Inheritance is almost always not the right answer. > > -- > Nikola > > On Fri, Jun 21, 2013 at 12:31:23PM +0100, Dick Davies wrote: >> Ah cracked it! >> >> class jdk::32bit inherits jdk { >> >> Package[''jdk''] { ensure => undef } >> >> package { "jdk.i586": ensure => present } >> >> } >> >> On 21 June 2013 12:15, Dick Davies <rasputnik@hellooperator.net> wrote: >> > i was hoping I could do this with the right ensure parameter on Package, >> > but I''m hitting a wall. >> > >> > We''ve got 64-bit servers running tomcats on RHEL that need to be 32-bit >> > (external vendor, JNI, funny story). >> > >> > 2.7 Puppetmaster and the yum repo hosts the Oracle JDKs. >> > >> > >> > >> > Currently we just push out what we want with: >> > >> > class jdk { >> > package { "jdk": ensure => present } >> > } >> > >> > which essentially does ''yum install jdk'' (some other bits too, but >> > they''re not relevant). >> > >> > I was hoping to include something like >> > >> > class jdk::32bit inherits jdk { >> > >> > Package[''jdk''] { ensure => "1586" } >> > } >> > >> > for these servers, but that seems to run the equivalent of : yum >> > install jdk-i586 >> > >> > Is there a way to coerce the resource to install the right thing, or >> > am I going to have >> > to go with an Exec ? >> >> -- >> 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+unsubscribe@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+unsubscribe@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+unsubscribe@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.