Class ScalingFactory
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.cloudforgeci.api.core.annotation.BaseFactory
com.cloudforgeci.api.scaling.ScalingFactory
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Field Summary
Fields inherited from class BaseFactory
cfc, config, ctx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Abstract method that must be implemented by all factory subclasses.voidFails synthesis when a deployment requests more than one instance (minInstanceCapacity/maxInstanceCapacityabove 1, orenableAutoScaling) for an application that can't safely run that way, in either of two distinct senses:ApplicationSpec.supportsAutoScaling()isfalse-- no clustering/HA support at all in this edition, such as the Jenkins controller or the Nexus/SonarQube community editions.ApplicationSpec.requiresSequentialDeploymentWithoutDatabase()istrueand no managed database connection is provisioned (ctx.dbConnectionempty) -- a single-writer embedded-file database (e.g.voidscale(software.amazon.awscdk.services.autoscaling.AutoScalingGroup asg) voidscale(software.amazon.awscdk.services.ecs.FargateService service) Methods inherited from class BaseFactory
getDeploymentContext, getSecurityProfileConfiguration, getSystemContextMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ScalingFactory
-
-
Method Details
-
create
public void create()Description copied from class:BaseFactoryAbstract method that must be implemented by all factory subclasses. This method should contain the actual infrastructure creation logic.- Specified by:
createin classBaseFactory
-
rejectUnsupportedAutoScaling
public void rejectUnsupportedAutoScaling()Fails synthesis when a deployment requests more than one instance (minInstanceCapacity/maxInstanceCapacityabove 1, orenableAutoScaling) for an application that can't safely run that way, in either of two distinct senses:ApplicationSpec.supportsAutoScaling()isfalse-- no clustering/HA support at all in this edition, such as the Jenkins controller or the Nexus/SonarQube community editions.ApplicationSpec.requiresSequentialDeploymentWithoutDatabase()istrueand no managed database connection is provisioned (ctx.dbConnectionempty) -- a single-writer embedded-file database (e.g. CloudForge Manager's own H2) has no way to coordinate more than one writer; two replicas both racing to become that database's primary is exactly the deployment-time version of the same problemFargateFactory'sminHealthyPercent(0)/maxHealthyPercent(100)rollout override already defends against for a single *replacement*, but that override doesn't -- can't -- prevent two simultaneously-running peers whendesiredCount > 1itself is the actual request. A managed database handles concurrent writers safely, so this only applies while none is configured.
Called from both
scale(FargateService)andscale(AutoScalingGroup)-- the EC2 runtime's own paths to more than one instance -- and, standalone (public, for exactly this reason), fromFargateFactory#create(): Fargate's OWN scaling wiring lives in each topology configuration class'swireBaseAutoscalingAndDns(e.g.CmsServiceTopologyConfiguration), already correctly guarded against double-registeringautoScaleTaskCount--scale(FargateService)itself is never invoked for a real Fargate deploy, only this validation is. -
scale
public void scale(software.amazon.awscdk.services.ecs.FargateService service) -
scale
public void scale(software.amazon.awscdk.services.autoscaling.AutoScalingGroup asg)
-