|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElasticInstanceManager
Field Summary | |
---|---|
static String |
BAMBOO_CONTROL_TAG
|
static com.atlassian.aws.ec2.EC2InstanceType |
DEFAULT_INSTANCE_TYPE_32
|
static com.atlassian.aws.ec2.EC2InstanceType |
DEFAULT_INSTANCE_TYPE_64
|
static String |
DEFAULT_PRODUCT_FOR_LINUX_PLATFORM
|
static String |
DEFAULT_PRODUCT_FOR_WINDOWS_PLATFORM
|
static String |
ELASTIC_BAMBOO_KEY_PAIR
|
static String |
ELASTIC_BAMBOO_KEY_PAIR_FILE
|
static String |
ELASTIC_BAMBOO_SECURITY_GROUP
|
Method Summary | |
---|---|
void |
addElasticLogEntry(org.apache.log4j.Logger log,
String logEntry)
|
boolean |
cancelSpotRequests(com.atlassian.aws.AWSAccount awsAccount)
Cancel spot instance requests. |
void |
ensureLoginKeyPairExists(com.atlassian.aws.AWSAccount awsAccount,
String keyPair)
Ensures that a key pair, named "elasticbamboo", has been defined in the configured AWS account. |
com.google.common.collect.SetMultimap<ElasticImageConfiguration,RemoteElasticInstance> |
getAllElasticAgentsAsMap()
Returns all elastic instances in a SetMultimap , keyed by the ElasticImageConfiguration |
List<RemoteElasticInstance> |
getAllElasticRemoteAgents()
Returns all elastic instances. |
Set<com.atlassian.aws.ec2.EC2InstanceType> |
getAllowedInstanceTypes()
|
List<String> |
getElasticAgentLogs()
Retrieve activity logs |
RemoteElasticInstance |
getElasticRemoteAgentByInstanceId(String instanceId)
Retrieve elastic instance of the given ID. |
List<RemoteElasticInstance> |
getElasticRemoteAgents()
Retrieve a readonly list of any currently existing EC2 instances |
List<RemoteElasticInstance> |
getElasticRemoteAgentsByConfiguration(ElasticImageConfiguration elasticImageConfiguration)
|
List<RemoteElasticInstance> |
getElasticRemoteAgentsByConfiguration(long id)
|
String |
getInstanceLogs(String instanceId)
Fetch console output of a running EC2 instance. |
List<RemoteElasticInstance> |
getInstancesWithStartingAgents()
Returns those elastic instances that have already started but their agents have not yet connected to the bamboo server. |
List<RemoteElasticInstance> |
getRequestedElasticRemoteAgents()
Returns the elastic instances which have been requested but not yet identified. |
List<RemoteElasticInstance> |
getStartingElasticInstances()
Return the elastic instances which have been identified but not started up yet, i.e. |
int |
getTotalNumElasticRemoteAgents()
Return how many license spots are currently being occupied by elastic instances (pending and running) |
boolean |
isElasticSupportEnabled()
|
boolean |
isInstanceKnown(String instanceId)
Checks if an AWS instance with the given ID exists and is managed by this Bamboo server. |
RemoteElasticInstance |
newElasticAgent(RemoteElasticInstanceListener listener,
com.atlassian.aws.AWSAccount awsAccount,
AgentManager agentManager,
ElasticImageConfiguration elasticImageConfiguration,
com.atlassian.aws.ec2.InstanceLaunchConfigurationBuilder instanceLaunchConfigurationBuilder)
|
void |
onInstanceIdentified(RemoteElasticInstance remoteElasticInstance)
Tell the manager that the instance is up and running |
void |
onInstanceRunning(RemoteElasticInstance remoteElasticInstance)
Invoked when the instance enters the 'running' state |
void |
registerElasticAgentStopped(RemoteElasticInstance instance)
Remove and EC2 instance from the "currently Running map |
boolean |
validateAwsCredentials(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region,
String awsAccessID,
String awsSecretKey,
ErrorCollection errorCollection)
Validate a set of supplied AWS credentials. |
boolean |
validateAwsCredentials(String awsAccessID,
String awsSecretKey,
ErrorCollection errorCollection)
Deprecated. since 5.4 use validateAwsCredentials(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region, String, String, com.atlassian.bamboo.utils.error.ErrorCollection) instead |
Methods inherited from interface com.atlassian.bamboo.agent.elastic.tunnel.ElasticAgentTunnelPorts |
---|
getAgentSideHttpPort, getAgentSideJmsPort, getTunnelPort |
Field Detail |
---|
static final com.atlassian.aws.ec2.EC2InstanceType DEFAULT_INSTANCE_TYPE_32
static final com.atlassian.aws.ec2.EC2InstanceType DEFAULT_INSTANCE_TYPE_64
static final String DEFAULT_PRODUCT_FOR_LINUX_PLATFORM
static final String DEFAULT_PRODUCT_FOR_WINDOWS_PLATFORM
static final String BAMBOO_CONTROL_TAG
static final String ELASTIC_BAMBOO_SECURITY_GROUP
static final String ELASTIC_BAMBOO_KEY_PAIR
static final String ELASTIC_BAMBOO_KEY_PAIR_FILE
Method Detail |
---|
RemoteElasticInstance newElasticAgent(RemoteElasticInstanceListener listener, com.atlassian.aws.AWSAccount awsAccount, AgentManager agentManager, ElasticImageConfiguration elasticImageConfiguration, com.atlassian.aws.ec2.InstanceLaunchConfigurationBuilder instanceLaunchConfigurationBuilder) throws NoSuchAlgorithmException, KeyManagementException, IOException, CertificateException, UnrecoverableKeyException, KeyStoreException
NoSuchAlgorithmException
KeyManagementException
IOException
CertificateException
UnrecoverableKeyException
KeyStoreException
void ensureLoginKeyPairExists(com.atlassian.aws.AWSAccount awsAccount, String keyPair) throws com.atlassian.aws.AWSException
Ensures that a key pair, named "elasticbamboo", has been defined in the configured AWS account.
awsAccount
- that should contain the key pairkeyPair
-
com.atlassian.aws.AWSException
- if there is a problem communicating with EC2.boolean validateAwsCredentials(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, String awsAccessID, String awsSecretKey, ErrorCollection errorCollection)
Validate a set of supplied AWS credentials.
awsAccessID
- The Access ID of the Amazon Web Services AccountawsSecretKey
- The Secret Key of the Amazon Web Services AccounterrorCollection
- An ErrorCollection
to which validation errors should be added, or
null
if validation errors are not required.
true
if the supplied credentials are successfully validated; false
otherwise.@Deprecated boolean validateAwsCredentials(String awsAccessID, String awsSecretKey, ErrorCollection errorCollection)
validateAwsCredentials(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region, String, String, com.atlassian.bamboo.utils.error.ErrorCollection)
instead
@NotNull List<RemoteElasticInstance> getElasticRemoteAgents()
RemoteElasticInstance
@NotNull List<RemoteElasticInstance> getRequestedElasticRemoteAgents()
@NotNull List<RemoteElasticInstance> getStartingElasticInstances()
List<RemoteElasticInstance> getAllElasticRemoteAgents()
@NotNull List<RemoteElasticInstance> getInstancesWithStartingAgents()
getRequestedElasticRemoteAgents()
)
but the agent on the instance has not yet connected to the bamboo server. Elastic instances in such state are returned by this method
and the list is a subset of the list returned by getElasticRemoteAgents()
.
RemoteElasticInstance
com.google.common.collect.SetMultimap<ElasticImageConfiguration,RemoteElasticInstance> getAllElasticAgentsAsMap()
SetMultimap
, keyed by the ElasticImageConfiguration
int getTotalNumElasticRemoteAgents()
@Nullable RemoteElasticInstance getElasticRemoteAgentByInstanceId(String instanceId)
instanceId
- of the instance
void registerElasticAgentStopped(@NotNull RemoteElasticInstance instance)
instance
- - the one to be deleted from the mapvoid onInstanceIdentified(@NotNull RemoteElasticInstance remoteElasticInstance)
remoteElasticInstance
- the instance identifiedvoid onInstanceRunning(@NotNull RemoteElasticInstance remoteElasticInstance)
remoteElasticInstance
- the instance that entered running statevoid addElasticLogEntry(org.apache.log4j.Logger log, String logEntry)
List<String> getElasticAgentLogs()
boolean isElasticSupportEnabled()
@NotNull Set<com.atlassian.aws.ec2.EC2InstanceType> getAllowedInstanceTypes()
@NotNull List<RemoteElasticInstance> getElasticRemoteAgentsByConfiguration(ElasticImageConfiguration elasticImageConfiguration)
@NotNull List<RemoteElasticInstance> getElasticRemoteAgentsByConfiguration(long id)
boolean cancelSpotRequests(com.atlassian.aws.AWSAccount awsAccount)
awsAccount
- account
@NotNull String getInstanceLogs(@NotNull String instanceId) throws com.atlassian.aws.AWSException
instanceId
- id of the instance
com.atlassian.aws.AWSException
- if an error occurs while fetching the console outputboolean isInstanceKnown(@NotNull String instanceId)
instanceId
- id of the instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |