(CentOS, Scientific Linux) • they of course use rpm as their package system. • packaging newly rpm of ruby is hard • packaging rpm is troublesome job • It’s hard to upgrade ruby version using rpm • It’s very very hard to manage rubygem by using ( packaging into ) rpm • packaging rpm, packaging gem, packaging, packageng......
well known convenient tool to develop ruby • we put rbenv at /usr/local/rbenv ( system-wide ) on production server • everyone who logged in server can use common rbenv environment • we try to use Puppet to place benv
we can install another version of ruby by distributing files under /usr/local/rbenv/versions/ ( not using `rbenv install 1.9.3-pXXX` ) • using Puppet to distribute files
to /usr/local/rbenv • Install specific ruby version • distribute file ( tar.gz, which contains specific version of ruby ) • expands tar.gz under /usr/local/rbenv/versions • specify default version to /usr/local/rbenv version
/usr/local/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems • /usr/local/rbenv/versions/1.9.3-p327/ are managed by puppet and compressed in tar ball • how to add gem’s files to tar ball ?
Jenkins 1. commit Gemfile which you want to use system-wide 2. Jenkins polling 3. install gem by Gemfile (bundler) 4. tar specific version directory and commit
Jenkins 1. commit Gemfile which you want to use system-wide 2. Jenkins polling 3. install gem by Gemfile (bundler) 4. tar specific version directory and commit 5. push tar ball
install/upgrade gem than packaging rpm. • rbenv can share same environment over different many servers. • we can use and switchover some ruby versions • coexistence some ruby versions is difficult by using rpm ( rpm always overwrite new version ) • rbenv is developer friendly and simple • It is also easy for operation engineer, system administor
committing binary (tar ball of ruby) to git is not good manner maybe. • a little bit exaggerate approach ? • maybe “package” resource type of puppet also work well under rbenv environment. • I try to improve and make sure that Jenkins is needed or not.