com.norbl.cbp.ppe
Class ParamsEc2

java.lang.Object
  extended by com.norbl.util.AbstractParams
      extended by com.norbl.cbp.ppe.ParamsEc2

public class ParamsEc2
extends AbstractParams


Nested Class Summary
static class ParamsEc2.ParamName
           
 
Field Summary
 java.lang.String clusterGroupName
           
 boolean disableHyperthreading
           
 java.lang.String imageID
           
 com.amazonaws.services.ec2.model.InstanceType instanceType
           
 java.lang.String keyName
           
 java.lang.String networkName
          Identifies a set of ec2 instances that constitute an mpi network.
 int nInstances
           
 java.io.File rsaKeyPairFile
          This keypair file must contain the PRIVATE key that matches the public key specified by keyName (which is registered with aws).
 java.lang.String securityGroup
           
 double spotPrice
           
 java.lang.String uid
           
 boolean useCluster
           
 boolean useSpotInstances
           
 
Fields inherited from class com.norbl.util.AbstractParams
ht
 
Constructor Summary
ParamsEc2(ParamHt ht)
           
 
Method Summary
 com.amazonaws.auth.AWSCredentials buildAWSCredentials()
           
 void checkForConnectToAWSParams()
           
 void checkForCreateNetworkParams()
          Checks for required params, not for params that may be supplied though a gui.
 void checkForNetworkInfoParams()
           
 void checkForTerminateInstancesParams()
           
 java.lang.String getAwsAccessKey()
           
 java.lang.String getAwsSecretKey()
           
 java.lang.String getAWSUserID()
           
 java.lang.String getMissingParamMessage()
           
 boolean hasNBLAuthorizationParams()
           
 boolean hasRequiredEc2LaunchParams()
          Checks whether this instance has the params needed to create Ec2Wrangler and launch instances.
protected  void setParamVal(java.lang.String key, java.lang.String val)
           
 
Methods inherited from class com.norbl.util.AbstractParams
checkForReadFileAccess, getConfigFileSuffix, setParamVals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instanceType

public com.amazonaws.services.ec2.model.InstanceType instanceType

imageID

public java.lang.String imageID

nInstances

public int nInstances

keyName

public java.lang.String keyName

rsaKeyPairFile

public java.io.File rsaKeyPairFile
This keypair file must contain the PRIVATE key that matches the public key specified by keyName (which is registered with aws).


networkName

public java.lang.String networkName
Identifies a set of ec2 instances that constitute an mpi network. By default this is <user name>-<date>, e.g.
username-20110221
but it can be anything. This is just for convenience. Typically it's a string that's easier to type (and remember) than the #networkID. It does not need to be unique.


useSpotInstances

public boolean useSpotInstances

spotPrice

public double spotPrice

useCluster

public boolean useCluster

clusterGroupName

public java.lang.String clusterGroupName

disableHyperthreading

public boolean disableHyperthreading

securityGroup

public java.lang.String securityGroup

uid

public java.lang.String uid
Constructor Detail

ParamsEc2

public ParamsEc2(ParamHt ht)
          throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setParamVal

protected void setParamVal(java.lang.String key,
                           java.lang.String val)
                    throws java.lang.Exception
Specified by:
setParamVal in class AbstractParams
Throws:
java.lang.Exception

buildAWSCredentials

public com.amazonaws.auth.AWSCredentials buildAWSCredentials()
                                                      throws MissingParamsException
Throws:
MissingParamsException

getAwsAccessKey

public java.lang.String getAwsAccessKey()

getAwsSecretKey

public java.lang.String getAwsSecretKey()

getAWSUserID

public java.lang.String getAWSUserID()

getMissingParamMessage

public java.lang.String getMissingParamMessage()

checkForConnectToAWSParams

public void checkForConnectToAWSParams()
                                throws MissingParamsException
Throws:
MissingParamsException

checkForCreateNetworkParams

public void checkForCreateNetworkParams()
                                 throws MissingParamsException
Checks for required params, not for params that may be supplied though a gui.

Throws:
MissingParamsException

checkForNetworkInfoParams

public void checkForNetworkInfoParams()
                               throws MissingParamsException
Throws:
MissingParamsException

checkForTerminateInstancesParams

public void checkForTerminateInstancesParams()
                                      throws MissingParamsException
Throws:
MissingParamsException

hasRequiredEc2LaunchParams

public boolean hasRequiredEc2LaunchParams()
Checks whether this instance has the params needed to create Ec2Wrangler and launch instances. These params are usually obtained from the config file.

Note that this methods does not check for params needed to configure ompi (e.g. rsaKeyPairFile) nor to check for billable ami authorization.

Returns:

hasNBLAuthorizationParams

public boolean hasNBLAuthorizationParams()