Hi I have a small number of gems I install on my puppet server, and manage to get them compiled and they pick up my non standard environment and install OK However, I need to send some options to the mysql gem to get it to compile. Hence I do it by hand, which is now biting, as well as not the right way to do it in puppet. I''m also not comfortable having to install a C compiler on servers I want to install gems on What are my options in compiling the gem in puppet? I have come up with: 1) Pre-set the environment so that when I run my puppet client from a wrapper script, I set my compile options there. I''m not too keen on this for one offs, but can live with it 2) Trying to pre-compile the gem and install it. Since I have no idea what I am doing, I saw this - https://github.com/frsyuki/gem-compile - which implies using my package provider (RPM, Solaris pkg) to install the gem, and not gem itself. Does anyone do this & have any tips for the hapless & clueless rubygem newbie? Thanks John -- 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.
On Wed, Jan 19, 2011 at 20:02, John Warburton <jwarburton@gmail.com> wrote:> I have a small number of gems I install on my puppet server, and manage to > get them compiled and they pick up my non standard environment and install > OKI can''t help with the gem provider, but my general advice is: [...]> 2) Trying to pre-compile the gem and install it. Since I have no idea what I > am doing, I saw this - https://github.com/frsyuki/gem-compile - which > implies using my package provider (RPM, Solaris pkg) to install the gem, and > not gem itself.This. Always do this. It gives you predictable, uniform behaviour, a uniform interface to specify dependencies between the gem and OS packages (well, not pkg, maybe ;), and a way to ensure that you have exactly the same binary code on every machine. It also means that you need the MySQL development headers, etc, on exactly *one* machine, not every single node on your infrastructure. (Which is a benefit you notice once you get asked to roll out two hundred more nodes on EC2 or something like that. ;) Regards, Daniel PS: I have "packaged" some gems by literally wrapping the standard OS packaging tools around running "gem install" with an option to write to the correct place. Worked fine for our needs, so it doesn''t require a lot of infrastructure, and you can fetch the thing with ''gem fetch'' for easy operation. -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@rimspace.net> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285 ♲ Made with 100 percent post-consumer electrons -- 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.
On 20 January 2011 15:08, Daniel Pittman <daniel@puppetlabs.com> wrote:> On Wed, Jan 19, 2011 at 20:02, John Warburton <jwarburton@gmail.com> > wrote: > > 2) Trying to pre-compile the gem and install it. Since I have no idea what > I > > This. Always do this. It gives you predictable, uniform behaviour, a > uniform interface to specify dependencies between the gem and OS > packages (well, not pkg, maybe ;), and a way to ensure that you have > exactly the same binary code on every machine. >Thanks Daniel - needed that level of definitiveness :-)> PS: I have "packaged" some gems by literally wrapping the standard OS > packaging tools around running "gem install" with an option to write > to the correct place. Worked fine for our needs, so it doesn''t > require a lot of infrastructure, and you can fetch the thing with ''gem > fetch'' for easy operation. >That gave me the push I needed, and now have my fave packager ( http://pkgbuild.sourceforge.net/) compiling the gem into a packaging directory for packaging as non root: gem install --no-ri --no-rdoc mysql --install-dir /some/where/users/can/write --source http://our/gem/repo Regards John -- 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.
Maybe using rvm makes your gem live easier. You can use different gemsets, per user. rvm.beginrescueend.com On 20.01.2011, at 05:02, John Warburton wrote:> Hi > > I have a small number of gems I install on my puppet server, and manage to get them compiled and they pick up my non standard environment and install OK-- 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.