Home > MySQL, Web Stuff > Pentaho in the Cloud

Pentaho in the Cloud

This is a step by step guide to setting up Pentaho on Amazon EC2.

If you haven’t already done so, you’ll need to sign up with EC2.

Once you’ve signed up, log in to the AWS Management Console and launch a new instance. I usually create a spot request because I just want a sandpit and it can be significantly cheaper (but don’t tell anyone or it will get more expensive). A small instance is fine here. Choose the most basic Fedora package (as of writing “Basic Fedora Core 8″, ami-84db39ed). We’ll install everything else ourselves.

You’ll need to create a key pair if you don’t have one already. The amazon guides are excellent on this – read up as you’ll need to use Putty gen to convert it for use later. For security groups, create a new one called Pentaho with only port 22.In the wizard you cannot add custom ports, so we’ll add 8080 and 8099 later. If you want to access MySQL externally then open 3306 but if you’re going to ssh and work directly on the server then leave it closed.

Note here that you can assign multiple security groups to one instance, but also that you can not change the security group of an instance later as far as I know (but you can change the settings of the security group).

After the request has been submitted, go and make a cup of tea. When you get back you should have three things:

1) an instance in “active” state (will need to refresh).

2) In the “Security Groups” tab your new security group (may need to refresh).

3) In the “Volumes” a volume “in-use” related to your instance (may need to refresh).

While we’re still in the console, now is a good time to open 8080. Click Security Groups, select your group, and add these entries:
Connection Method: Custom…
protocol: tcp
From Port: 8080
To Port: 8080

Connection Method: Custom…
protocol: tcp
From Port: 8099
To Port: 8099

The last step for the console is to get your public DNS. Just go to Instances, select the new instance, and in the bottom pane scroll down until you find the entry, and copy and paste it into putty or your tool of choice. If you’re using putty, add your private key (under Connection->SSH->Auth) and connect to the instance – if not just follow the amazon tutorials on how to do this.

Now you have a running server that you’re paying for by the hour :) , so no time to mess around.

First thing to install is mysql, and set it running at startup. At the prompt type:

yum install mysql mysql-server
chkconfig --level 345 mysqld on; service mysqld start

Test this by typing mysql to get the mysql prompt.

The next part is to install Sun Java. You need to get the latest Sun Java JDK and Sun love to make that harder than it should be. Start here: http://java.sun.com/javase/downloads/widget/jdk6.jsp , choose Linux, and click Continue – do NOT use the Sun download manager. You’ll need to log in at this point. It will ask you to select the downloads, don’t do that. Right click on the xxxx.rpm.bin and “Copy Link Location”. Now switch to putty, type:

cd /opt

wget and right click to paste the URL in the clipboard. This will work because the link has a session key against your credentials.

You now have the file with a hideously long name, rename it to something meaningful:

mv jdk-6u18blahblah java-rpm.bin

Obviously you don’t have to type the full file name – just the first few letters and tab to autocomplete. Make it executable and execute it:

chmod a+x java-rpm.bin
./java-rpm.bin

You’ll need to agree to the terms. This will now install. After the install has completed, type “java -version”. If everything was successful this will show something like:

java version “1.6.0_18″
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Next step is to set up JAVA_HOME. Type this and you should get nothing returned:

echo $JAVA_HOME

Now find out what your java home should be:

ll /usr/java

Will list a directory and two symbolic links. Make a note of the directory, in my case it is jdk1.6.0_18. Add it to your base profile so every time you log in to the shell it will be present:

vi ~/.bash_profile

(press INSERT to insert)

At the bottom add these two lines (replacing the jdk part with your version):

export JAVA_HOME=/usr/java/jdk1.6.0_18
export PATH=$PATH:/usr/java/jdk1.6.0_18/bin

Save and quit (ESC to escape exit mode, :wq + ENTER to send the “write quit” command). Now test it’s all OK by logging out, back in and type:

echo $JAVA_HOME

Should return /usr/java/jdk1.6.0_18

The next part is to install Pentaho. Rather than reinvent the wheel, I’m going to refer you to an excellent guide by Prashant Raju over here:  Pentaho Installation Guide for Linux/MySQL. Start from the section “SQL Script Packs” and follow the guide to the letter. You will need to use your public dns in the “web.xml” section.

After following those steps, hit your server at port 8080:

http://your-instance-public-dns:8080

Post to Twitter Tweet This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook

  1. No comments yet.
  1. No trackbacks yet.