Jo Rhett
2012-Jan-05 01:04 UTC
[Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
NOTE: this is a draft document, just because there are some things here that I''d really like to improve. Please let me know if you have a better way to do these things. There''s also a few issues with Puppet Dashboard that appear to be bugs that need either improved documentation or changes to their source RPM to fix. I''d love to see better ways to fix this. I am attempting to document how one can take an EL5 system (like CentOS 5.x) to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. There are many reasons for this: 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known memory problems. They have indicated that only Ruby 1.8.7 is supportable. 2. Dashboard requires Ruby 1.8.7 3. Foreman requires Ruby 1.8.7 Requirements: EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as documented nearly everywhere. If you use different paths, adjust as necessary for the remainder of the document. Step 1: Upgrade Ruby I have seen recommendations for Koran''s Ruby build, but it didn''t build on a fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk and JP patches. I found a much simpler spec file that appears to build properly on EL5 that uses a significantly higher patch level of Ruby, fixes the autoconf problems. It was trivial to review the few patches on this. wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm rpm -i ruby-1.8.7.352-5.el5.src.rpm rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec For any of the nodes, you need only put this RPM in your repository and have Puppet upgrade them. It just works ;-) For the passenger server, you''ll need to get the source RPM from stealth monkeys. You don''t need to change anything at all -- just build the SRC rpm and it will adjust everything to use Ruby 1.8.7. Very simple. wget http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm rpm -i rubygem-passenger-3.0.11-1.src.rpm rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec Step 2: Dashboard Requirements First you need to get the mysql drivers for Ruby. The EPEL version binds against ruby 1.8.5, but you can compile their source RPM on your ruby-1.8.7 system and it will work great. wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm rpm -i ruby-mysql-2.7.3-1.el5.src.rpm rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, but it doesn''t tell you this. Instead it just barfs weird error messages. They need to rewrite their Rakefile to explicitly define the minimum versions. Thankfully, upgrading gems is very easy. wget http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm rpm -i rubygems-1.8.10-1.el5.src.rpm rpmbuild -ba ~/rpmbuild/SPECS/rubygems.spec Unfortunately, I never found a simple way to build RPMs for the three gems you need. I''d like to fix this next part of the HOWTO in the near future. For now, the easiest way to get the minimum requirements installed is to run the following commands. gem install rake gem install rdoc gem install rack -v 1.1.2 You''ll observe that we installed a very specific version of Rack. The reason for this is that Puppet Dashboard includes rack 1.1.2 within the package, but the default Rakefile doesn''t load it -- so it wants you to have Rack in your normal gems library too. However if the version doesn''t match the same version included in the frozen vendor directory, it complains about that and barfs. I consider this a bug in the dashboard packaging: https://projects.puppetlabs.com/issues/11669 However, if you install 1.1.2 and nothing newer, it will work just fine. Step 3: Install Dashboard For unknown reasons to me, the source RPM for dashboard can''t be extracted on EL5 unless you pass --nomd5 --nosignature. The good news is that the source RPM for EL6 compiles without any changes on EL5. wget http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec That''s it! You now have puppet dashboard installed with all dependancies. You can then follow the standard documentation from puppet labs at http://docs.puppetlabs.com/guides/installing_dashboard.html#installation Skip the first two #1 bullets and the first #2 bullet and start with the second #2. One problem I found was that when I tried to run it under Passenger/Apache, I was told that it couldn''t read the config.ru file. I had to do the following to fix this: cd /usr/share/puppet-dashboard ln ./vendor/rails/railties/dispatches/config.ru config.ru This is already tracked in https://projects.puppetlabs.com/users/3472 This is working great for me right now. Let me know if you have any ideas for streamlining this process. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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.
Brian Gallew
2012-Jan-05 02:55 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Very nice write-up, Jo. Thanks. On Wed, Jan 4, 2012 at 5:04 PM, Jo Rhett <jrhett@netconsonance.com> wrote:> NOTE: this is a draft document, just because there are some things here > that I''d really like to improve. Please let me know if you have a better > way to do these things. There''s also a few issues with Puppet Dashboard > that appear to be bugs that need either improved documentation or changes > to their source RPM to fix. I''d love to see better ways to fix this. > > I am attempting to document how one can take an EL5 system (like CentOS > 5.x) to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. > There are many reasons for this: > > 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known memory > problems. They have indicated that only Ruby 1.8.7 is supportable. > > 2. Dashboard requires Ruby 1.8.7 > > 3. Foreman requires Ruby 1.8.7 > > Requirements: > EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as > documented nearly everywhere. If you use different paths, adjust as > necessary for the remainder of the document. > > Step 1: Upgrade Ruby > I have seen recommendations for Koran''s Ruby build, but it didn''t build on > a fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk > and JP patches. I found a much simpler spec file that appears to build > properly on EL5 that uses a significantly higher patch level of Ruby, fixes > the autoconf problems. It was trivial to review the few patches on this. > > wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm > rpm -i ruby-1.8.7.352-5.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > For any of the nodes, you need only put this RPM in your repository and > have Puppet upgrade them. It just works ;-) > > For the passenger server, you''ll need to get the source RPM from stealth > monkeys. You don''t need to change anything at all -- just build the SRC > rpm and it will adjust everything to use Ruby 1.8.7. Very simple. > > wget > http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm > rpm -i rubygem-passenger-3.0.11-1.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec > > Step 2: Dashboard Requirements > > First you need to get the mysql drivers for Ruby. The EPEL version binds > against ruby 1.8.5, but you can compile their source RPM on your ruby-1.8.7 > system and it will work great. > > wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm > rpm -i ruby-mysql-2.7.3-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec > > Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, > but it doesn''t tell you this. Instead it just barfs weird error messages. > They need to rewrite their Rakefile to explicitly define the minimum > versions. > > Thankfully, upgrading gems is very easy. > > wget > http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm > rpm -i rubygems-1.8.10-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/rubygems.spec > > Unfortunately, I never found a simple way to build RPMs for the three gems > you need. I''d like to fix this next part of the HOWTO in the near future. > For now, the easiest way to get the minimum requirements installed is to > run the following commands. > gem install rake > gem install rdoc > gem install rack -v 1.1.2 > > You''ll observe that we installed a very specific version of Rack. The > reason for this is that Puppet Dashboard includes rack 1.1.2 within the > package, but the default Rakefile doesn''t load it -- so it wants you to > have Rack in your normal gems library too. However if the version doesn''t > match the same version included in the frozen vendor directory, it > complains about that and barfs. I consider this a bug in the dashboard > packaging: https://projects.puppetlabs.com/issues/11669 > > However, if you install 1.1.2 and nothing newer, it will work just fine. > > Step 3: Install Dashboard > > For unknown reasons to me, the source RPM for dashboard can''t be extracted > on EL5 unless you pass --nomd5 --nosignature. The good news is that the > source RPM for EL6 compiles without any changes on EL5. > > wget > http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm > rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm > rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec > > That''s it! You now have puppet dashboard installed with all dependancies. > You can then follow the standard documentation from puppet labs at > http://docs.puppetlabs.com/guides/installing_dashboard.html#installation > > Skip the first two #1 bullets and the first #2 bullet and start with the > second #2. > > One problem I found was that when I tried to run it under > Passenger/Apache, I was told that it couldn''t read the config.ru file. I > had to do the following to fix this: > cd /usr/share/puppet-dashboard > ln ./vendor/rails/railties/dispatches/config.ru config.ru > > This is already tracked in https://projects.puppetlabs.com/users/3472 > > This is working great for me right now. Let me know if you have any ideas > for streamlining this process. > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > > -- > 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. >-- 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.
Ohad Levy
2012-Jan-05 07:21 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
On Thu, Jan 5, 2012 at 3:04 AM, Jo Rhett <jrhett@netconsonance.com> wrote: First many thanks for your efforts!> 3. Foreman requires Ruby 1.8.7 >Just wanted to correct that, the upcoming version would, but we still maintain a supported version 0.4.x that works on RHEL5 with no issues. Thanks, Ohad -- 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.
Michael Stahnke
2012-Jan-06 00:53 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Jo, thanks for this. I do most of the packaging for Puppet Labs (and quite a bit of the ruby stuff in EPEL). I have a few comments in line. I''d love to have this on our wiki too, so feel free to post there as well. One more thing to keep in mind is that EL5 only has about 2 years of life left on it. It launched in 2007. On Wed, Jan 4, 2012 at 5:04 PM, Jo Rhett <jrhett@netconsonance.com> wrote:> NOTE: this is a draft document, just because there are some things here that > I''d really like to improve. Please let me know if you have a better way to > do these things. There''s also a few issues with Puppet Dashboard that > appear to be bugs that need either improved documentation or changes to > their source RPM to fix. I''d love to see better ways to fix this. > > I am attempting to document how one can take an EL5 system (like CentOS 5.x) > to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. There > are many reasons for this: > > 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known memory > problems. They have indicated that only Ruby 1.8.7 is supportable. > > 2. Dashboard requires Ruby 1.8.7 > > 3. Foreman requires Ruby 1.8.7 > > Requirements: > EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as > documented nearly everywhere. If you use different paths, adjust as > necessary for the remainder of the document.You can install rpmdev-tools and run rpmdev-setuptree and it will setup a ~/rpmbuild directory and proper building macros for your system, etc.> > Step 1: Upgrade Ruby > I have seen recommendations for Koran''s Ruby build, but it didn''t build on a > fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk and > JP patches. I found a much simpler spec file that appears to build properly > on EL5 that uses a significantly higher patch level of Ruby, fixes the > autoconf problems. It was trivial to review the few patches on this.The http://centos.karan.org/el5/ruby187/ are basically a drop-in replacement for how the EL5 ruby stack worked, just upgraded to 1.8.7. I imagine the trouble you had building is due to the method you used building the packages. RPMs built by EPEL/Centos/RH/Puppetlabs are built using mock. (http://fedoraproject.org/wiki/Projects/Mock). Mock assumes a group of packages is installed prior to building. That list of packages is install bash bzip2 coreutils cpio curl cvs diffutils fedpkg findutils gawk gcc gcc-c++ gnupg grep gzip info make patch redhat-release redhat-release-server redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which xz If you have those installed, they should build cleanly.> > wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm > rpm -i ruby-1.8.7.352-5.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby.specAlways nice to have more options for packages. I do kind of get bothered that I get ruby-tcl bindings all the time :)> > For any of the nodes, you need only put this RPM in your repository and have > Puppet upgrade them. It just works ;-) > > For the passenger server, you''ll need to get the source RPM from stealth > monkeys. You don''t need to change anything at all -- just build the SRC rpm > and it will adjust everything to use Ruby 1.8.7. Very simple. > > wget > http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm > rpm -i rubygem-passenger-3.0.11-1.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec > > Step 2: Dashboard Requirements > > First you need to get the mysql drivers for Ruby. The EPEL version binds > against ruby 1.8.5, but you can compile their source RPM on your ruby-1.8.7 > system and it will work great.This might be able to be fixed in EPEL. Since it dymaically links against ruby, I would think that having 1.8.5 or 1.8.7 would work. Could you file a bug at bugzilla.redhat.com on that?> > wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm > rpm -i ruby-mysql-2.7.3-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec > > Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, > but it doesn''t tell you this. Instead it just barfs weird error messages. > They need to rewrite their Rakefile to explicitly define the minimum > versions.Really? We ship rubygems 1.3.7 in Puppet Enterprise and I haven''t seen any errors. There are a few deprecation warnings though I believe. This might be a case of exact versions of several gems all playing together properly. Our PE preview branch (to be released later this month) uses: Gems 1.3.7 Rake 0.8.7 Rack 1.1.3 Dashboard 1.2.4> > Thankfully, upgrading gems is very easy. > > wget http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm > rpm -i rubygems-1.8.10-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/rubygems.specNote this can cause issues. Rubygems has a habit of completely breaking things that used to work. *shakes fist*> > Unfortunately, I never found a simple way to build RPMs for the three gems > you need. I''d like to fix this next part of the HOWTO in the near future.gem2rpm is fairly good as a starting point. Package name is oddly rubygem-gem2rpm in EPEL.> For now, the easiest way to get the minimum requirements installed is to > run the following commands. > gem install rakeYou should be able yum install rubygem-rake from epel. (unless the rubygems version change prevents that)> gem install rdoc > gem install rack -v 1.1.2 > > You''ll observe that we installed a very specific version of Rack. The > reason for this is that Puppet Dashboard includes rack 1.1.2 within the > package, but the default Rakefile doesn''t load it -- so it wants you to have > Rack in your normal gems library too. However if the version doesn''t match > the same version included in the frozen vendor directory, it complains about > that and barfs. I consider this a bug in the dashboard > packaging: https://projects.puppetlabs.com/issues/11669I''ll have a look at that. Yeah, that''s our fault and probably masked by versions of rake shipped with EL6. (0.8.7 I think)> > However, if you install 1.1.2 and nothing newer, it will work just fine. > > Step 3: Install Dashboard > > For unknown reasons to me, the source RPM for dashboard can''t be extracted > on EL5 unless you pass --nomd5 --nosignature. The good news is that the > source RPM for EL6 compiles without any changes on EL5.This is because the way RPM works changed between EL5 and EL6. In EL5 RPMS were built using md5 as the digest, they use sha (256 I think) in EL6. There''s not much I can do about that. If I build the RPM for EL5, it will throw warnings on EL6; since we target EL6 that''s what we do.> > wget > http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm > rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm > rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec > > That''s it! You now have puppet dashboard installed with all dependancies. > You can then follow the standard documentation from puppet labs at > http://docs.puppetlabs.com/guides/installing_dashboard.html#installation > > Skip the first two #1 bullets and the first #2 bullet and start with the > second #2. > > One problem I found was that when I tried to run it under Passenger/Apache, > I was told that it couldn''t read the config.ru file. I had to do the > following to fix this: > cd /usr/share/puppet-dashboard > ln ./vendor/rails/railties/dispatches/config.ru config.ru > > This is already tracked in https://projects.puppetlabs.com/users/3472That link might be wrong.> > This is working great for me right now. Let me know if you have any ideas > for streamlining this process. > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > > -- > 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.-- 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.
Jo Rhett
2012-Jan-06 04:14 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
On Jan 5, 2012, at 4:53 PM, Michael Stahnke wrote:> You can install rpmdev-tools and run rpmdev-setuptree and it willYes of course but I wasn''t documenting that here.> The http://centos.karan.org/el5/ruby187/ are basically a drop-in > replacement for how the EL5 ruby stack worked, just upgraded to 1.8.7.No, it combines in a bunch of other stuff *AND* it will not compile on the stock EL5 system.> Mock assumes a group of packages is installed prior to building. That > list of packages is > … > If you have those installed, they should build cleanly.Nope. karan''s build requires a newer version of autoconf than is available in CentOS or EPEL. The rpm I quoted has patches so that it will work with the autoconf included in EL5.>> wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm >> rpm -i ruby-mysql-2.7.3-1.el5.src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec >> >> Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, >> but it doesn''t tell you this. Instead it just barfs weird error messages. >> They need to rewrite their Rakefile to explicitly define the minimum >> versions. > > Really? We ship rubygems 1.3.7 in Puppet Enterprise and I haven''tYep, but you use macros only supported since 1.3.6. EL5 has 1.3.1 from EPEL.> You should be able yum install rubygem-rake from epel. (unless the > rubygems version change prevents that)That ruby gem requires ruby-1.8.5. It only worked for me after I installed 0.9.2 straight from gems. FYI, I''ve found some other issues: * puppet-dashboard-workers init script uses RH6-specific functions: rhstatus_q fails on EL5. I had to write a manifest to overwrite that file with something that doesn''t use that function. You could write that to be agnostic to the version (or provide an EL5-specific RPM) * the monitors run, but the workers die. They create pid files and then exit. I can''t figure out why. Right now I have to run them using the "env…" command in the bootstrapping.html documentation. I''ll resume chasing down that issue on Monday. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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.
Stefan Heijmans
2012-Jan-06 09:11 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Op vrijdag 6 januari 2012 01:53:31 UTC+1 schreef Michael Stanhke het volgende:> > > One more thing to keep in mind is that EL5 only has about 2 years of > life left on it. It launched in 2007. >That''s only for RHEL5 production phase 3 (31 March 2014), End of Extended Life Cycle is on 31 March 2017. -- 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/-/fzMr6PljNOgJ. 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.
Michael Stahnke
2012-Jan-06 16:51 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
On Thu, Jan 5, 2012 at 8:14 PM, Jo Rhett <jrhett@netconsonance.com> wrote:> On Jan 5, 2012, at 4:53 PM, Michael Stahnke wrote: > > You can install rpmdev-tools and run rpmdev-setuptree and it will > > > Yes of course but I wasn''t documenting that here. > > The http://centos.karan.org/el5/ruby187/ are basically a drop-in > replacement for how the EL5 ruby stack worked, just upgraded to 1.8.7. > > > No, it combines in a bunch of other stuff *AND* it will not compile on the > stock EL5 system. > > Mock assumes a group of packages is installed prior to building. That > list of packages is > … > > If you have those installed, they should build cleanly. > > > Nope. karan''s build requires a newer version of autoconf than is available > in CentOS or EPEL. The rpm I quoted has patches so that it will work with > the autoconf included in EL5. > > wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm > > rpm -i ruby-mysql-2.7.3-1.el5.src.rpm > > rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec > > > Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, > > but it doesn''t tell you this. Instead it just barfs weird error messages. > > They need to rewrite their Rakefile to explicitly define the minimum > > versions. > > > Really? We ship rubygems 1.3.7 in Puppet Enterprise and I haven''t > > > Yep, but you use macros only supported since 1.3.6. EL5 has 1.3.1 from > EPEL. > > You should be able yum install rubygem-rake from epel. (unless the > rubygems version change prevents that) > > > That ruby gem requires ruby-1.8.5. It only worked for me after I installed > 0.9.2 straight from gems. > > FYI, I''ve found some other issues: > > * puppet-dashboard-workers init script uses RH6-specific functions: > rhstatus_q fails on EL5. I had to write a manifest to overwrite that file > with something that doesn''t use that function. You could write that to be > agnostic to the version (or provide an EL5-specific RPM)This is not surprising. I''ll gladly take patches on this.> > * the monitors run, but the workers die. They create pid files and then > exit. I can''t figure out why. Right now I have to run them using the "env…" > command in the bootstrapping.html documentation. I''ll resume chasing down > that issue on Monday. > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > > -- > 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.-- 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.
Dan White
2012-Apr-17 01:51 UTC
[Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
Old thread reference: http://www.mail-archive.com/puppet-users@googlegroups.com/msg27199.html I am trying to build Ruby 1.8.7 on a RHEL 5 system following the instructions in that thread and I have a few questions as I am a n00b to RPM building: On Jan 4, 2012, at 8:04 PM, Jo Rhett wrote:> wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm > rpm -i ruby-1.8.7.352-5.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > For any of the nodes, you need only put this RPM in your repository and have Puppet upgrade them. It just works ;-)When I ran the rpmbuild command, I got no RPM''s. I got a bunch of error complaining about "rpaths", and in the output was a suggestion to prepend an environment setting to the command -- like this: QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec When I ran this, the previous errors were now warnings, and I got a set of RPM''s. Is this The Way It Works ? Is it possible to eliminate the errors/warnings ? Would a link to a PatchBin of the build output help ? Thanks in advance. -- 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.
Jo Rhett
2012-Apr-18 22:08 UTC
Re: [Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
On Apr 16, 2012, at 6:51 PM, Dan White wrote:> I got a bunch of error complaining about "rpaths", and in the output was a suggestion to prepend an environment setting to the command -- like this: > > QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > When I ran this, the previous errors were now warnings, and I got a set of RPM''s. > > Is this The Way It Works ? > > Is it possible to eliminate the errors/warnings ? > > Would a link to a PatchBin of the build output help ?Yes, this is the way it works. Read up on what those particular rpath errors mean, and I think you''ll come to understand why they don''t matter. But it''s best to read for yourself ;-) FYI, go edit that spec file and put the latest ruby patch release in there. There''s some important fixes in the latest ruby patches, and the spec file and patches work just great with the latest ruby release. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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.
Dan White
2012-Apr-19 01:27 UTC
Re: [Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
On Apr 18, 2012, at 6:08 PM, Jo Rhett wrote:> On Apr 16, 2012, at 6:51 PM, Dan White wrote: >> I got a bunch of error complaining about "rpaths", and in the output was a suggestion to prepend an environment setting to the command -- like this: >> >> QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec >> >> When I ran this, the previous errors were now warnings, and I got a set of RPM''s. >> >> Is this The Way It Works ? >> >> Is it possible to eliminate the errors/warnings ? >> >> Would a link to a PatchBin of the build output help ? > > Yes, this is the way it works. Read up on what those particular rpath errors mean, and I think you''ll come to understand why they don''t matter. But it''s best to read for yourself ;-) > > FYI, go edit that spec file and put the latest ruby patch release in there. There''s some important fixes in the latest ruby patches, and the spec file and patches work just great with the latest ruby release.Might you be able to provide a few links or pointers to documentation and patches ? -- 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.
Jo Rhett
2012-Apr-19 17:48 UTC
Re: [Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
On Apr 18, 2012, at 6:27 PM, Dan White wrote:> On Apr 18, 2012, at 6:08 PM, Jo Rhett wrote: >> On Apr 16, 2012, at 6:51 PM, Dan White wrote: >>> I got a bunch of error complaining about "rpaths", and in the output was a suggestion to prepend an environment setting to the command -- like this: >>> >>> QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec >>> >>> When I ran this, the previous errors were now warnings, and I got a set of RPM''s. >>> >>> Is this The Way It Works ? >>> >>> Is it possible to eliminate the errors/warnings ? >>> >>> Would a link to a PatchBin of the build output help ? >> >> Yes, this is the way it works. Read up on what those particular rpath errors mean, and I think you''ll come to understand why they don''t matter. But it''s best to read for yourself ;-) >> >> FYI, go edit that spec file and put the latest ruby patch release in there. There''s some important fixes in the latest ruby patches, and the spec file and patches work just great with the latest ruby release. > > Might you be able to provide a few links or pointers to documentation and patches ?I''m not sure what you mean. For ruby, go to ruby.org and find the latest patchlevel for 1.8.7 and put that number at the top of the spec file. For rpath, try http://www.lmgtfy.com/ ;-) -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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.
Dan White
2012-Apr-19 19:54 UTC
Re: [Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
----- Jo Rhett <jrhett@netconsonance.com> wrote:> For ruby, go to ruby.org and find the latest patchlevel for 1.8.7 and put that number at the top of the spec file. >FYI: ruby.org is a parked domain. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- 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.
Brian Gupta
2012-Apr-23 18:53 UTC
Re: [Puppet Users] Trying to build Ruby 1.8.7 on a RHEL5 systems
http://www.ruby-lang.org/ I think is what he meant. On Thu, Apr 19, 2012 at 3:54 PM, Dan White <ygor@comcast.net> wrote:> ----- Jo Rhett <jrhett@netconsonance.com> wrote: >> For ruby, go to ruby.org and find the latest patchlevel for 1.8.7 and put that number at the top of the spec file. >> > > FYI: ruby.org is a parked domain. > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > 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. >-- 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.
Rost
2012-Jul-26 16:02 UTC
[Puppet Users] Re: Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Thanks a lot. All this works fine for me. Le jeudi 5 janvier 2012 02:04:34 UTC+1, Jo a écrit :> > NOTE: this is a draft document, just because there are some things here > that I''d really like to improve. Please let me know if you have a better > way to do these things. There''s also a few issues with Puppet Dashboard > that appear to be bugs that need either improved documentation or changes > to their source RPM to fix. I''d love to see better ways to fix this. > > I am attempting to document how one can take an EL5 system (like CentOS > 5.x) to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. > There are many reasons for this: > > 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known memory > problems. They have indicated that only Ruby 1.8.7 is supportable. > > 2. Dashboard requires Ruby 1.8.7 > > 3. Foreman requires Ruby 1.8.7 > > Requirements: > EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as > documented nearly everywhere. If you use different paths, adjust as > necessary for the remainder of the document. > > Step 1: Upgrade Ruby > I have seen recommendations for Koran''s Ruby build, but it didn''t build on > a fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk > and JP patches. I found a much simpler spec file that appears to build > properly on EL5 that uses a significantly higher patch level of Ruby, fixes > the autoconf problems. It was trivial to review the few patches on this. > > wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm > rpm -i ruby-1.8.7.352-5.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > For any of the nodes, you need only put this RPM in your repository and > have Puppet upgrade them. It just works ;-) > > For the passenger server, you''ll need to get the source RPM from stealth > monkeys. You don''t need to change anything at all -- just build the SRC > rpm and it will adjust everything to use Ruby 1.8.7. Very simple. > > wget > http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm > rpm -i rubygem-passenger-3.0.11-1.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec > > Step 2: Dashboard Requirements > > First you need to get the mysql drivers for Ruby. The EPEL version binds > against ruby 1.8.5, but you can compile their source RPM on your ruby-1.8.7 > system and it will work great. > > wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm > rpm -i ruby-mysql-2.7.3-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec > > Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, > but it doesn''t tell you this. Instead it just barfs weird error messages. > They need to rewrite their Rakefile to explicitly define the minimum > versions. > > Thankfully, upgrading gems is very easy. > > wget > http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm > rpm -i rubygems-1.8.10-1.el5.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/rubygems.spec > > Unfortunately, I never found a simple way to build RPMs for the three gems > you need. I''d like to fix this next part of the HOWTO in the near future. > For now, the easiest way to get the minimum requirements installed is to > run the following commands. > gem install rake > gem install rdoc > gem install rack -v 1.1.2 > > You''ll observe that we installed a very specific version of Rack. The > reason for this is that Puppet Dashboard includes rack 1.1.2 within the > package, but the default Rakefile doesn''t load it -- so it wants you to > have Rack in your normal gems library too. However if the version doesn''t > match the same version included in the frozen vendor directory, it > complains about that and barfs. I consider this a bug in the dashboard > packaging: https://projects.puppetlabs.com/issues/11669 > > However, if you install 1.1.2 and nothing newer, it will work just fine. > > Step 3: Install Dashboard > > For unknown reasons to me, the source RPM for dashboard can''t be extracted > on EL5 unless you pass --nomd5 --nosignature. The good news is that the > source RPM for EL6 compiles without any changes on EL5. > > wget > http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm > rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm > rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec > > That''s it! You now have puppet dashboard installed with all dependancies. > You can then follow the standard documentation from puppet labs at > http://docs.puppetlabs.com/guides/installing_dashboard.html#installation > > Skip the first two #1 bullets and the first #2 bullet and start with the > second #2. > > One problem I found was that when I tried to run it under > Passenger/Apache, I was told that it couldn''t read the config.ru file. I > had to do the following to fix this: > cd /usr/share/puppet-dashboard > ln ./vendor/rails/railties/dispatches/config.ru config.ru > > This is already tracked in https://projects.puppetlabs.com/users/3472 > > This is working great for me right now. Let me know if you have any ideas > for streamlining this process. > > -- > Jo Rhett > Net Consonance : consonant endings by net philanthropy, open source and > other randomness > >-- 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/-/g-ZSRy9whlgJ. 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.
devzero2000
2012-Jul-26 18:40 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Sorry for the top posting. If you look carefully you should find that this year red hat extend the 5 and 6 lifetime to 10 year, without extended maintenance support. But i agree that rhel 5 is not the best plattform for running foreman or dashboard. Regards 2012/1/6, Michael Stahnke <stahnma@puppetlabs.com>:> Jo, thanks for this. I do most of the packaging for Puppet Labs (and > quite a bit of the ruby stuff in EPEL). I have a few comments in > line. I''d love to have this on our wiki too, so feel free to post > there as well. > > One more thing to keep in mind is that EL5 only has about 2 years of > life left on it. It launched in 2007. > > > On Wed, Jan 4, 2012 at 5:04 PM, Jo Rhett <jrhett@netconsonance.com> wrote: >> NOTE: this is a draft document, just because there are some things here >> that >> I''d really like to improve. Please let me know if you have a better way >> to >> do these things. There''s also a few issues with Puppet Dashboard that >> appear to be bugs that need either improved documentation or changes to >> their source RPM to fix. I''d love to see better ways to fix this. >> >> I am attempting to document how one can take an EL5 system (like CentOS >> 5.x) >> to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. >> There >> are many reasons for this: >> >> 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known memory >> problems. They have indicated that only Ruby 1.8.7 is supportable. >> >> 2. Dashboard requires Ruby 1.8.7 >> >> 3. Foreman requires Ruby 1.8.7 >> >> Requirements: >> EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as >> documented nearly everywhere. If you use different paths, adjust as >> necessary for the remainder of the document. > > You can install rpmdev-tools and run rpmdev-setuptree and it will > setup a ~/rpmbuild directory and proper building macros for your > system, etc. > >> >> Step 1: Upgrade Ruby >> I have seen recommendations for Koran''s Ruby build, but it didn''t build on >> a >> fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk >> and >> JP patches. I found a much simpler spec file that appears to build >> properly >> on EL5 that uses a significantly higher patch level of Ruby, fixes the >> autoconf problems. It was trivial to review the few patches on this. > > The http://centos.karan.org/el5/ruby187/ are basically a drop-in > replacement for how the EL5 ruby stack worked, just upgraded to 1.8.7. > I imagine the trouble you had building is due to the method you used > building the packages. RPMs built by EPEL/Centos/RH/Puppetlabs are > built using mock. (http://fedoraproject.org/wiki/Projects/Mock). > Mock assumes a group of packages is installed prior to building. That > list of packages is > > install bash bzip2 coreutils cpio curl cvs diffutils fedpkg findutils > gawk gcc gcc-c++ gnupg grep gzip info make patch redhat-release > redhat-release-server redhat-rpm-config rpm-build sed shadow-utils tar > unzip util-linux-ng which xz > > If you have those installed, they should build cleanly. >> >> wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm >> rpm -i ruby-1.8.7.352-5.el5.src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > Always nice to have more options for packages. I do kind of get > bothered that I get ruby-tcl bindings all the time :) >> >> For any of the nodes, you need only put this RPM in your repository and >> have >> Puppet upgrade them. It just works ;-) >> >> For the passenger server, you''ll need to get the source RPM from stealth >> monkeys. You don''t need to change anything at all -- just build the SRC >> rpm >> and it will adjust everything to use Ruby 1.8.7. Very simple. >> >> wget >> http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm >> rpm -i rubygem-passenger-3.0.11-1.src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec >> >> Step 2: Dashboard Requirements >> >> First you need to get the mysql drivers for Ruby. The EPEL version binds >> against ruby 1.8.5, but you can compile their source RPM on your >> ruby-1.8.7 >> system and it will work great. > > This might be able to be fixed in EPEL. Since it dymaically links > against ruby, I would think that having 1.8.5 or 1.8.7 would work. > Could you file a bug at bugzilla.redhat.com on that? >> >> wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm >> rpm -i ruby-mysql-2.7.3-1.el5.src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec >> >> Next thing is that Puppet Dashboard requires a newer version of Ruby Gems, >> but it doesn''t tell you this. Instead it just barfs weird error messages. >> They need to rewrite their Rakefile to explicitly define the minimum >> versions. > > Really? We ship rubygems 1.3.7 in Puppet Enterprise and I haven''t > seen any errors. There are a few deprecation warnings though I > believe. This might be a case of exact versions of several gems all > playing together properly. Our PE preview branch (to be released > later this month) uses: > Gems 1.3.7 > Rake 0.8.7 > Rack 1.1.3 > Dashboard 1.2.4 > >> >> Thankfully, upgrading gems is very easy. >> >> wget >> http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm >> rpm -i rubygems-1.8.10-1.el5.src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/rubygems.spec > > Note this can cause issues. Rubygems has a habit of completely > breaking things that used to work. *shakes fist* >> >> Unfortunately, I never found a simple way to build RPMs for the three gems >> you need. I''d like to fix this next part of the HOWTO in the near future. > > gem2rpm is fairly good as a starting point. > > Package name is oddly rubygem-gem2rpm in EPEL. > >> For now, the easiest way to get the minimum requirements installed is to >> run the following commands. >> gem install rake > > You should be able yum install rubygem-rake from epel. (unless the > rubygems version change prevents that) >> gem install rdoc >> gem install rack -v 1.1.2 >> >> You''ll observe that we installed a very specific version of Rack. The >> reason for this is that Puppet Dashboard includes rack 1.1.2 within the >> package, but the default Rakefile doesn''t load it -- so it wants you to >> have >> Rack in your normal gems library too. However if the version doesn''t >> match >> the same version included in the frozen vendor directory, it complains >> about >> that and barfs. I consider this a bug in the dashboard >> packaging: https://projects.puppetlabs.com/issues/11669 > > I''ll have a look at that. Yeah, that''s our fault and probably masked > by versions of rake shipped with EL6. (0.8.7 I think) >> >> However, if you install 1.1.2 and nothing newer, it will work just fine. >> >> Step 3: Install Dashboard >> >> For unknown reasons to me, the source RPM for dashboard can''t be extracted >> on EL5 unless you pass --nomd5 --nosignature. The good news is that the >> source RPM for EL6 compiles without any changes on EL5. > > This is because the way RPM works changed between EL5 and EL6. In EL5 > RPMS were built using md5 as the digest, they use sha (256 I think) in > EL6. There''s not much I can do about that. If I build the RPM for > EL5, it will throw warnings on EL6; since we target EL6 that''s what we > do. > >> >> wget >> http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm >> rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm >> rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec >> >> That''s it! You now have puppet dashboard installed with all dependancies. >> You can then follow the standard documentation from puppet labs at >> http://docs.puppetlabs.com/guides/installing_dashboard.html#installation >> >> Skip the first two #1 bullets and the first #2 bullet and start with the >> second #2. >> >> One problem I found was that when I tried to run it under >> Passenger/Apache, >> I was told that it couldn''t read the config.ru file. I had to do the >> following to fix this: >> cd /usr/share/puppet-dashboard >> ln ./vendor/rails/railties/dispatches/config.ru config.ru >> >> This is already tracked in https://projects.puppetlabs.com/users/3472 > That link might be wrong. >> >> This is working great for me right now. Let me know if you have any ideas >> for streamlining this process. >> >> -- >> Jo Rhett >> Net Consonance : consonant endings by net philanthropy, open source and >> other randomness >> >> -- >> 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. > > -- > 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. > >-- Inviato dal mio dispositivo mobile -- 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.
Ohad Levy
2012-Jul-26 18:51 UTC
Re: [Puppet Users] Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
On Thu, Jul 26, 2012 at 9:40 PM, devzero2000 <pinto.elia@gmail.com> wrote:> Sorry for the top posting. > > If you look carefully you should find that this year red hat extend > the 5 and 6 lifetime to 10 year, without extended maintenance support. > But i agree that rhel 5 is not the best plattform for running foreman > or dashboard. > > I agree its probably not, but FYI we added a EL5 repo to foreman 1.0 thatincludes ruby as well, see -> http://theforeman.org/projects/foreman/wiki/RPM''s_distribution_based_installationand http://yum.theforeman.org/releases/1.0/el5/ Ohad> Regards > > 2012/1/6, Michael Stahnke <stahnma@puppetlabs.com>: > > Jo, thanks for this. I do most of the packaging for Puppet Labs (and > > quite a bit of the ruby stuff in EPEL). I have a few comments in > > line. I''d love to have this on our wiki too, so feel free to post > > there as well. > > > > One more thing to keep in mind is that EL5 only has about 2 years of > > life left on it. It launched in 2007. > > > > > > On Wed, Jan 4, 2012 at 5:04 PM, Jo Rhett <jrhett@netconsonance.com> > wrote: > >> NOTE: this is a draft document, just because there are some things here > >> that > >> I''d really like to improve. Please let me know if you have a better way > >> to > >> do these things. There''s also a few issues with Puppet Dashboard that > >> appear to be bugs that need either improved documentation or changes to > >> their source RPM to fix. I''d love to see better ways to fix this. > >> > >> I am attempting to document how one can take an EL5 system (like CentOS > >> 5.x) > >> to Ruby 1.8.7 and meets the minimum requirements for Puppet Dashboard. > >> There > >> are many reasons for this: > >> > >> 1. PuppetLabs blames many server-side issues on Ruby 1.8.5''s known > memory > >> problems. They have indicated that only Ruby 1.8.7 is supportable. > >> > >> 2. Dashboard requires Ruby 1.8.7 > >> > >> 3. Foreman requires Ruby 1.8.7 > >> > >> Requirements: > >> EL5 system with rpmbuild utilities and ~/rpmbuild structure set up as > >> documented nearly everywhere. If you use different paths, adjust as > >> necessary for the remainder of the document. > > > > You can install rpmdev-tools and run rpmdev-setuptree and it will > > setup a ~/rpmbuild directory and proper building macros for your > > system, etc. > > > >> > >> Step 1: Upgrade Ruby > >> I have seen recommendations for Koran''s Ruby build, but it didn''t build > on > >> a > >> fairly stock EL5 system, and included a bunch of unrelated-to-puppet Tk > >> and > >> JP patches. I found a much simpler spec file that appears to build > >> properly > >> on EL5 that uses a significantly higher patch level of Ruby, fixes the > >> autoconf problems. It was trivial to review the few patches on this. > > > > The http://centos.karan.org/el5/ruby187/ are basically a drop-in > > replacement for how the EL5 ruby stack worked, just upgraded to 1.8.7. > > I imagine the trouble you had building is due to the method you used > > building the packages. RPMs built by EPEL/Centos/RH/Puppetlabs are > > built using mock. (http://fedoraproject.org/wiki/Projects/Mock). > > Mock assumes a group of packages is installed prior to building. That > > list of packages is > > > > install bash bzip2 coreutils cpio curl cvs diffutils fedpkg findutils > > gawk gcc gcc-c++ gnupg grep gzip info make patch redhat-release > > redhat-release-server redhat-rpm-config rpm-build sed shadow-utils tar > > unzip util-linux-ng which xz > > > > If you have those installed, they should build cleanly. > >> > >> wget > http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm > >> rpm -i ruby-1.8.7.352-5.el5.src.rpm > >> rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec > > > > Always nice to have more options for packages. I do kind of get > > bothered that I get ruby-tcl bindings all the time :) > >> > >> For any of the nodes, you need only put this RPM in your repository and > >> have > >> Puppet upgrade them. It just works ;-) > >> > >> For the passenger server, you''ll need to get the source RPM from stealth > >> monkeys. You don''t need to change anything at all -- just build the SRC > >> rpm > >> and it will adjust everything to use Ruby 1.8.7. Very simple. > >> > >> wget > >> > http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm > >> rpm -i rubygem-passenger-3.0.11-1.src.rpm > >> rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec > >> > >> Step 2: Dashboard Requirements > >> > >> First you need to get the mysql drivers for Ruby. The EPEL version binds > >> against ruby 1.8.5, but you can compile their source RPM on your > >> ruby-1.8.7 > >> system and it will work great. > > > > This might be able to be fixed in EPEL. Since it dymaically links > > against ruby, I would think that having 1.8.5 or 1.8.7 would work. > > Could you file a bug at bugzilla.redhat.com on that? > >> > >> wget ${EPEL_MIRROR_OF_CHOICE}/5/SRPMS/ruby-mysql-2.7.3-1.el5.src.rpm > >> rpm -i ruby-mysql-2.7.3-1.el5.src.rpm > >> rpmbuild -ba ~/rpmbuild/SPECS/ruby-mysql.spec > >> > >> Next thing is that Puppet Dashboard requires a newer version of Ruby > Gems, > >> but it doesn''t tell you this. Instead it just barfs weird error > messages. > >> They need to rewrite their Rakefile to explicitly define the minimum > >> versions. > > > > Really? We ship rubygems 1.3.7 in Puppet Enterprise and I haven''t > > seen any errors. There are a few deprecation warnings though I > > believe. This might be a case of exact versions of several gems all > > playing together properly. Our PE preview branch (to be released > > later this month) uses: > > Gems 1.3.7 > > Rake 0.8.7 > > Rack 1.1.3 > > Dashboard 1.2.4 > > > >> > >> Thankfully, upgrading gems is very easy. > >> > >> wget > >> http://rbel.frameos.org/stable/el5/SRPMS/rubygems-1.8.10-1.el5.src.rpm > >> rpm -i rubygems-1.8.10-1.el5.src.rpm > >> rpmbuild -ba ~/rpmbuild/SPECS/rubygems.spec > > > > Note this can cause issues. Rubygems has a habit of completely > > breaking things that used to work. *shakes fist* > >> > >> Unfortunately, I never found a simple way to build RPMs for the three > gems > >> you need. I''d like to fix this next part of the HOWTO in the near > future. > > > > gem2rpm is fairly good as a starting point. > > > > Package name is oddly rubygem-gem2rpm in EPEL. > > > >> For now, the easiest way to get the minimum requirements installed is > to > >> run the following commands. > >> gem install rake > > > > You should be able yum install rubygem-rake from epel. (unless the > > rubygems version change prevents that) > >> gem install rdoc > >> gem install rack -v 1.1.2 > >> > >> You''ll observe that we installed a very specific version of Rack. The > >> reason for this is that Puppet Dashboard includes rack 1.1.2 within the > >> package, but the default Rakefile doesn''t load it -- so it wants you to > >> have > >> Rack in your normal gems library too. However if the version doesn''t > >> match > >> the same version included in the frozen vendor directory, it complains > >> about > >> that and barfs. I consider this a bug in the dashboard > >> packaging: https://projects.puppetlabs.com/issues/11669 > > > > I''ll have a look at that. Yeah, that''s our fault and probably masked > > by versions of rake shipped with EL6. (0.8.7 I think) > >> > >> However, if you install 1.1.2 and nothing newer, it will work just fine. > >> > >> Step 3: Install Dashboard > >> > >> For unknown reasons to me, the source RPM for dashboard can''t be > extracted > >> on EL5 unless you pass --nomd5 --nosignature. The good news is that the > >> source RPM for EL6 compiles without any changes on EL5. > > > > This is because the way RPM works changed between EL5 and EL6. In EL5 > > RPMS were built using md5 as the digest, they use sha (256 I think) in > > EL6. There''s not much I can do about that. If I build the RPM for > > EL5, it will throw warnings on EL6; since we target EL6 that''s what we > > do. > > > >> > >> wget > >> > http://yum.puppetlabs.com/el/6/products/SRPMS/puppet-dashboard-1.2.4-1.el6.src.rpm > >> rpm --nomd5 --nosignature -i puppet-dashboard-1.2.4-1.el6.src.rpm > >> rpmbuild -ba rpmbuild/SPECS/puppet-dashboard.spec > >> > >> That''s it! You now have puppet dashboard installed with all > dependancies. > >> You can then follow the standard documentation from puppet labs at > >> > http://docs.puppetlabs.com/guides/installing_dashboard.html#installation > >> > >> Skip the first two #1 bullets and the first #2 bullet and start with the > >> second #2. > >> > >> One problem I found was that when I tried to run it under > >> Passenger/Apache, > >> I was told that it couldn''t read the config.ru file. I had to do the > >> following to fix this: > >> cd /usr/share/puppet-dashboard > >> ln ./vendor/rails/railties/dispatches/config.ru config.ru > >> > >> This is already tracked in https://projects.puppetlabs.com/users/3472 > > That link might be wrong. > >> > >> This is working great for me right now. Let me know if you have any > ideas > >> for streamlining this process. > >> > >> -- > >> Jo Rhett > >> Net Consonance : consonant endings by net philanthropy, open source and > >> other randomness > >> > >> -- > >> 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. > > > > -- > > 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. > > > > > > -- > Inviato dal mio dispositivo mobile > > -- > 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. > >-- 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.
Jascha Lee
2013-Jan-19 02:32 UTC
[Puppet Users] Re: Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
On Wednesday, January 4, 2012 5:04:34 PM UTC-8, Jo wrote:> > > Step 1: Upgrade Ruby >The puppetlabs-deps repo (http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-6.noarch.rpm) has ruby 1.8.7 RPMs> For the passenger server, you''ll need to get the source RPM from stealth > monkeys. You don''t need to change anything at all -- just build the SRC > rpm and it will adjust everything to use Ruby 1.8.7. Very simple. > > wget > http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm > rpm -i rubygem-passenger-3.0.11-1.src.rpm > rpmbuild -ba ~/rpmbuild/SPECS/passenger.spec >I ran into httpd.h and apr_pools.h not found errors even though I have those RPMs installed. If I add -I/usr/include/httpd -I/usr/include/apr-1 to the gcc line that gets run, it works. Any idea of how to incorporate these into the rpmbuild process? Thanks, Jascha> >-- 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/-/ClvpWKoHWosJ. 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.
Andrew Melo
2013-Jan-20 02:58 UTC
Re: [Puppet Users] Re: Puppet Dashboard and Ruby 1.8.7 for EL5 systems HOWTO (draft)
Hello, On Fri, Jan 18, 2013 at 4:32 PM, Jascha Lee <jascha@sebastian.com> wrote:> > > On Wednesday, January 4, 2012 5:04:34 PM UTC-8, Jo wrote: >> >> >> Step 1: Upgrade Ruby >> > > The puppetlabs-deps repo ( > http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-6.noarch.rpm) > has ruby 1.8.7 RPMs >FWIW, to get this to install on ScientificLinux (another RHEL recompile), I had to disable the yum priorities plugin since it seemed to want to prioritize a ruby 1.8.5 security update over the puppet-provided 1.8.7. -Andrew> > >> For the passenger server, you''ll need to get the source RPM from stealth >> monkeys. You don''t need to change anything at all -- just build the SRC >> rpm and it will adjust everything to use Ruby 1.8.7. Very simple. >> >> wget http://passenger.**stealthymonkeys.com/SRPMS/** >> rubygem-passenger-3.0.11-1.**src.rpm<http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.11-1.src.rpm> >> rpm -i rubygem-passenger-3.0.11-1.**src.rpm >> rpmbuild -ba ~/rpmbuild/SPECS/passenger.**spec >> > > I ran into httpd.h and apr_pools.h not found errors even though I have > those RPMs installed. If I add -I/usr/include/httpd -I/usr/include/apr-1 > to the gcc line that gets run, it works. Any idea of how to incorporate > these into the rpmbuild process? > > Thanks, > Jascha > >> >> -- > 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/-/ClvpWKoHWosJ. > 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. >-- -- Andrew Melo -- 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.