Just solved it.

The problem was that the apt-get install requires a "yes" confirmation to
save the files on disk, So if I run it manually I choose yes, but when the
script is running the command is aborted.

I just add a -y to my command and it works now:

apt-get install -y ruby rubygems

So, there are any ways to do this without messing with the default scripts
? Something like a user defined function or something ?


Thanks.


On Fri, Jan 20, 2012 at 3:10 PM, Andrei Savu <[email protected]> wrote:

> Hi Edmar,
>
> I am checking it now. In theory your approach should work.
>
> Cheers,
>
> -- Andrei Savu / andreisavu.ro
>
>
> On Fri, Jan 20, 2012 at 6:45 PM, Edmar Ferreira <
> [email protected]> wrote:
>
>> Hi,
>>
>> I want to use whirr to launch a Hadoop cluster on EC2 to run some
>> stremming jobs using ruby.
>> I am using whirr 0.7.0
>> The default ubuntu images that are being used don't have ruby installed.
>>
>> First I followed this tutorial :
>>
>> http://whirr.apache.org/docs/0.7.0/quick-start-guide.html
>>
>> I can start my cluster but my job fails because ruby is not installed.
>>
>> Following the instructions in the faq:
>> http://whirr.apache.org/faq.html
>>
>> I created a functions directory with the scripts. The FAQ tell me to
>> change these scripts to add my own packages.
>>
>> I changed the update_repo() function inside my
>> functions/install_hadoop.sh script addint one line :
>>
>>  17 function update_repo() {
>>  18   if which dpkg &> /dev/null; then
>>  19     sudo apt-get update
>>  20     sudo apt-get install ruby rubygems
>>  21   elif which rpm &> /dev/null; then
>>  22     yum update -y yum
>>  23   fi
>>  24 }
>>
>>
>>
>> When I log in the machines ruby is not installed even with this change.
>> I tested inserting a echo statement inside this function and checked the
>> whirr.log to make sure that it's being called and it is.
>> If I log in the machines and run :
>>
>> sudo apt-get install ruby rubygems
>>
>> I can install without problems.
>>
>>
>> What can I do to automatically install ruby in my cluster ?
>>
>>
>> Thanks
>>
>> --
>> Edmar Ferreira
>> Co-Founder at Everwrite
>>
>>
>


-- 
Edmar Ferreira
Co-Founder at Everwrite

Reply via email to