Package com.cloudforgeci.api.compute
Class FargateFactory
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.cloudforgeci.api.core.annotation.BaseFactory
com.cloudforgeci.api.compute.FargateFactory
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
Factory for creating Fargate-based Jenkins compute infrastructure.
This factory creates and configures AWS Fargate services for Jenkins deployments, providing a serverless container-based approach. It respects network mode configuration to place tasks in appropriate subnets and handles EFS integration for persistent storage.
Key Features:
- Fargate task definitions with Jenkins container
- ECS cluster and service configuration
- EFS access point integration for persistent storage
- IAM roles for task execution and EFS access
- Network mode awareness (public vs private subnets)
- Security group configuration
Network Configuration:
- public-no-nat: Tasks get public IPs and use public subnets
- private-with-nat: Tasks use private subnets with NAT gateway
Example Usage:
FargateFactory factory = new FargateFactory(scope, "JenkinsFargate");
factory.create();
// Access created resources
FargateService service = ctx.fargateService.get().orElseThrow();
FargateTaskDefinition taskDef = ctx.fargateTaskDef.get().orElseThrow();
- Since:
- 1.0.0
- Author:
- CloudForgeCI
- See Also:
-
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 com.cloudforgeci.api.core.annotation.BaseFactory
cfc, config, ctx -
Constructor Summary
ConstructorsConstructorDescriptionFargateFactory(software.constructs.Construct scope, String id) Creates a new FargateFactory instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Abstract method that must be implemented by all factory subclasses.Methods inherited from class com.cloudforgeci.api.core.annotation.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FargateFactory
Creates a new FargateFactory instance.- Parameters:
scope- The CDK construct scopeid- Unique identifier for the Fargate factory
-
-
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
-