|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.agent.elastic.server.ElasticInstanceManagerImpl
public class ElasticInstanceManagerImpl
Field Summary |
---|
Fields inherited from interface com.atlassian.bamboo.agent.elastic.server.ElasticInstanceManager |
---|
DEFAULT_INSTANCE_TYPE |
Constructor Summary | |
---|---|
ElasticInstanceManagerImpl(AwsAccountBean awsAccountBean,
AdministrationConfigurationManager administrationConfigurationManager,
int startupTimeoutSeconds,
java.util.concurrent.Executor executor,
KeyStoreFactory keyStoreFactory,
SSLContextFactory sslContextFactory,
BootstrapManager bootstrapManager,
ErrorHandler errorHandler,
com.atlassian.bamboo.agent.elastic.server.EBSVolumeSupervisorFactory ebsVolumeSupervisorFactory)
|
Method Summary | |
---|---|
void |
addElasticLogEntry(java.lang.String logEntry)
Add a line to the elastic activity logs |
void |
ensureLoginKeyPairExists(com.atlassian.aws.AWSAccount awsAccount)
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 |
java.util.List<RemoteElasticInstance> |
getAllElasticRemoteAgents()
Returns all elastic instances. |
java.util.Set<com.atlassian.aws.ec2.EC2InstanceType> |
getAllowedInstanceTypes()
|
java.lang.String |
getDefaultImageId()
|
java.util.List<java.lang.String> |
getElasticAgentLogs()
Retrieve activity logs |
RemoteElasticInstance |
getElasticRemoteAgentByInstanceId(java.lang.String instanceId)
Retrieve elastic instance of the given ID. |
java.util.List<RemoteElasticInstance> |
getElasticRemoteAgents()
Retrieve a readonly list of any currently existing EC2 instances |
java.util.List<RemoteElasticInstance> |
getElasticRemoteAgentsByConfiguration(ElasticImageConfiguration elasticImageConfiguration)
|
java.util.List<RemoteElasticInstance> |
getElasticRemoteAgentsByConfiguration(long id)
|
int |
getHTTPProxyPort()
The TCP port upon which the Elastic Agent listens for HTTP traffic intended for the Bamboo Server. |
java.util.List<RemoteElasticInstance> |
getInstancesWithStartingAgents()
Returns those elastic instances that have already started but their agents have not yet connected to the bamboo server. |
int |
getJMSProxyPort()
The TCP port upon which the Elastic Agent listens for JMS traffic intended for the Bamboo Server. |
java.util.List<RemoteElasticInstance> |
getRequestedElasticRemoteAgents()
Returns the elastic instances which have been requested but not yet identified. |
java.util.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) |
int |
getTunnelPort()
The TCP port upon which Elastic Agents listens for incoming tunnel connections from the Bamboo Server. |
boolean |
isElasticSupportEnabled()
|
RemoteElasticInstance |
newElasticAgent(RemoteElasticInstanceListener listener,
com.atlassian.aws.AWSAccount awsAccount,
LocalAgentManager localAgentManager,
ElasticImageConfiguration elasticImageConfiguration)
|
void |
registerElasticAgentStarted(RemoteElasticInstance instance)
Tell the manager that the agent is up and running |
void |
registerElasticAgentStopped(RemoteElasticInstance instance)
Remove and EC2 instance from the "currently Running map |
boolean |
validateAwsCredentials(java.lang.String awsAccessID,
java.lang.String awsSecretKey,
ErrorCollection errorCollection)
Validate a set of supplied AWS credentials. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElasticInstanceManagerImpl(AwsAccountBean awsAccountBean, AdministrationConfigurationManager administrationConfigurationManager, int startupTimeoutSeconds, java.util.concurrent.Executor executor, KeyStoreFactory keyStoreFactory, SSLContextFactory sslContextFactory, BootstrapManager bootstrapManager, ErrorHandler errorHandler, com.atlassian.bamboo.agent.elastic.server.EBSVolumeSupervisorFactory ebsVolumeSupervisorFactory)
Method Detail |
---|
public RemoteElasticInstance newElasticAgent(RemoteElasticInstanceListener listener, com.atlassian.aws.AWSAccount awsAccount, @NotNull LocalAgentManager localAgentManager, @NotNull ElasticImageConfiguration elasticImageConfiguration) throws java.security.NoSuchAlgorithmException, java.security.KeyManagementException, java.io.IOException, java.security.cert.CertificateException, java.security.UnrecoverableKeyException, java.security.KeyStoreException
newElasticAgent
in interface ElasticInstanceManager
java.security.NoSuchAlgorithmException
java.security.KeyManagementException
java.io.IOException
java.security.cert.CertificateException
java.security.UnrecoverableKeyException
java.security.KeyStoreException
public void ensureLoginKeyPairExists(com.atlassian.aws.AWSAccount awsAccount) throws com.atlassian.aws.AWSException
ElasticInstanceManager
Ensures that a key pair, named "elasticbamboo", has been defined in the configured AWS account.
ensureLoginKeyPairExists
in interface ElasticInstanceManager
awsAccount
- that should contain the key pair
com.atlassian.aws.AWSException
- if there is a problem communicating with EC2.@Nullable public java.lang.String getDefaultImageId()
getDefaultImageId
in interface ElasticInstanceManager
public boolean validateAwsCredentials(java.lang.String awsAccessID, java.lang.String awsSecretKey, ErrorCollection errorCollection)
ElasticInstanceManager
Validate a set of supplied AWS credentials.
validateAwsCredentials
in interface ElasticInstanceManager
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.@NotNull public java.util.List<RemoteElasticInstance> getElasticRemoteAgents()
ElasticInstanceManager
getElasticRemoteAgents
in interface ElasticInstanceManager
RemoteElasticInstance
@NotNull public java.util.List<RemoteElasticInstance> getElasticRemoteAgentsByConfiguration(ElasticImageConfiguration elasticImageConfiguration)
getElasticRemoteAgentsByConfiguration
in interface ElasticInstanceManager
@NotNull public java.util.List<RemoteElasticInstance> getElasticRemoteAgentsByConfiguration(long id)
getElasticRemoteAgentsByConfiguration
in interface ElasticInstanceManager
@Nullable public RemoteElasticInstance getElasticRemoteAgentByInstanceId(java.lang.String instanceId)
ElasticInstanceManager
getElasticRemoteAgentByInstanceId
in interface ElasticInstanceManager
instanceId
- of the instance
@NotNull public java.util.List<RemoteElasticInstance> getRequestedElasticRemoteAgents()
ElasticInstanceManager
getRequestedElasticRemoteAgents
in interface ElasticInstanceManager
@NotNull public java.util.List<RemoteElasticInstance> getStartingElasticInstances()
ElasticInstanceManager
getStartingElasticInstances
in interface ElasticInstanceManager
public java.util.List<RemoteElasticInstance> getInstancesWithStartingAgents()
ElasticInstanceManager
ElasticInstanceManager.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 ElasticInstanceManager.getElasticRemoteAgents()
.
getInstancesWithStartingAgents
in interface ElasticInstanceManager
RemoteElasticInstance
public java.util.List<RemoteElasticInstance> getAllElasticRemoteAgents()
ElasticInstanceManager
getAllElasticRemoteAgents
in interface ElasticInstanceManager
public com.google.common.collect.SetMultimap<ElasticImageConfiguration,RemoteElasticInstance> getAllElasticAgentsAsMap()
ElasticInstanceManager
SetMultimap
, keyed by the ElasticImageConfiguration
getAllElasticAgentsAsMap
in interface ElasticInstanceManager
public int getTotalNumElasticRemoteAgents()
ElasticInstanceManager
getTotalNumElasticRemoteAgents
in interface ElasticInstanceManager
public void registerElasticAgentStarted(@NotNull RemoteElasticInstance instance)
ElasticInstanceManager
registerElasticAgentStarted
in interface ElasticInstanceManager
instance
- - the agent that is runningpublic void registerElasticAgentStopped(@NotNull RemoteElasticInstance instance)
ElasticInstanceManager
registerElasticAgentStopped
in interface ElasticInstanceManager
instance
- - the one to be deleted from the mappublic void addElasticLogEntry(java.lang.String logEntry)
ElasticInstanceManager
addElasticLogEntry
in interface ElasticInstanceManager
logEntry
- - the line you want added to the logspublic java.util.List<java.lang.String> getElasticAgentLogs()
ElasticInstanceManager
getElasticAgentLogs
in interface ElasticInstanceManager
public boolean isElasticSupportEnabled()
isElasticSupportEnabled
in interface ElasticInstanceManager
@NotNull public java.util.Set<com.atlassian.aws.ec2.EC2InstanceType> getAllowedInstanceTypes()
getAllowedInstanceTypes
in interface ElasticInstanceManager
public int getTunnelPort()
ElasticAgentTunnelPorts
The TCP port upon which Elastic Agents listens for incoming tunnel connections from the Bamboo Server.
getTunnelPort
in interface ElasticAgentTunnelPorts
public int getHTTPProxyPort()
ElasticAgentTunnelPorts
The TCP port upon which the Elastic Agent listens for HTTP traffic intended for the Bamboo Server.
getHTTPProxyPort
in interface ElasticAgentTunnelPorts
public int getJMSProxyPort()
ElasticAgentTunnelPorts
The TCP port upon which the Elastic Agent listens for JMS traffic intended for the Bamboo Server.
getJMSProxyPort
in interface ElasticAgentTunnelPorts
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |