org.jvnet.hudson.ec2.launcher
Class Launcher

java.lang.Object
  extended by org.jvnet.hudson.ec2.launcher.Launcher

public class Launcher
extends java.lang.Object

Encapsulates the logic of starting a Hudson on EC2 with EBS.

Author:
Kohsuke Kawaguchi

Constructor Summary
Launcher()
           
 
Method Summary
 InstanceState checkBootStatus(com.xerox.amazonws.ec2.ReservationDescription.Instance inst)
           
 java.lang.String getAccessId()
           
 com.xerox.amazonws.ec2.Jec2 getEc2()
           
 com.xerox.amazonws.ec2.ReservationDescription.Instance getInstance()
           
 org.jvnet.hudson.ec2.launcher.PrivateKeyFile getPrivateKey()
           
 java.lang.String getSecretKey()
           
 Storage getStorage()
           
 void setCredential(java.lang.String accessId, java.lang.String secretKey)
          Configures the launcher withe the AWS credential.
 void setPrivateKey(java.io.File keyFile)
          Sets the private key used for launching EC2 instances.
 void setStorage(Storage storage)
          Chooses the storage to be used for Hudson.
 com.xerox.amazonws.ec2.ReservationDescription.Instance start()
          Starts the EC2 instance asynchronously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Launcher

public Launcher()
Method Detail

getEc2

public com.xerox.amazonws.ec2.Jec2 getEc2()

setCredential

public void setCredential(java.lang.String accessId,
                          java.lang.String secretKey)
                   throws com.xerox.amazonws.ec2.EC2Exception
Configures the launcher withe the AWS credential.

Throws:
com.xerox.amazonws.ec2.EC2Exception - If the given credential fails, including network connectivity problem.

getAccessId

public java.lang.String getAccessId()

getSecretKey

public java.lang.String getSecretKey()

setPrivateKey

public void setPrivateKey(java.io.File keyFile)
                   throws java.io.IOException,
                          com.xerox.amazonws.ec2.EC2Exception,
                          OperatorErrorException
Sets the private key used for launching EC2 instances.

Throws:
java.io.IOException
com.xerox.amazonws.ec2.EC2Exception
OperatorErrorException

getPrivateKey

public org.jvnet.hudson.ec2.launcher.PrivateKeyFile getPrivateKey()

setStorage

public void setStorage(Storage storage)
Chooses the storage to be used for Hudson.


getStorage

public Storage getStorage()

getInstance

public com.xerox.amazonws.ec2.ReservationDescription.Instance getInstance()

start

public com.xerox.amazonws.ec2.ReservationDescription.Instance start()
                                                             throws com.xerox.amazonws.ec2.EC2Exception,
                                                                    OperatorErrorException
Starts the EC2 instance asynchronously.

Throws:
com.xerox.amazonws.ec2.EC2Exception
OperatorErrorException

checkBootStatus

public InstanceState checkBootStatus(com.xerox.amazonws.ec2.ReservationDescription.Instance inst)
                              throws com.xerox.amazonws.ec2.EC2Exception
Throws:
com.xerox.amazonws.ec2.EC2Exception


Copyright © 2009. All Rights Reserved.