StarCluster

From Genome Analysis Wiki
Revision as of 17:35, 29 October 2014 by Mktrost (talk | contribs)
Jump to navigationJump to search

Back to the beginning: GotCloud

Back to GotCloud: Amazon


If you have access to your own cluster, your task will be much simpler. Install the GotCloud software (GotCloud: Source Releases) and run it as described on the same pages.

For those who are not so lucky to have access to a cluster, Amazon Web Services (AWS) provides an alternative. You may run the gotcloud software on a cluster created in AWS. One tool that makes the creation of a cluster of AMIs (Amazon Machine Instances) is StarCluster (see http://star.mit.edu/cluster/).

The following shows an example of how you might use StarCluster to create an AWS cluster and set it up to run GotCloud. There are many details setting up starcluster and this is not intended to explain all of the many variations you might choose, but should provide you a working example.

Tasks to be completed

  • Install the ec2 tools package (ec2-api-tools for Ubuntu) on your machine (optional)
  • Install and configure starcluster on your machine (required)
    • Note: gotcloud requires a 64bit machine
    • Please use NODE_IMAGE_ID = ami-765b3e1f
  • Create an EBS volume based on the GotCloud snapshot
  • Configure StarCluster to use the volume just created
  • Create an AWS cluster
  • Create storage for your sequence data and make it available for the software
  • Run the GotCloud software

Getting Started With StarCluster

StarCluster provides lots of documentation.

To install and setup StarCluster for the first time, you can follow the QuickStart instructions: http://star.mit.edu/cluster/docs/latest/quickstart.html

  • Includes installation instructions
  • Includes setting up a basic StarCluster configuration file
    • You will need your AWS Credentials to setup the configuration file



StarCluster Configuration Example

StarCluster creates a model configuration file in ~/.starcluster/config and you are instructed to edit this and set the correct values for the variables. Here is a highly simplified example of a config file that should work. Please note there are many things you might want to choose, so craft the config file with care. You'll need to specify nodes with 4GB of memory (type m1.medium) and make sure each node has access to the input and output data for the step being run.

####################################
## StarCluster Configuration File ##
####################################
[global]
DEFAULT_TEMPLATE=myexample

#############################################
## AWS Credentials Settings
#############################################
[aws info]
AWS_ACCESS_KEY_ID = AKImyexample8FHJJF2Q
AWS_SECRET_ACCESS_KEY = fthis_was_my_example_secretMqkMIkJjFCIGf
AWS_USER_ID=199998888709 

AWS_REGION_NAME = us-east-1                 # Choose your own region
AWS_REGION_HOST = ec2.us-east-1.amazonaws.com
AWS_S3_HOST = s3-us-east-1.amazonaws.com

###########################
## EC2 Keypairs
###########################
[key east1_starcluster]
KEY_LOCATION = ~/.ssh/AWS/east1_starcluster_key.rsa   # Same region

###########################################
## Define Cluster
##   starcluster start -c east1_starcluster  nameichose4cluster
###########################################
[cluster myexample]          # Name of this cluster definition
KEYNAME = east1_starcluster                 # Name of keys I need
CLUSTER_SIZE = 4                            # Number of nodes
CLUSTER_SHELL = bash

#  Choose the base AMI using   starcluster listpublic
#   (http://star.mit.edu/cluster/docs/0.93.3/faq.html)
NODE_IMAGE_ID = ami-765b3e1f
AVAILABILITY_ZONE = us-east-1               # Region again!
NODE_INSTANCE_TYPE = m1.medium              # 4G memory is the minimum for GotCloud

VOLUMES = gotcloud, mydata
[volume mydata]
VOLUME_ID = vol-6e729657
MOUNT_PATH = /mydata

[volume gotcloud]
VOLUME_ID = vol-56071570
MOUNT_PATH = /gotcloud


Create Your Cluster

 starcluster start -c myexample myseq-example
 StarCluster - (http://web.mit.edu/starcluster) (v. 0.93.3)
 Software Tools for Academics and Researchers (STAR)
 Please submit bug reports to starcluster@mit.edu

 >>> Validating cluster template settings...
 >>> Cluster template settings are valid
 >>> Starting cluster...
     [lines deleted]
 >>> Mounting EBS volume vol-32273514 on /gotcloud...
 >>> Mounting EBS volume vol-36788522 on /mydata...
     [lines deleted]

When this completes, you are ready to run the GotCloud software on your data. Make sure you have defined and mounted volumes for your sequence data and the output steps of the aligner and umake. These volumes (as well as /gotcloud) should be available on each node.

 starcluster sshmaster myseq-example
 StarCluster - (http://web.mit.edu/starcluster) (v. 0.93.3)
 Software Tools for Academics and Researchers (STAR)
   [lines deleted]

 df -h
 ssh node001 df -h

If your data is visible on each node, you're ready to run the software as described in GotCloud.

Running GotCloud on StarCluster

To tell GotCloud to run data on the StarCluster you have setup, specify the following on your gotcloud command-line:

-batchtype sgei

Alternatively, you can set the following in your configuration file:

BATCH_TYPE = sgei