The new dev scripts-- now with rbenv
Michal Fojtik
mfojtik at redhat.com
Wed Sep 26 12:03:06 UTC 2012
On Sep 25, 2012, at 2:02 AM, Crag Wolfe <cwolfe at redhat.com> wrote:
Nice writeup Crag!
If you want to use Ruby 1.8.x on Fedora 17, there is something more
you need to do:
http://mifo.sk/rbenv-simple-ruby-managment-in-fedora
-- Michal
> The latest iteration of the dev scripts now supports (in addition to
> system ruby), the ability to download and install an arbitrary ruby
> version via rbenv.
>
> Also, it is now possible to set up two conductor development
> environments side by side since the conductor port is scriptable.
> For instance, to apply a pull request to one instance but not the other:
>
> In one shell:
>
> export FACTER_CONDUCTOR_PORT=3000
> export WORKDIR=/tmp/test
> export DEV_USERNAME=test
> export RBENV_VERSION=1.9.3-p194
> curl https://raw.github.com/cwolferh/aeolus-cfg/master/bootstrap.sh | /bin/sh
>
> In another shell (although a good idea to let the first one finish
> installing 1.9.3-p194 in /home/test/.rbenv before running) :
>
> export FACTER_CONDUCTOR_PORT=3001
> export WORKDIR=/tmp/test2
> export DEV_USERNAME=test
> export RBENV_VERSION=1.9.3-p194
> export FACTER_CONDUCTOR_PULL_REQUEST=71
> curl https://raw.github.com/cwolferh/aeolus-cfg/master/bootstrap.sh | /bin/sh
>
> In this case, as expected there is one instance running on port 3000
> without a pull request applied, and another instance running on port
> 3001 with pull request 71 applied. Both are using rbenv to set the
> ruby version to 1.9.3-p194. They both use the system user, test, to
> check out and build the projects along with RBENV_VERSION ruby. They
> use separate work directories of /tmp/test and /tmp/test2. Finally,
> the presence of FACTER_CONDUCTOR_PULL_REQUEST in the second case
> indicates that we want to apply a pull request (it must be an active
> pull request).
>
> Additional Notes
>
> * System ruby and puppet are still installed and used as the framework
> for creating the conductor/aeolus-image-rubygem/aeolus-cli work
> directories and associated setup (mainly git commands). However, if
> RBENV_VERSION is specified, rbenv and the relevant local rbenv ruby
> is used for the conducutor/aeolus-image-rubygem gem, bundler and run
> tasks. In other words, don't panic if you see system ruby being
> installed when you run bootstrap.sh but a RBENV_VERSION is set.
>
> * No .bashrc or similar shell-effecting changes are made to
> $DEV_USERNAME'S homedir (intentionally). If you su to $DEV_USERNAME
> and you want to pick up the rbenv that was installed by boostrap.sh,
> you can either prepend ~/.rbenv/bin:~/.rbenv/shims to your PATH or,
> as per the rbenv installer instructions, add the following to
> .bashrc, for example:
>
> export RBENV_ROOT="${HOME}/.rbenv"
>
> if [ -d "${RBENV_ROOT}" ]; then
> export PATH="${RBENV_ROOT}/bin:${PATH}"
> eval "$(rbenv init -)"
> fi
>
> *Currently, the scripts are located at
> https://github.com/cwolferh/aeolus-cfg, but we do want to rebase this
> under aeolus-incubator at some point (with a different project name).
Michal Fojtik
http://deltacloud.org
mfojtik at redhat.com
More information about the aeolus-devel
mailing list