SALSA Group PTI?Indiana University
This tutorial will show you how to use Twister under Eucalyptus on India, FutureGrid.
Follow tutorial Using Eucalyptus on FutureGrid to learn how to install and use the Eucalyptus client tool to access resources on India, FutureGrid.
This tool is a set of python scripts. They can provide a pre-configured Twister environment, and also can terminate the environment. Pleasecdownload the tool in the attachment below.
To start a Twister environment, execute the following program:?
rteleft
$ python fg_euca_start_twister.py [-k user key] [-i public key file path] [-n number of instances][-t instance type]
e.g.
$ python fg_euca_start_twister.py -k userkey -i userkey.pem -n 3 -t c1.medium
Here,
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 fg_euca_start_twister.py?to start ActiveMQ on the assigned node, and also start the Twister environment (could be on any node just applied).
To terminate a Twister environment, execute the following command:
rteleft
$ python fg_euca_terminate_twister.py
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 twister.sh
$ ./twister.sh cpj ../apps/Twister-Kmeans-0.9.jar
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
$ ./start_twister.sh
Open another terminal, and create a folder for operating kmeans data:
$ cd /opt/Twister/bin
$ ./twishter.sh mkdir kmeans
^
Open a new terminal:
$ cd /opt/Twister/samples/kmeans/bin/
$./gen_data.sh init_clusters.txt 2 3 /kmeans km_data 3 30000
In the terminal used in Step 3, do the following:
$ ./create_partition_file.sh kmeans km ../samples/kmeans/bin/p.pf
Back in the terminal used in Step 4, do the following:
$ ./run_kmeans.sh init_clusters.txt 3 p.pf
The output is as follows:
Attachment | Size |
---|---|
fgeucatwister.zip | 4.38 KB |