You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@whirr.apache.org by Edmar Ferreira <ed...@gmail.com> on 2012/01/20 17:45:50 UTC
Installing ruby in hadoop cluster
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
Re: Installing ruby in hadoop cluster
Posted by Edmar Ferreira <ed...@gmail.com>.
Thanks ! Voted.
I'm noticing that when I put my custom installs the cluster launch scripts
take long time to run and often fails. As soon as I remove them the scripts
run without problems.
I will try to use other ubuntu instance with ruby already installed. And
customize the scripts just to install the necessary ruby gems.
On Fri, Jan 20, 2012 at 10:16 PM, Andrei Savu <sa...@gmail.com> wrote:
> I have created https://issues.apache.org/jira/browse/WHIRR-485
>
> Please vote if you think this is an useful addition.
>
> -- Andrei Savu / andreisavu.ro
>
> On Fri, Jan 20, 2012 at 7:28 PM, Andrei Savu <sa...@gmail.com>wrote:
>
>>
>> On Fri, Jan 20, 2012 at 7:19 PM, Edmar Ferreira <
>> edmaroliveiraferreira@gmail.com> wrote:
>>
>>> So, there are any ways to do this without messing with the default
>>> scripts ? Something like a user defined function or something ?
>>
>>
>> Not yet. How do you think that feature should look like?
>>
>> How about having a mechanism for creating custom roles inside the
>> .properties file? Something like this:
>>
>> whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker, 5
>> hadoop-datanode+hadoop-jobtracker+custom-ruby
>>
>> whirr.custom-ruby.install-function=...
>> whirr.custom-ruby.configure-function=..
>> whirr.custom-ruby.start-function=...
>> whirr.custom-ruby.stop-function=...
>>
>>
>>
>
--
Edmar Ferreira
Co-Founder at Everwrite
Re: Installing ruby in hadoop cluster
Posted by Andrei Savu <sa...@gmail.com>.
I have created https://issues.apache.org/jira/browse/WHIRR-485
Please vote if you think this is an useful addition.
-- Andrei Savu / andreisavu.ro
On Fri, Jan 20, 2012 at 7:28 PM, Andrei Savu <sa...@gmail.com> wrote:
>
> On Fri, Jan 20, 2012 at 7:19 PM, Edmar Ferreira <
> edmaroliveiraferreira@gmail.com> wrote:
>
>> So, there are any ways to do this without messing with the default
>> scripts ? Something like a user defined function or something ?
>
>
> Not yet. How do you think that feature should look like?
>
> How about having a mechanism for creating custom roles inside the
> .properties file? Something like this:
>
> whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker, 5
> hadoop-datanode+hadoop-jobtracker+custom-ruby
>
> whirr.custom-ruby.install-function=...
> whirr.custom-ruby.configure-function=..
> whirr.custom-ruby.start-function=...
> whirr.custom-ruby.stop-function=...
>
>
>
Re: Installing ruby in hadoop cluster
Posted by Andrei Savu <sa...@gmail.com>.
On Fri, Jan 20, 2012 at 7:19 PM, Edmar Ferreira <
edmaroliveiraferreira@gmail.com> wrote:
> So, there are any ways to do this without messing with the default scripts
> ? Something like a user defined function or something ?
Not yet. How do you think that feature should look like?
How about having a mechanism for creating custom roles inside the
.properties file? Something like this:
whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker, 5
hadoop-datanode+hadoop-jobtracker+custom-ruby
whirr.custom-ruby.install-function=...
whirr.custom-ruby.configure-function=..
whirr.custom-ruby.start-function=...
whirr.custom-ruby.stop-function=...
Re: Installing ruby in hadoop cluster
Posted by Edmar Ferreira <ed...@gmail.com>.
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 <sa...@gmail.com> 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 <
> edmaroliveiraferreira@gmail.com> 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
Re: Installing ruby in hadoop cluster
Posted by Andrei Savu <sa...@gmail.com>.
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 <
edmaroliveiraferreira@gmail.com> 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
>
>