These scripts and instructions are a starting point. They were originally written for launching Pentaho Enterprise Edition (EE) suite. They will not work out-of-the-box for Community Edition (CE). (For example, they require a directory containing the EE licenses.) In addition, the scripts depend on Pentaho Debian packages which are not publicly available. However, the Debian package Ant code is available in the trunk and you can use it to create your own packages. (See the package-deb target.) Finally, the location (pkg_url) where the Pentaho Debian packages are to be fetched must be changed in res/pentaho-init.
The technique used by these scripts for launching Pentaho on IaaS providers (e.g. Amazon aka AWS) is to use vanilla Ubuntu (tested with 11.04) along with the cloud-init package. Using this technique, all required software (e.g. Java, MySQL) is installed on first launch. As a consequence of this approach, first launch can take 10 minutes or more.
- Download Python 2.7.2 (http://www.python.org/getit/windows/) and run the installer
- Add folder with python.exe to PATH
- (Optional, AWS only) If launching instances on AWS, you need to install the boto library
- Download boto 2.0 (http://code.google.com/p/boto/downloads/list)
- Unzip the boto archive
- Run: python setup.py install
- Run: sudo apt-get install python
- (Optional, AWS only) If launching instances on AWS, you need to install the boto library
- Run: sudo apt-get install python-pip
- Run: sudo pip install -U boto
Please see the Disclaimer first! There are two ways to use these scripts to run Pentaho on EC2.
The methods described in this document have been tested with Ubuntu 11.04. To find a list of Ubuntu 11.04 AMIs, following these instructions.
- Go to http://cloud.ubuntu.com/ami/.
- Filter using the following:
Name
=natty
,EBS
=ebs
.
- Run
run_ec2.py
. Use--help
for usage.
- Login to AWS Management Console and click the
EC2
tab. - Create a key pair. A key pair will allow you to SSH into your instances.
- Click
Key Pairs
underNetworking & Security
. - Click
Create Key Pair
. - Enter a
Key Pair Name
and clickCreate
. - Save the downloaded
pem
file. This will be used every time you SSH. - Click
Close
.
- Click
- Create a security group. A security group will only allow certain traffic to your instances.
- Click
Security Groups
underNetworking & Security
. - Click the checkbox for the
default
security group. - Click the
Inbound
tab. - For each of the following pairs, enter the
Port range
andSource
then clickAdd Rule
: (18080, 0.0.0.0/0), (19080, 0.0.0.0/0), (18088, 0.0.0.0/0), (18443, 0.0.0.0/0), (19443, 0.0.0.0/0).
- Click
-
Create the user data.
-
Run
mk_ec2_userdata.py
. Use--help
for usage. -
Login to AWS Management Console and click the
EC2
tab. Now clickLaunch Instance
. -
Click
Community AMIs
. Enter one of the supported AMIs from above into the filter text box. Hit Enter. ClickSelect
on the desired image. -
Enter
Number of Instances
andInstance Type
(tested withm1.large
). ClickContinue
. -
For
User Data
, clickas file
. Browse for the file created earlier. Do not checkbase64 encoded
. EnableTermination Protection
if desired.Shutdown Behavior
should be set toStop
. ClickContinue
. -
You can specify any number of tags. The
Name
tag is very useful when showing instances in the console. ClickContinue
. -
Choose the key pair created earlier. Click
Continue
. -
Choose the security group created earlier. Click
Continue
. -
Confirm the settings and click
Launch
.
Please see the Disclaimer first!
This technique is based on Bootstrapping an Ubuntu Server on Rackspace Using Cloud-Init.
In the examples below, json.tool is used to pretty-print the JSON responses. Piping to it is optional.
-
Get an auth token.
curl -s -D - -H "X-Auth-Key: @authKey@" -H "X-Auth-User: @authUser@" https://auth.api.rackspacecloud.com/v1.0
-
Export
X-Auth-Token
andX-Server-Management-Url
values from the response.export X_AUTH_TOKEN="@authToken@" export X_MGMT_URL="@mgmtUrl@"
-
List the flavors. Choose a flavor (tested with 2GB of RAM). Note the flavor ID.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" $X_MGMT_URL/flavors/detail | python -mjson.tool
-
List the images. Choose an Ubuntu image (tested with 11.04). Note the image ID.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" $X_MGMT_URL/images | python -mjson.tool
-
Start an instance. Note the server ID, public IP address, and admin password.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" -H "Content-Type: application/json" -X POST -d '{"server":{"name":"pentaho","imageId":@imageId@,"flavorId":@flavorId@}}' $X_MGMT_URL/servers | python -mjson.tool
-
Check that the server status is
ACTIVE
.curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" $X_MGMT_URL/servers/@serverId@ | python -mjson.tool
-
SSH into instance.
ssh root@@serverIp@
-
Install cloud-init on the instance.
apt-get install cloud-init
-
Create an image of running instance.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" -H "Content-Type: application/json" -X POST -d '{"image":{"serverId":@serverId@,"name":"pentaho"}}' $X_MGMT_URL/images | python -mjson.tool
-
Check that the image status is
ACTIVE
.curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" $X_MGMT_URL/images/@imageId@ | python -mjson.tool
-
Delete server.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" -X DELETE $X_MGMT_URL/servers/@serverId@
-
Run
mk_rs_request.py
. Use--help
for usage. Assume the output of that command goes torequest.xml
. -
Launch the server.
curl -s -H "X-Auth-Token: $X_AUTH_TOKEN" -H "Content-Type: application/xml" -X POST -d @request.xml $X_MGMT_URL/servers | python -mjson.tool