Package hudson.plugins.ec2
Class EC2SpotSlave
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Node
-
- hudson.model.Slave
-
- hudson.plugins.ec2.EC2AbstractSlave
-
- hudson.plugins.ec2.EC2SpotSlave
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Node>
,ModelObject
,ReconfigurableDescribable<Node>
,Saveable
,EC2Readiness
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
public class EC2SpotSlave extends EC2AbstractSlave implements EC2Readiness
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EC2SpotSlave.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
-
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.plugins.ec2.EC2AbstractSlave
amiType, cloudName, DEFAULT_JAVA_PATH, DEFAULT_METADATA_ENDPOINT_ENABLED, DEFAULT_METADATA_HOPS_LIMIT, DEFAULT_METADATA_SUPPORTED, DEFAULT_METADATA_TOKENS_REQUIRED, idleTerminationMinutes, initScript, instanceId, isConnected, javaPath, jvmopts, lastFetchInstance, lastFetchTime, launchTimeout, maxTotalUses, MIN_FETCH_TIME, privateDNS, publicDNS, remoteAdmin, rootCommandPrefix, slaveCommandPrefix, slaveCommandSuffix, sshPort, stopOnTerminate, tags, templateDescription, tenancy, terminateScheduled, TEST_ZONE, tmpDir, useDedicatedTenancy, usePrivateDnsName
-
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
-
Constructor Summary
Constructors Constructor Description EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, String remoteAdmin, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, boolean usePrivateDnsName, int launchTimeout, AMITypeData amiType)
Deprecated.EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, String remoteAdmin, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, int launchTimeout, AMITypeData amiType)
Deprecated.EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, List<? extends NodeProperty<?>> nodeProperties, String remoteAdmin, String javaPath, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, int launchTimeout, AMITypeData amiType, ConnectionStrategy connectionStrategy, int maxTotalUses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEc2ReadinessStatus()
String
getEc2Type()
String
getInstanceId()
EC2 instance ID.String
getSpotInstanceRequestId()
Accessor for the spotInstanceRequestIdprotected boolean
isAlive(boolean force)
boolean
isReady()
boolean
isSpotRequestDead()
void
onConnected()
Called when the agent is connected to Jenkinsvoid
terminate()
Cancel the spot request for the instance.-
Methods inherited from class hudson.plugins.ec2.EC2AbstractSlave
clearLiveInstancedata, createComputer, fillZoneItems, getAdminPassword, getBootDelay, getCloud, getCreatedTime, getInstance, getInstanceType, getLaunchTimeoutInMillis, getMetadataEndpointEnabled, getMetadataHopsLimit, getMetadataSupported, getMetadataTokensRequired, getPrivateDNS, getPublicDNS, getRemoteAdmin, getSshPort, getStopOnTerminate, getTags, getUsePrivateDnsName, isAcceptingTasks, isAllowSelfSignedCertificate, isSpecifyPassword, isUseHTTPS, pushLiveInstancedata, readResolve, reconfigure
-
Methods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifferenceCallable, getComputer, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toString
-
Methods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isHoldOffLaunchUntilSave, save, toComputer
-
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, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Constructor Detail
-
EC2SpotSlave
@Deprecated public EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, String remoteAdmin, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, int launchTimeout, AMITypeData amiType) throws Descriptor.FormException, IOException
Deprecated.- Throws:
Descriptor.FormException
IOException
-
EC2SpotSlave
@Deprecated public EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, String remoteAdmin, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, boolean usePrivateDnsName, int launchTimeout, AMITypeData amiType) throws Descriptor.FormException, IOException
Deprecated.- Throws:
Descriptor.FormException
IOException
-
EC2SpotSlave
@DataBoundConstructor public EC2SpotSlave(String name, String spotInstanceRequestId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String initScript, String tmpDir, String labelString, List<? extends NodeProperty<?>> nodeProperties, String remoteAdmin, String javaPath, String jvmopts, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, int launchTimeout, AMITypeData amiType, ConnectionStrategy connectionStrategy, int maxTotalUses) throws Descriptor.FormException, IOException
- Throws:
Descriptor.FormException
IOException
-
-
Method Detail
-
isAlive
protected boolean isAlive(boolean force)
- Overrides:
isAlive
in classEC2AbstractSlave
-
terminate
public void terminate()
Cancel the spot request for the instance. Terminate the instance if it is up. Remove the agent from Jenkins.- Specified by:
terminate
in classEC2AbstractSlave
-
isSpotRequestDead
public boolean isSpotRequestDead()
-
getSpotInstanceRequestId
public String getSpotInstanceRequestId()
Accessor for the spotInstanceRequestId
-
getInstanceId
public String getInstanceId()
Description copied from class:EC2AbstractSlave
EC2 instance ID.- Overrides:
getInstanceId
in classEC2AbstractSlave
-
onConnected
public void onConnected()
Description copied from class:EC2AbstractSlave
Called when the agent is connected to Jenkins- Overrides:
onConnected
in classEC2AbstractSlave
-
getEc2Type
public String getEc2Type()
- Specified by:
getEc2Type
in classEC2AbstractSlave
-
isReady
public boolean isReady()
- Specified by:
isReady
in interfaceEC2Readiness
-
getEc2ReadinessStatus
public String getEc2ReadinessStatus()
- Specified by:
getEc2ReadinessStatus
in interfaceEC2Readiness
-
-