Eucalyptus and Twister on FutureGrid

The FutureGrid Twister Tutorial

PTI Indiana University


I. Introduction

This tutorial will show you how to use Twister under Eucalyptus on India, FutureGrid.

II. Prerequisite

Follow tutorial Using Eucalyptus on FutureGrid to learn how to install and use the Eucalyptus client tool to access resources on India, FutureGrid.

III. Download FutureGrid Eucalyptus Twister Tool 

This tool is a set of python scripts. They can provide a pre-configured Twister environment, and also can terminate the environment. Please 
download the tool in the attachment below.

IV. Start Twister Environment

To start a Twister environment, execute the following program: 

$ python [-k user key] [-i public key file path] [-n number of instances][-t instance type]

$ python -k userkey -i userkey.pem -n 3 -t c1.medium


  • -k is the user key name generated by the euca-add-keypair step in the Eucalyptus tutorial.
  • -i  is the private key .pem file path. It is also generated in the euca-add-keypair step in the Eucalyptus tutorial.
  • -n is the number of instances for starting.
  • -t  is the type of image.

The following is an execution example:

Once the script is executed, the user can get a prepared Twister environment.
Then, the user can follow the instructions provided by to start ActiveMQ on the assigned node,
and also start the Twister environment (could be on any node just applied).

V. Terminate Twister Environment

To terminate a Twister environment, execute the following command:

$ python


VI. Run Twister-Kmeans

1. Ant and Deploy Twister-Kmeans

Log into the node assigned for ActiveMQ broker. 

$ cd /opt/Twister/samples/kmeans
$ ant
$ cd ../../lib
$ mv Twister-Kmeans-0.9.jar ../apps/
$ cd ../bin/
$ chmod a+x
$ ./ cpj ../apps/Twister-Kmeans-0.9.jar

2. Start Twister and ActiveMQ

Open two terminals and log into the node mentioned above. One is for starting ActiveMQ; the other is for starting Twister.

In Terminal 1:

$ cd /opt/apache-activemq-5.4.2/bin/
$ activemq console
In Terminal 2: 
$ cd /opt/Twister/bin
$ ./  

3. Create Twister-Kmeans Data Folder

Open another terminal, and create a folder for operating kmeans data:
$ cd /opt/Twister/bin
$ ./ mkdir kmeans 

4. Generate Twister-Kmeans




Open a new terminal:
$ cd /opt/Twister/samples/kmeans/bin/
$./ init_clusters.txt 2 3 /kmeans km_data 3 30000
In the terminal used in Step 3, do the following:
$ ./ kmeans km ../samples/kmeans/bin/
Back in the terminal used in Step 4, do the following:
$ ./ init_clusters.txt 3

The output is as follows:

fgeucatwister.zip4.38 KB