|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.AbstractModelObject
hudson.slaves.Cloud
hudson.plugins.ec2.EC2Cloud
public abstract class EC2Cloud
Hudson's view of EC2.
| Nested Class Summary | |
|---|---|
static class |
EC2Cloud.DescriptorImpl
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_EC2_HOST
|
static java.lang.String |
EC2_URL_HOST
|
int |
instanceCap
Upper bound on how many instances we may provision. |
| Fields inherited from class hudson.slaves.Cloud |
|---|
ALL, name, PROVISION |
| Constructor Summary | |
|---|---|
protected |
EC2Cloud(java.lang.String id,
java.lang.String accessId,
java.lang.String secretKey,
java.lang.String privateKey,
java.lang.String instanceCapStr,
java.util.List<SlaveTemplate> templates)
|
| Method Summary | |
|---|---|
java.net.URL |
buildPresignedURL(java.lang.String path)
Computes the presigned URL for the given S3 resource. |
boolean |
canProvision(hudson.model.Label label)
|
static java.net.URL |
checkEndPoint(java.lang.String url)
|
com.amazonaws.services.ec2.AmazonEC2 |
connect()
Connects to EC2 and returns AmazonEC2, which can then be used to communicate with EC2. |
static com.amazonaws.services.ec2.AmazonEC2 |
connect(java.lang.String accessId,
hudson.util.Secret secretKey,
java.net.URL endpoint)
Connect to an EC2 instance. |
static com.amazonaws.services.ec2.AmazonEC2 |
connect(java.lang.String accessId,
java.lang.String secretKey,
java.net.URL endpoint)
Connect to an EC2 instance. |
static java.lang.String |
convertHostName(java.lang.String ec2HostName)
Convert a configured hostname like 'us-east-1' to a FQDN or ip address |
static java.lang.Integer |
convertPort(java.lang.String ec2Port)
Convert a user entered string into a port number "" -> -1 to indicate default based on SSL setting |
int |
countCurrentEC2Slaves()
Counts the number of instances in EC2 currently running. |
void |
doAttach(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String id)
Debug command to attach to a running instance. |
void |
doProvision(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
java.lang.String ami)
|
static EC2Cloud |
get()
Gets the first EC2Cloud instance configured in the current Hudson, or null if no such thing exists. |
java.lang.String |
getAccessId()
|
abstract java.net.URL |
getEc2EndpointUrl()
|
java.lang.String |
getInstanceCapStr()
|
com.amazonaws.services.ec2.model.KeyPair |
getKeyPair()
Gets the KeyPairInfo used for the launch. |
hudson.plugins.ec2.EC2PrivateKey |
getPrivateKey()
|
abstract java.net.URL |
getS3EndpointUrl()
|
java.lang.String |
getSecretKey()
|
SlaveTemplate |
getTemplate(hudson.model.Label label)
Gets SlaveTemplate that has the matching Label. |
SlaveTemplate |
getTemplate(java.lang.String ami)
|
java.util.List<SlaveTemplate> |
getTemplates()
|
java.util.Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload)
|
protected java.lang.Object |
readResolve()
|
| Methods inherited from class hudson.slaves.Cloud |
|---|
all, checkPermission, getACL, getDescriptor, getDisplayName, getSearchUrl, hasPermission |
| Methods inherited from class hudson.model.AbstractModelObject |
|---|
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_EC2_HOST
public static final java.lang.String EC2_URL_HOST
public final int instanceCap
| Constructor Detail |
|---|
protected EC2Cloud(java.lang.String id,
java.lang.String accessId,
java.lang.String secretKey,
java.lang.String privateKey,
java.lang.String instanceCapStr,
java.util.List<SlaveTemplate> templates)
| Method Detail |
|---|
public abstract java.net.URL getEc2EndpointUrl()
throws java.io.IOException
java.io.IOException
public abstract java.net.URL getS3EndpointUrl()
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object readResolve()
public java.lang.String getAccessId()
public java.lang.String getSecretKey()
public hudson.plugins.ec2.EC2PrivateKey getPrivateKey()
public java.lang.String getInstanceCapStr()
public java.util.List<SlaveTemplate> getTemplates()
public SlaveTemplate getTemplate(java.lang.String ami)
public SlaveTemplate getTemplate(hudson.model.Label label)
SlaveTemplate that has the matching Label.
public com.amazonaws.services.ec2.model.KeyPair getKeyPair()
throws com.amazonaws.AmazonClientException,
java.io.IOException
KeyPairInfo used for the launch.
com.amazonaws.AmazonClientException
java.io.IOException
public int countCurrentEC2Slaves()
throws com.amazonaws.AmazonClientException
This includes those instances that may be started outside Hudson.
com.amazonaws.AmazonClientException
public void doAttach(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
java.lang.String id)
throws javax.servlet.ServletException,
java.io.IOException,
com.amazonaws.AmazonClientException
javax.servlet.ServletException
java.io.IOException
com.amazonaws.AmazonClientException
public void doProvision(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
java.lang.String ami)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletException
java.io.IOException
public java.util.Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label,
int excessWorkload)
provision in class hudson.slaves.Cloudpublic boolean canProvision(hudson.model.Label label)
canProvision in class hudson.slaves.Cloudpublic static EC2Cloud get()
EC2Cloud instance configured in the current Hudson, or null if no such thing exists.
public com.amazonaws.services.ec2.AmazonEC2 connect()
throws com.amazonaws.AmazonClientException
AmazonEC2, which can then be used to communicate with EC2.
com.amazonaws.AmazonClientException
public static com.amazonaws.services.ec2.AmazonEC2 connect(java.lang.String accessId,
java.lang.String secretKey,
java.net.URL endpoint)
AmazonEC2 client
public static com.amazonaws.services.ec2.AmazonEC2 connect(java.lang.String accessId,
hudson.util.Secret secretKey,
java.net.URL endpoint)
AmazonEC2 clientpublic static java.lang.String convertHostName(java.lang.String ec2HostName)
public static java.lang.Integer convertPort(java.lang.String ec2Port)
public java.net.URL buildPresignedURL(java.lang.String path)
throws java.io.IOException,
com.amazonaws.AmazonClientException
path - String like "/bucketName/folder/folder/abc.txt" that represents the resource to request.
java.io.IOException
com.amazonaws.AmazonClientException
public static java.net.URL checkEndPoint(java.lang.String url)
throws hudson.util.FormValidation
hudson.util.FormValidation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||