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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.