Interface ElasticFunctionalityFacade
-
- All Known Implementing Classes:
ElasticFunctionalityFacadeImpl
public interface ElasticFunctionalityFacade
Facade that orchestrates EC2 related functionalities
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ElasticFunctionalityFacade.Ec2PrivateKeyValidationStatus
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ALLOWED_AGENTS
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addElasticLogEntry(org.apache.log4j.Logger log, String logEntry)
Deprecated.since 9.3 useaddElasticLogEntry(Logger, String)
void
addElasticLogEntry(org.apache.logging.log4j.Logger log, String logEntry)
void
adjustElasticInstanceNumbers(@NotNull ElasticInstanceSchedule instanceSchedule)
Given theElasticInstanceSchedule
startup or bring down the correct number of agentsvoid
cleanupCredentials()
Cleanup EC2 credentials and disable EC2 support@NotNull String
getKeyPairName()
int
getMaxConcurrentInstances()
@NotNull io.atlassian.fugue.Either<ElasticFunctionalityFacade.Ec2PrivateKeyValidationStatus,Optional<String>>
getPassword(RemoteElasticInstance instance)
@NotNull String
getPkFileLocation()
@NotNull io.atlassian.fugue.Either<ElasticFunctionalityFacade.Ec2PrivateKeyValidationStatus,File>
getPrivateKeyLocation()
Returns the location of the AWS private keyboolean
isElasticSupportEnabled()
boolean
isElasticSupportPossible(@NotNull ErrorCollection errorCollection)
void
persistTunnelDataOfInstance(@NotNull ElasticAgentDefinition pipelineDefinition)
Persist data related to tunnel configuration of an elastic instance.void
recheckElasticSupportEnabledFlag()
void
restoreAgent(@NotNull ElasticAgentDefinition elasticAgentDefinition, @NotNull com.amazonaws.services.ec2.model.Instance instance, @NotNull com.atlassian.aws.AWSAccount awsAccount)
void
setElasticSupportEnabled(boolean elasticSupportEnabled)
Enable/disable Elastic Bamboo functionalityvoid
shutdownAllInstances()
void
shutdownInstance(@NotNull RemoteElasticInstance elasticInstance)
void
shutdownInstance(String instanceId)
void
startupAgents(@NotNull Collection<ElasticImageConfiguration> elasticImageConfigurations)
void
updateAgentPendingStatus(String instanceId)
Set the agent pending status to true for the given instance idboolean
validateAgentCreation(int numAgentsRequired, ErrorCollection errorCollection)
Validates whether the requested number of agents can be created and adds any errors to the error collection.
-
-
-
Field Detail
-
DEFAULT_ALLOWED_AGENTS
static final int DEFAULT_ALLOWED_AGENTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKeyPairName
@NotNull @NotNull String getKeyPairName()
-
recheckElasticSupportEnabledFlag
void recheckElasticSupportEnabledFlag()
-
shutdownInstance
void shutdownInstance(@NotNull @NotNull RemoteElasticInstance elasticInstance)
-
shutdownInstance
void shutdownInstance(String instanceId) throws com.atlassian.aws.AWSException
- Throws:
com.atlassian.aws.AWSException
-
shutdownAllInstances
void shutdownAllInstances()
-
startupAgents
void startupAgents(@NotNull @NotNull Collection<ElasticImageConfiguration> elasticImageConfigurations) throws com.atlassian.aws.AWSException
- Throws:
com.atlassian.aws.AWSException
-
validateAgentCreation
boolean validateAgentCreation(int numAgentsRequired, ErrorCollection errorCollection)
Validates whether the requested number of agents can be created and adds any errors to the error collection.- Parameters:
numAgentsRequired
- - number of agents to be createderrorCollection
- - error collection to add any validation errors to.
-
restoreAgent
void restoreAgent(@NotNull @NotNull ElasticAgentDefinition elasticAgentDefinition, @NotNull @NotNull com.amazonaws.services.ec2.model.Instance instance, @NotNull @NotNull com.atlassian.aws.AWSAccount awsAccount)
-
persistTunnelDataOfInstance
void persistTunnelDataOfInstance(@NotNull @NotNull ElasticAgentDefinition pipelineDefinition)
Persist data related to tunnel configuration of an elastic instance.
-
isElasticSupportEnabled
boolean isElasticSupportEnabled()
- Returns:
- true, if elastic support is turned on
-
setElasticSupportEnabled
void setElasticSupportEnabled(boolean elasticSupportEnabled)
Enable/disable Elastic Bamboo functionality- Parameters:
elasticSupportEnabled
- Specifies if Elastc Baboo shall be enabled or disabled.
-
isElasticSupportPossible
boolean isElasticSupportPossible(@NotNull @NotNull ErrorCollection errorCollection)
- Returns:
- true, if all preconditions for turning elastic support on are met
-
getPkFileLocation
@NotNull @NotNull String getPkFileLocation()
-
getPrivateKeyLocation
@NotNull @NotNull io.atlassian.fugue.Either<ElasticFunctionalityFacade.Ec2PrivateKeyValidationStatus,File> getPrivateKeyLocation()
Returns the location of the AWS private key- Returns:
-
getMaxConcurrentInstances
int getMaxConcurrentInstances()
- Returns:
- max number of elastic instances allowed for this instance. It's based on license restrictions.
-
updateAgentPendingStatus
void updateAgentPendingStatus(String instanceId)
Set the agent pending status to true for the given instance id- Parameters:
instanceId
-
-
addElasticLogEntry
void addElasticLogEntry(org.apache.logging.log4j.Logger log, String logEntry)
-
addElasticLogEntry
@Deprecated void addElasticLogEntry(org.apache.log4j.Logger log, String logEntry)
Deprecated.since 9.3 useaddElasticLogEntry(Logger, String)
-
adjustElasticInstanceNumbers
void adjustElasticInstanceNumbers(@NotNull @NotNull ElasticInstanceSchedule instanceSchedule) throws com.atlassian.aws.AWSException
Given theElasticInstanceSchedule
startup or bring down the correct number of agents- Parameters:
instanceSchedule
-- Throws:
com.atlassian.aws.AWSException
-
getPassword
@NotNull @NotNull io.atlassian.fugue.Either<ElasticFunctionalityFacade.Ec2PrivateKeyValidationStatus,Optional<String>> getPassword(RemoteElasticInstance instance)
-
cleanupCredentials
void cleanupCredentials()
Cleanup EC2 credentials and disable EC2 support
-
-