On Thu, Jul 26, 2012 at 9:40 PM, devzero2000 <pinto.e...@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 that includes 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 <stah...@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 <jrh...@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+unsubscr...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.