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
,PersistenceRoot
,ReconfigurableDescribable<Node>
,Saveable
,EC2Readiness
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
- See Also:
-
Nested Class Summary
Nested ClassesNested 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_ENCLAVE_ENABLED, 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
ConstructorsConstructorDescriptionEC2SpotSlave
(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
Methods inherited from class hudson.plugins.ec2.EC2AbstractSlave
clearLiveInstancedata, createComputer, fillZoneItems, getAdminPassword, getBootDelay, getCloud, getCreatedTime, getEnclaveEnabled, 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, getLabelAtomSet, 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, getConfigFile, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getRootDir, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isHoldOffLaunchUntilSave, onLoad, reconfigure, save, toComputer
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, 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 Details
-
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 Details
-
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
Accessor for the spotInstanceRequestId -
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
- Specified by:
getEc2Type
in classEC2AbstractSlave
-
isReady
public boolean isReady()- Specified by:
isReady
in interfaceEC2Readiness
-
getEc2ReadinessStatus
- Specified by:
getEc2ReadinessStatus
in interfaceEC2Readiness
-